snmptranslate

Get the dotted numeric notation of an object ID from the symbolic name or vice versa.

Syntax:

snmptranslate [-d] [-n] [-r] variable_name 

Options:

-d
Display the description of the object identifier from the mib.txt file if it's available.
-n
Get the symbolic name from the dotted numeric notation (default is to get the dotted numeric notation from the symbolic name).
-r
Get the dotted numeric notation of an object identifier without using the subidentifier.
variable_name
The variable name in the format specified in the file mib.txt.

Description:

The snmptranslate utility is used to obtain the symbolic name from the dotted numeric notation or vice versa - to obtain the dotted numeric notation from the symbolic name of an object identifier.

You can specify one fully qualified object identifier in the format specified in the file mib.txt.

Examples:

Obtain the dotted numeric notation of the system subtree:

snmptranslate system

The output is similar to:

.1.3.6.1.2.1.1

Obtain the symbolic name for the object ID .1.3.6.1.2.1.1:

snmptranslate -n .1.3.6.1.2.1.1

The output is similar to:

system

Environment variables:

MIBFILE
Specify the location of the mib.txt file. For example, MIBFILE=path/mib.txt (the default path is /etc).
SUFFIX
If SUFFIX exists in your environment, all object IDs with a symbolic name will be printed with only the last element. Examples:

This ID:

system.syscontact.0

will be printed as:

syscontact.0

This ID:

udp.udpTable.udpEntry.udpLocalAddress.0.0.0.161

will be printed as:

udpLocalAddress.0.0.0.161

Errors:

The snmptranslate utility has an error processing the request; an error message is returned to help pinpoint how the request was malformed.

See also:

snmpd, snmpgetnext, snmpnetstat, snmpstatus, snmptest, snmptrap, snmptrapd, snmpwalk

/etc/mib.txt file

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

RFC 1441, RFC 1445, RFC 1446, RFC 1448, RFC 1449

Marshall T. Rose, The Simple Book: An Introduction to Internet Management, Revised 2nd ed. (Prentice-Hall, 1996, ISBN 0-13-451659-1)