SNMP Manager Programmer's Guide
Programming Examples
SNMP Manager Programmer’s Guide–134249
2-42
SNMPGT
target-host-identifier
identifies the device on which the target agent resides. You can specify either a
name or an IP address; omit the backslash when specifying a NonStop Kernel node:
somenode
somesys.tandem.com
130.252.12.3
MIB-object
identifies a MIB object instance. If the object is a MIB-II object, you can refer to it
by name or using the dotted OID format; use the dotted OID format for objects that
are not MIB-II objects:
sysContact.0
1.3.6.1.2.1.25.2.2.0
You can specify as many as 16 MIB objects.
Example 2-3
illustrates the output SNMPGT generates; for a description of the fields,
refer to the description of the print_pkt() common utility function earlier in this section.
Example 2-4 illustrates the contents of snmpgtc, the source code file for SNMPGT.
Figure 2-1, shown earlier, illustrates the logic flow of this manager. Numbers in
Example 2-4 correspond to numbers in the observations made between here and the
example.
Example 2-3. Example SNMPGT Output
TACL> SNMPGT mynode sysDescr.0
SENDING PACKET:
Packet Length=38, Version=0, Community: Length=6, Value=public
PDU Type=get-request Length=25, RQ_ID=1, Err_stat=noError, Err_ndx=0
VBLlen=14, VBcount=1
VarBind #0, content size=12, Flags & type=0x05, encoded length=0
OBJECT IDENTIFIER: sysDescr.0
NULL
RECEIVED PACKET:
Packet Length=107, Version=0, Community: Length=6, Value=public
PDU Type=get-response Length=94, RQ_ID=1, Err_stat=noError, Err_ndx=0
VBLlen=83, VBcount=1
VarBind #0, content size=81, Flags & type=0x04, encoded length=69
OBJECT IDENTIFIER: sysDescr.0
OCTET STRING: Length=69
Tandem NonStop Kernel System Version: D30 Node: \MYNODE Agent: $ZSNMP