snmpget

communicate with a network entity using SNMP GET requests

Syntax:

snmpget [-d] host community variable_name

Options:

-d
Dump input and output packets.
host
An Internet address specified in dot notation or a host name.
community
The community name for the transaction with the remote system.
variable_name
The variable name in the format specified in the file mib.txt.

Examples:

Retrieve the variables sysDescr.0 and sysUpTime.0:

snmpget netdev-kbox.cc.cmu.edu public system.sysDescr.0
    system.sysUpTime.0

The output is similar to:

Name: system.sysDescr.0
OCTET STRING- (ascii):   Kinetics FastPath2

Name: system.sysUpTime.0
Timeticks: (2270351) 6:18:23

Description:

The snmpget utility uses the GET request to query for information about a network entity. You can specify one or more fully qualified object identifiers in the format specified in the file mib.txt.

Errors:

If the network entity has an error processing the request packet, an error packet is returned and snmpget displays a message to help pinpoint how the request was malformed. If you've specified other variables, snmpget resends the request without the variable that caused the problem.

See also:

snmpd, snmpgetnext, snmpnetstat, snmpstatus, snmptest, snmptrap, snmptrapd, snmpwalk, mib.txt file

RFC 1065, RFC 1066, RFC 1067, ISO 8824 (ASN.1)

Marshall T. Rose, The Simple Book: An Introduction to Internet Management, 2nd ed. (Prentice-Hall, 1994, ISBN 0-13-177254-6)