SNMP Manager Programmer's Guide
Programming Examples
SNMP Manager Programmer’s Guide–134249
2-69
SNMPSET
data-type
describes the SNMP data type of the target MIB object when it is not a MIB-II
object. It must be one of these values:
OCTET_STRING
DisplayString
OBJECT_IDENTIFIER
NULL
INTEGER
IpAddress
Counter
Gauge
TimeTicks
Opaque
value
is the value to assign to the target MIB object. Enclose strings in double quotation
marks (""), use a colon (:) to specify binary data, and use the dotted notation
(1.2.3.4) or NonStop Kernel node name for IP addresses.
Example 2-8
illustrates the output SNMPSET generates.
Example 2-8. Sample SNMPSET Output
TACL> SNMPSET -a $zsnmp1 \mynode sysName.0 "My system" sysContact.0 "Me"
------ RUNNING LOCAL ------
SENDING PACKET:
Packet Length=125, Version=0, Community: Length=6, Value=public
PDU Type=set-request Length=125, RQ_ID=1, Err_stat=noError, Err_ndx=0
VBLlen=99, VBcount=2
VarBind #0, content size=53, Flags & type=0x04, encoded length=15
OBJECT IDENTIFIER: sysName.0
OCTET STRING: Length=9
My system
VarBind #1, content size=46, Flags & type=0x04, encoded length=8
OBJECT IDENTIFIER: sysContact.0
OCTET STRING: Length=2
Me
RECEIVED PACKET:
Packet Length=109, Version=0, Community: Length=0, Value=
PDU Type=get-response Length=109, RQ_ID=1, Err_stat=noError, Err_ndx=0
VBLlen=99, VBcount=2
VarBind #0, content size=48, Flags & type=0x04, encoded length=9
OBJECT IDENTIFIER: sysName.0
OCTET STRING: Length=9
My system
VarBind #1, content size=41, Flags & type=0x04, encoded length=2
OBJECT IDENTIFIER: sysContact.0
OCTET STRING: Length=2
Me