GNU/Linux |
RedHat 5.2(Apollo) |
|
![]() |
snmpcmd(1) |
![]() |
snmpcmd - commmands to communicate with a network entity using SNMP Requests.
snmpcmd [-h|-V] [-R] [-f|-s|-S] [-q] [-d] [-D] [-m mibs] [-M mibdirs] [-r retries] [-t timeout] [-p port] [-v [ 1 | 2c | 2p ] ] [-c srcclock dstclock] agent [community | srcparty dstparty context | noauth] commandparams
This manual page describes the common part of the parameters for the SNMP commands: snmpget, snmpgetnext, snmpset, snmpbulkwalk, snmpwalk, snmpdelta, snmptable, snmptrap. The command line applications uses the SNMP protocol to communicate with an SNMP capable network entity, an agent. The applications all have some specific options and arguments that are specified after the common part specified here.
-h |
prints the applications help message | ||
-V |
prints the applications version string | ||
-R |
requests random access to the MIB symbol table. See RANDOM ACCESS MIB below. | ||
-f |
requests full object identifiers on output. system.sysDescr.0 will be printed as .iso.org.dod.internet.mgmt.mib-2.system.sysDescr.0 | ||
-s |
request that object identifiers on output uses "suffix only", that is, only the last symbolic part is printed. For example, interfaces.iftable.ifentry.ifindex.1 will just show up as ifindex.1 | ||
-S |
request object identifiers with suffix and MIB name. interfaces.iftable.ifentry.ifindex.1 will show up as IF-MIB:ifindex.1 | ||
-q |
request a "quick print" output format, that also is easier to parse for programs |
-m mibs
specifies a colon separated list of MIB modules to load for this application. The special name ALL is used to specify all modules in all directories. This overrides the environment variable MIBS.
-M mibdirs
specifies a colon separated list of directories to search for MIBs. This overrides the environment variable MIBDIRS.
-d |
request the application to dump all SNMP packets send and received | ||
-D |
request debugging output |
-r retries
specifies the number of retries to be used in the requests. The default is 5
-t timeout
specifies the timeout between retries. The default is 1
-p port
specifies the port to communicate with at the agent. The default is 161, except for snmptrap, which defaults to 162.
-v 1 | 2c | 2p
specifies the protocol version to use: 1 (RFC 1155-1157), 2c (RFC 1901-1908) or 2p (RFC 1441-1452). The default is -v 1
-c srcclock dstclock
sets the clock values to be used for authenticated SNMP v2p messages
The hostname specification may be either a host name or an internet address specified in "dot notation".
The version 1, or version 2c, community specifies the community name for the transaction with the remote system.
The version 2p srcParty, dstParty, and context specify the party and context names for the transaction with the remote system, as they are defined in PREFIX/share/snmp/party.conf. To forgo authentication, use the noAuth keyword instead of specifying party names.
Normally, an object identifier such as system.sysDescr.0 will be lookup in a single "wellknown" place, built into the SNMP library (or specified by the PREFIX environment variable). The standard place is: .iso.org.dod.internet.mgmt.mib-2. The identifier may alternatively be a complete object identifier, this is designated by a leading "dot". To simplify the specification of object identifiers the library supports random access to the identifiers in the MIBs. This is requested by the -R option to the SNMP applications. Using this, system.sysDescr.0 may also be entered as sysDescr.0. To search only a single MIB for the identifier (if it appears in more than one), specify it as SNMPv2-MIB:sysDescr.0. This notation will also make sure that the specified MIB is loaded, i.e. it need not be mentioned in the -m option (or MIBS environment variable).
PREFIX |
The standard prefix for object identifiers. Defaults to .iso.org.dod.internet.mgmt.mib-2 | ||
MIBS |
The list of MIBs to load. Defaults to SNMPv2-TC:SNMPv2-MIB:IF-MIB:IP-MIB:TCP-MIB:UDP-MIB:SNMP-VACM-MIB. Overridden by the -m option |
MIBDIRS
The list of directories to search for MIBs. Defaults to PREFIX/share/snmp/mibs. Overridden by the -M option
SUFFIX |
If this variable is set, the applications acts as if the -s option is specified. |
PREFIX/share/snmp/snmpd.conf
Agent configuration file. See snmpd.conf(5)
PREFIX/share/snmp/party.conf
PREFIX/share/snmp/context.conf
PREFIX/share/snmp/view.conf
PREFIX/share/snmp/acl.conf
SNMP v2p configuration files. Obsolete.
snmpget(1), snmpgetnext(1), snmpset(1), snmpbulkwalk(1), snmpwalk(1), snmptable(1), snmpdelta(1), snmptrap(1).
![]() |
snmpcmd(1) | ![]() |