Template:FAQ:Applications 09

From Net-SNMP Wiki
Revision as of 21:33, 20 October 2006 by Dts12 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

There are a number of possible causes of this (scattered throughout this FAQ, so keep reading!). But one of the most likely snares for the unwary is forgetting the instance subidentifier for 'non-table' objects. If you walk the 'system' tree, you'll notice that all the results (apart from the sysORTable), have a '.0' at the end of the OID. This is the "instance sub-identifier" - which must be included for a GET request. Compare the following:

       $ snmpget -v1 -c public localhost sysUpTime
       Error in packet 
       Reason: (noSuchName) There is no such variable name in this MIB.
       This name doesn't exist: system.sysUpTime
       $ snmpget -v1 -c public localhost sysUpTime.0 
       system.sysUpTime.0 = Timeticks: (69189271) 8 days, 0:11:32.71
       

This is a little less obscure when using SNMPv2c or v3 requests:

       $ snmpget -v 2c -c public localhost sysUpTime
       system.sysUpTime = No Such Instance currently exists