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:
options hostname community objectID...
In other words, the command name is followed by a series of options,
the hostname of the system you want to poll, the community string,
and one or more object IDs. (Note that you can use the
-c community option instead of placing the
community string after the hostname. You can also provide a default
hostname in your
snmp.conf file.) The syntax of
snmpset is only slightly different; because
snmpset changes object values, it requires you to
specify the object’s datatype and the new value:
options hostname community objectID type value...
Table C-1 summarizes some of the most useful options that are common to all Net-SNMP commands. See the snmpcmd(1) manpage for a complete list.
Table C-1. Summary of Command-Line Options
which MIB modules you would like the command to load. If you want the
command to parse the MIB file for a particular vendor, copy the MIB