Testing Your MIB Value





Testing Your MIB Value

Once you identify an interesting MIB value for your Linux system, you can use the snmpwalk command to poll it. Many times the text aliases in an MIB reference the OID branch only and not the data located in a leaf ending in an additional number, such as .0 or .1. The snmpget command doesn't work with branches, giving an error stating that the MIB variable couldn't be found.

In the example below, the ssCpuRawUser OID alias was found to be interesting, but the snmpget command fails to get a value. Follow up with the snmpwalk command shows that the value is located in ssCpuRawUser.0 instead. The snmpget is then successful in retrieving the counter32 type data with a current value of 396271.

     [[email protected] tmp]# snmpget -v1 -c craz33guy localhost ssCpuRawUser
     Error in packet
     Reason: (noSuchName) There is no such variable name in this MIB.
     Failed object: UCD-SNMP-MIB::ssCpuRawUser
     [[email protected] tmp]#

     [[email protected] tmp]# snmpwalk -v1 -c craz33guy localhost ssCpuRawUser
     UCD-SNMP-MIB::ssCpuRawUser.0 = Counter32: 396241
     [[email protected] tmp]# snmpget -v1 -c craz33guy localhost ssCpuRawUser.0
     UCD-SNMP-MIB::ssCpuRawUser.0 = Counter32: 396271
     [[email protected] tmp]#

The MIB values that work successfully with snmpget are the ones you should use with MRTG.


     Python   SQL   Java   php   Perl 
     game development   web development   internet   *nix   graphics   hardware 
     telecommunications   C++ 
     Flash   Active Directory   Windows