How do I read the system description using NET-SNMP?

The command line for NET-SNMP is not as well documented as it might be. The following command line will read the system description from machine 10.0.0.50:

snmpget -v 2c -m ALL -M "c:\program files\openxtra basics\net-snmp\usr\bin" -c public 10.0.0.50 system.sysDescr.0

Repeating the same command options time and again can be tedious. The following environment variables can be set to reduce the size of the command line you need to type:

MIBS
Same as the -m command line option. Specify which MIBs you want to the tool to load (or ALL if you want it to load all available MIBs).

MIBDIRS
Same as the -M command line option. Specify where the MIBs will be loaded from. Multiple directories may be specified sperated by a semicolon (;).

You can set a local environment variable on the command prompt by typing in a command prompt:

set MIBS=ALL

or you can set up a global environment variable by going to the Control Panel/System Advanced tab and selecting Environment Variables tool. You may then specify a new environment variable either to be available to all users or as local to the current user.

In versions of OPENXTRA BASICS after version 2.0.0 the MIBS and MIBDIRS variables are set for you by the installer. If you add more MIBs you will either have to add the new directories to the MIBDIRS variable manually or add the new MIBs to the NET-SNMP MIB directory.