snmpgetnext(1M) TCP/IP 5.4R3.00 snmpgetnext(1M)
NAME
snmpgetnext, getnext - get MIB-objects from SNMP agent,
SYNOPSIS
snmpgetnext [-n][-t] host community object ...
where:
host is a hostname or Internet address
community is a community string
object is a object type or object instance
DESCRIPTION
Use the snmpgetnext command to retrieve values for objects instances
from an SNMP agent. The snmpgetnext 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
snmpgetnext command will fail with a timeout. If community has read
access, the agent will return the value for the object instance that
lexicographically follows object. Lexicographical ordering is
determined by the MIB definition (object ID), not the spelling of the
objects name.
The snmpgetnext command is new in DG/UX 5.4R3.00 and has a different
output format than the original getnext command. The getnext command
is provided for backward compatibility, but it will be removed in a
future release.
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.
Specify object as either an object type or object instance. You may
specify object in either dot-notation representing an object
identifier or as a text string representing an object descriptor.
Options are:
-n Display Object ID's in a numeric format instead of translating
them into a symbolic name.
-t Display the data type of the object in addition to it's name
and value.
EXAMPLES
This example shows how to use snmpgetnext and demonstrates the
differences between object types, object instances, object
descriptors (names) and object ID's (numbers).
$ snmpgetnext myhost public sysDescr sysDescr.0 1.3.6.1.2.1.2
sysDescr.0 = DG/UX TCP/IP SNMP AGENT
sysObjectID.0 = DataGeneral
Licensed material--property of copyright holder(s) 1
snmpgetnext(1M) TCP/IP 5.4R3.00 snmpgetnext(1M)
ifNumber.0 = 2
In this example the object type sysDescr was specified and the agent
returned the first (and only) instance for sysDescr, sysDescr.0. The
2nd object is specified an an object instance, sysDescr.0, the agent
returned the next instance from the system group, sysObjectID.0.
Lastly, object identifier for ifTable, 1.3.6.1.2.1.2 is specified and
the agent returned the first instance from the ifTable, ifNumber.0.
DIAGNOSTICS
Exit status is 0 upon success.
Exit status is -1 if there are errors parsing the command line.
Exit status is 1 if the agent returns an error.
SEE ALSO
snmpgetone(1M), snmpgetmany(1M), snmpsetany(1M), snmptraprecv(1M),
snmptrapsend(1M), snmpgettab(1M), snmpd(1M), snmpd.conf(4M),
snmpdfiles(4M).
Licensed material--property of copyright holder(s) 2