[mrtg] Re: Linux CPU Usage

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Sat Sep 4 01:54:26 MEST 1999


> [harryk at prepaid harryk]$ snmpget 192.168.10.200 public
> .1.3.6.1.4.1.1575.1.5.2.3
> Error in packet.
> Reason: There is no such variable name in this MIB.
> This name doesn't exist:
> enterprises.tubs.ibr.linuxMIB.linuxObjects.linuxLoadAvg1
> 

The formats to use are:

snmpget  <address> <string> <leading dot><full OID><instance>
snmpwalk <address> <string> <leading dot><full OID>
snmpget  <address> <string> <partial OID><instance>
snmpwalk <address> <string> <partial OID>
Target[x]: <OID><instance>&<OID><instance>:<string>@<address>

So: 
- When using a full OID you use a leading dot for snmp{get|walk}
- You do not use a leading dot for MRTG
- You can look at the instance(s) using snmpwalk

Remember: OIDs do not start with a dot. When specifying a full OID
inside snmpwalk/snmpget instead of specifying a subtree of
1.3.6.1.2.1 you use a leading dot to tell that program that you did so.
It is not part of the OID, it is sort of a command.

Also:
- The number returned is not an increasing counter, it is a
  gauge. You have to include Option[x]: gauge

An example, retrieving a normal counter (interface 1), try them:

snmpget    192.168.10.200 public .1.3.6.1.2.1.2.2.1.10.1
snmpget    192.168.10.220 public              2.2.1.10.1
snmpwalk   192.168.10.220 public .1.3.6.1.2.1.2.2.1.10
snmpwalk   192.168.10.220 public              2.2.1.10
Target[x]: 1.3.6.1.2.1.2.2.1.10.1&1.3.6.1.2.1.2.2.1.16.1:
   public at 192.168.10.200

This last one is the same as specifying:
Target[x]: 1:public at 192.168.10.200

Regards,
Alex

--
* To unsubscribe from the mrtg mailing list, send a message with the
  subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg


More information about the mrtg mailing list