SNMP Manager Programmer's Guide
Programming Examples
SNMP Manager Programmer’s Guide–134249
2-54
SNMPGET
SNMPGET
Like SNMPGT, SNMPGET handles a Get packet for one or more MIB objects.
However, SNMPGET encodes the Get packet for UDP or IPC communication,
depending on the target host identifier you specify at invocation:
•
UDP communication is used if the host is not the same host as the manager’s host
or if it cannot be reached over Expand.
•
IPC communication is used if the host is the same host as the manager’s host or if it
can be reached over Expand. If IPC communication fails, UDP communication is
used.
Invoke SNMPGET as follows; you can specify the arguments preceded with a minus
sign in any order, but the last two arguments must be present and in the locations shown.
Invocation is the same as that for SNMPGT, except SNMPGET accepts a NonStop agent
process name (in the -a parameter) and SNMPGET accepts a NonStop Kernel target host
name with or without a backslash:
agent-community string
is the community name used by the target agent for request authentication. You can
format the community name as a displayable string or as a sequence of octets, where
each octet is an 8-bit hexadecimal value:
"myCommunity"
0x4D:0x65
The default is "public".
request-id
is an integer in the range -2147483648 to 2147483647 that uniquely identifies the
first request packet sent by the manager. The default is 1. If retry-count is
greater than 0, the request ID is incremented by one each time another request is
sent.
agent-request-port
is the UDP destination port to use to address the agent. The default is 161.
SNMPGET [-c agent-community string]
[-i request-id]
[-p agent-request-port}
[-r retry-count]
[-t timeout-seconds]
[-a NonStop-agent-process]
[-x output-information-level]
target-host-identifier
MIB-object [MIB-object...]