snmpgetmany(1M) TCP/IP R4.11 snmpgetmany(1M)
NAME
snmpgetmany - get MIB-subtrees from SNMP agent
SYNOPSIS
snmpgetmany [-n][-t] host community object ...
where:
host is a hostname or Internet address
community is a community string
object is a class name (subtree)
DESCRIPTION
Use the snmpgetmany command to query portions of a MIB. The
snmpgetmany command sends a request for object to the agent running
on host. The agent authenticates the request by checking that
community has read access to object. If community does not have read
access, the request is discarded and the snmpgetmany command will
fail because of a timeout. If community does have read access, the
agent will return the value of the MIB object that lexicographically
follows object. Lexicographical ordering is determined by the MIB
definition (object ID), not the spelling of the object's name. The
snmpgetmany command prints the response and builds a new request
specifying the new object returned by the agent. This process
continues until the object returned by the agent is no longer a
member of the subtree containing object.
If object is specified as iso (the root of all MIBs), the entire MIB
can be obtained from the SNMP Agent.
Specify host as either a hostname or an Internet address in dot-
notation.
The community string is a text string used by the agent to
authenticate the request. You must configure the agent to allow read
access for community for the operation to be successful.
The object is specified as either an object type, subtree, or group
name. You can specify object in either dot-notation representing an
object identifier or as a text string representing an object
descriptor.
Options are:
-n Display Object IDs in a numeric format instead of translating
them into a symbolic name.
-t Display the data type of the object in addition to its name
and value.
EXAMPLES
The first example shows snmpgetmany retrieving the system group.
$ snmpgetmany myhost public system
sysDescr.0 = DG/UX TCP/IP SNMP AGENT
sysObjectID.0 = dguxOnAviion
sysUpTime.0 = 1342175
sysContact.0 = myname@myhost
sysName.0 = myhost
sysLocation.0 = Hall 106 Office 1
sysServices.0 = 72
The second example shows how snmpgetmany is used to retrieve the
entire MIB.
$ snmpgetmany myhost public iso
sysDescr.0 = DG/UX TCP/IP SNMP AGENT
sysObjectID.0 = DataGeneral
.
.
.
udpLocalPort.0.0.0.0.1212 = 1212
udpLocalPort.0.0.0.0.2049 = 2049
End of MIB.
DIAGNOSTICS
Exit status is 0 upon success.
Exit status is -1 if there are errors parsing the command line.
Exit status is 1 if there is an error returned from the agent.
SEE ALSO
snmpgetone(1M), snmpgetnext(1M), snmpsetany(1M), snmptraprecv(1M),
snmptrapsend(1M), snmpgettab(1M), snmpd(1M), snmpdfiles(4),
snmpd.conf(4).
Licensed material--property of copyright holder(s)