Logo
Home page Net-SNMP

Archive Search:

Require all words?

Site Search:
Google
Net-SNMP Tutorial -- snmpgetnext

Net-SNMP Tutorial -- snmpgetnext

The snmpgetnext command, which is similar in usage to the snmpget command, is used to retrieve the next oid in the mib tree of data. Instead of returing the data you requested, it returns the next OID in the tree and its value:


You could use the snmpgetnext command to manually walk down the mib tree in the remote host, by always specifying the last OID that you saw on the command line for the next command:


In fact, the snmpwalk command described in the next section, implements exactly this but in one command!

Unlike the snmpget command, the snmpgetnext command does return data for a OID which is too short or is missing the index part of the OID. For instance, if you remember from the last snmpget discussion, if you left off the .0 on the end of the OID you were requesting on a snmpget command, you were issued an error. With snmpgetnext, you're still issued an answer, because you will always get the next value in the tree, regardless of whether or not you specified a valid OID for a variable or not:



Valid CSS!


Last modified: Wednesday, 01-Aug-2018 04:41:28 UTC
For questions regarding web content and site functionality, please write to the net-snmp-users mail list.