The snmptrapd CLI application sets up a listener for SNMP notifications (TRAP or INFORM) from the Master SNMP Agent. The SNMP Plugin uses its Subscriber relationship with InfoHub to obtain notification details and sends them to the SNMP Master Agent. Then, snmptrapd receives those notifications in the form of a TRAP or an INFORM. INFORM differs from a TRAP in that it requires acknowledgement message, while the TRAP does not. Because snmptrapd, by default, listens for SNMP notifications on the special privilege UDP port 162 on IPv4 interfaces, you need to run the snmptrapd command as root. At any given time, only one snmptrapd can receive notifications but you can set up one or more listening addresses (refer to the man page entry for snmpd for more information). A typical syntax of the snmptrapd command in the SNMP Plugin is:

snmptrapd[<snmpcmd_common_options>] -m <MIBModule(s)>
-Lo -f -t -Oa

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


$ sudo snmptrapd -m INFOHUB-1-MIB -Lo -f -t -Oa
SNMPv2-SMI::snmpModules. = OID: INFOHUB-1-MIB::infohubtestMyBoxSyslogDBFILEXTcurr.0
2013-10-23 03:34:10 localhost.localdomain [UDP: []:54501->[]]:
SNMPv2-SMI::mib- = Timeticks: (118883997) 13 days, 18:13:59.97   
SNMPv2-SMI::snmpModules. = OID: INFOHUB-1-MIB::infohubtestMyBoxSyslogDBFILEXTcurr.0

This example sets up a listener for notifications coming from InfoHub. -Lo specifies that the messages are logged on standard output. The DBFILEXT notification that arrives on snmptrapd is from a Noinfo subscription called DBFILEXT which InfoHub raised due to lack of activity for the DBFILEXT message.

[Note]AIX Notes

On AIX, use the NET-SNMP executable to set up a listener for notifications coming from InfoHub. A sample snmptrapd command might look like:

sudo /usr/local/sbin/snmptrapd -m INFOHUB-1-MIB -Oa -Lo -f -t 
loading table of contents...