O'Reilly logo

Essential SNMP, 2nd Edition by Kevin Schmidt, Douglas Mauro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix C. Net-SNMP Tools

This appendix provides brief summaries of the command-line tools included in Version 5.2.1 of the Net-SNMP package (available from http://net-snmp.sourceforge.net).

Instead of trying to describe all the options to all the commands, we’ve focused on those that are most important and useful. We have also pointed out a few cases in which the behavior of the commands differs from the behavior that’s described in the manual pages.

Net-SNMP and MIB Files

By default, Net-SNMP reads the MIB files in the directory /usr/local/share/snmp/mibs. When you install Net-SNMP, it populates this directory with a few dozen MIB files, including the UCD MIB (Net-SNMP used to be called UCD-SNMP) and the RFC 1213 MIB (MIB-II). Net-SNMP uses the MIB files to translate between numeric object IDs and their textual representations. The MIB files also give the tools access to information about each object (its syntax, the type of access allowed, its description, etc.). Adding a vendor-specific MIB file to Net-SNMP is as simple as placing it in the mibs directory and setting the environment variable $MIBS to ALL, as discussed in the next section.

Common Command-Line Arguments

For the most part, the Net-SNMP commands follow a similar command structure; they share many options and use roughly the same syntax. For example, in the abstract, an snmpget command looks like this:

    snmpget options hostname objectID...

In other words, the command name is followed by a series of options, the hostname ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required