The snmpgetnext CLI application performs GETNEXT requests from an InfoHub SNMP module. The snmpgetnext command retrieves data that lies next to the specified objects in the order specified by the View. A typical syntax of the snmpgetnext command in the SNMP Plugin is:

snmpgetnext [<snmpcmd_common_options>] -v2c -Oa -c <communitystring> [-m <MIBModule(s)>] OID [OID]...

For more information on the snmpgetnext command options, refer to the man page of the snmpgetnext command.


With curr View:

$ snmpgetnext -v2c -c <communitystring> -Oa -m INFOHUB-1-MIB localhost INFOHUB-1-MIB::infohubtestMyBoxSyslogDBFILEXTcurr.0

This example retrieves the data value of the object that lies immediately after infohubtestMyBoxSyslogDBFILEXT in the InfoHub MIB module.

With hist View:

$ snmpgetnext -v2c -c <communitystring> -Oa -m INFOHUB-1-MIB localhost INFOHUB-1-MIB::infohubtestMyBoxSyslogDBFILEXThist.1

This example retrieves the predecessor (that is, hist.2) of the hist.1 value of the object infohubtestMyBoxSyslogDBFILEXThist.

With time View:

$ snmpgetnext -v2c -c <communitystring> -Oa -m INFOHUB-1-MIB localhost INFOHUB-1-MIB::infohubtestMyBoxSyslogGTMFataltime.`date --date "10/09/2013 19:05:00" +%s`
INFOHUB-1-MIB::infohubtestInfoHubOID = OID: INFOHUB-1-MIB::infohubtestMyBoxSyslogGTMFatalsnum.19

This example retrieves the mnemonic OID and the sequence number of the first fatal GT.M error that was stored on Infohub after 10/09/2013 14:26:00. This View is useful in situations where you need to investigate incidents occurring around a specified time.

With snum View:

$ snmpgetnext -v2c -c <communitystring> -Oa -m INFOHUB-1-MIB localhost INFOHUB-1-MIB::infohubtestMyBoxSyslogGTMFatalsnum.18
INFOHUB-1-MIB::infohubtestMyBoxSyslogGTMFatalsnum.19 = STRING: "Oct  9 19:06:07 gtmnode20 GTM-SRCSRVR-INSTANCE1[14796]: %GTM-F-FORCEDHALT, Image HALTed by MUPIP STOP -- generated from 0x0000000000000000."

This example uses the sequence number (snum.18) returned with the time View example to retrieve the data value of the next GT.M Fatal error stored on InfoHub immediately after sequence number 18. In most cases, you would use the snum View in conjunction with the time View which returns the sequence number of the monitored object's mnemonic OID.

You can also use the snmpbulkget command to display the next 10 data values of objects stored in InfoHub after sequence number 18.

$ snmpbulkget -v2c -c <communitystring> -Oa -m INFOHUB-1-MIB localhost INFOHUB-1-MIB::infohubtestMyBoxSyslogGTMFatalsnum.18

You can also specify -Cr20 to retrieve the next 20 data values of objects stored in InfoHub after sequence number 18.

[Note]AIX Notes

On AIX, you need to explicitly specify the port number for the NET-SNMP Agent since another port was assigned during installation (see the agentAddress line in snmpd.conf). A sample snmpgetnext command might look like:

snmpgetnext -v2c -c <communitystring> -Oa -m INFOHUB-1-MIB INFOHUB-1-MIB::infohubtestMyBoxSyslogAllcurr.0


snmpgetnext -v2c -c <communitystring> -Oa -m INFOHUB-1-MIB INFOHUB-1-MIB::infohubtestMyBoxSyslogAllcurr.0
loading table of contents...