SNMPTEST(1) Net-SNMP SNMPTEST(1) (NAME) snmptest - SNMP (SYNOPSIS) snmptest [COMMON OPTIONS] AGENT (DESCRIPTION) snmptest SNMP . . SNMP . AGENT SNMP . AGENT IPv4 . UDP/IPv4 . AGENT snmpcmd(1) . snmptest : Variable: . ( ) . variables(5) . : snmptest -c public -v 1 zeus Variable: system.sysDescr.0 Variable: : requestid 0x5992478A errstat 0x0 errindex 0x0 system.sysDescr.0 = STRING: "Unix 4.3BSD" errstatus . errstat snmp.h . errindex . "Variable:" . . GET . "Variable:" : $G - GET $N - GETNEXT $S - SET $B - GETBULK : GETBULK SNMPv1 $I - Inform $T - SNMPv2 Trap "Variable:" : $D - () $QP - $Q - : GET: << GET>> ($G ) OID "Variable:" . OID . GET . GETNEXT: << GETNEXT>> ($N) << GET>> . SET: << SET>> ($S) . : Type [i|s|x|d|n|o|t|a]: . : i - (integer) u - (unsigned integer) s - ASCII x - d - a - IP o - (object identifier) n - (null) t - (timeticks) : Value: ( ) . . . GETBULK: << GETBULK>> ($B) << SET>> . GETBULK SNMPv1 . Inform: << Inform>> ($I) << SET>> . SNMPv1 . agent snmptest snmptrapd . SNMPv2 Trap: << SNMPv2 Trap>> ($T) << SET>> . SNMPv1 . agent snmptest snmptrapd . (OPTIONS) snmptest snmpcmd(1) . (EXAMPLES) GET OID : % snmptest -v 2c -c public testhost:9999 Variable: system.sysDescr.0 Variable: system.sysContact.0 Variable: Received Get Response from 128.2.56.220 requestid 0x7D9FCD63 errstat 0x0 errindex 0x0 SNMPv2-MIB::sysDescr.0 = STRING: SunOS testhost 5.9 Generic_112233-02 sun4u SNMPv2-MIB::sysContact.0 = STRING: x1111 GETNEXT : Variable: SNMPv2-MIB::sysORUpTime Variable: Received Get Response from 128.2.56.220 requestid 0x7D9FCD64 errstat 0x0 errindex 0x0 SNMPv2-MIB::sysORUpTime.1 = Timeticks: (6) 0:00:00.06 Variable: SET : Variable: $S Request type is Set Request Variable: system.sysLocation.0 Type [i|u|s|x|d|n|o|t|a]: s Value: building 17 Variable: Received Get Response from 128.2.56.220 requestid 0x7D9FCD65 errstat 0x0 errindex 0x0 SNMPv2-MIB::sysLocation.0 = STRING: building A Variable: GETBULK : Variable: $B Request type is Bulk Request Enter a blank line to terminate the list of non-repeaters and to begin the repeating variables Variable: Now input the repeating variables Variable: system.sysContact.0 Variable: system.sysLocation.0 Variable: What repeat count? 2 Received Get Response from 128.2.56.220 requestid 0x2EA7942A errstat 0x0 errindex 0x0 SNMPv2-MIB::sysName.0 = STRING: testhost SNMPv2-MIB::sysORLastChange.0 = Timeticks: (58) 0:00:00.58 SNMPv2-MIB::sysLocation.0 = STRING: bldg A SNMPv2-MIB::sysORID.1 = OID: IF-MIB::ifMIB Variable: Inform : snmptest -v 2c -c public snmptrapd_host Variable: $I Request type is Inform Request (Are you sending to the right port?) Variable: system.sysContact.0 Type [i|u|sIx|d|n|o|t|a]: s Value: x12345 Variable: Inform Acknowledged Variable: snmptrapd_host : snmptrapd_host []: Trap SNMPv2-MIB::sysContact.0 = STRING: x12345 SNMPv2 Trap : snmptest -v 2c -c public snmptrapd_host Variable: $T Request type is SNMPv2 Trap Request (Are you sending to the right port?) Variable: system.sysLocation.0 Type [i|u|s|x|d|n|o|t|a]: s Value: building a Variable: snmptrapd_host : snmptrapd_host []: Trap SNMPv2-MIB::sys.0 = STRING: building a (SEE ALSO) snmpcmd(1), snmpget(1), snmpset(1), variables(5) V5.9.5.2 25 Jul 2003 SNMPTEST(1)