Logo
Home page Net-SNMP

Archive Search:

Require all words?

Site Search:
Google
NET-SNMP Tutorial -- snmptranslate

NET-SNMP Tutorial -- snmptranslate

The snmptranslate tool is a very powerful tool that allows you to browse the MIB tree in various ways from the command line.

In its simplest form, it merely looks up an OID and spits it back out in textual form:


It can also translate into numerical results as well, by adding the -On flag to its options


Note that the argument passed can describe a OID in any fashion, and the -On flag merely toggles which type of output is displayed:


Note how the oid was abbreviated for you? You can change this behaviour as well with -Of:


The problem with the above commands is that you have to remember the entire OID for what you're looking for. Now, we wouldn't be a very good package if we didn't provide some sort of random-access lookup function right? Well, the good news is that we do. -IR nicely does this for us, and searches the MIB tree for the node you want:


Finally, it'll even try to do regex pattern matching to find the exact node you want given only a piece of its name by using the -Ib (best match) option:

To get a list of all the nodes that match a given pattern, use the -TB flag:

To get extended information about a mib node, use the -Td (description) flag:


Finally, last but certainly not least, if you want a pretty diagram of a section of the mib tree, check out the -Tp flag:


As a homework assignment, we'll leave it up to you to run snmptranslate -Tp without an oid argument, which prints the known MIB tree in its entirety.

Valid CSS!


Last modified: Thursday, 26-May-2011 23:21:32 UTC
For questions regarding web content and site functionality, please write to the net-snmp-users mail list.