Issues Simple Network Management Protocol (SNMP) requests to agents and processes SNMP responses returned by agents.
cl_snmp [-com][-debug Level] [-host TargetHost] [-timeout TimeoutValue] [-retry RetryNumber] [-max MaxRepetitions] [-file ConfigurationFile] [-port PortNumber] [-verbose ] [-non NonRepeaters] Function [MIBvariable][VariableType][Value][...]]
Use the cl_snmp command to issue SNMP requests to agents and to process SNMP responses returned by agents. The Virtual I/O Server cl_snmp command can be used for SNMPv1, SNMPv2c, and SNMPv3 requests.
Flag name | Description |
---|---|
-com | Specifies the community name used to access
the specified variables at the destination SNMP agent. If you do not
specify a community name, the default name is public. Community names
are not required when using the user-based security model. Note: Community
names are case sensitive.
|
-debug Level | Specifies a debugging level during run time. The default is 0. The higher the debugging level, the greater the number of messages that are displayed. The levels can be from 0 through 4. |
-host TargetHost | Specifies the target host to which you want to send a request. This can be an Internet protocol address, a host name, or a winSNMP name in the clsnmp.conf configuration file. If you do not specify a host, the default is the local host. |
-timeout TimeoutValue | Specifies the amount of time (in seconds) that the cl_snmp command waits for a reply from the SNMP agent. The default is 3. |
-retry RetryNumber | Specifies the maximum number of times to retry the command if it timed out. The default is 2. |
-max MaxRepetitions | Specifies the number of lexicographic successors to be returned for each variable binding pair after the first -non number successors. The parameter applies only to the getbulk request. This is ignored if the function request is not a getbulk request. For example, starting with successor -non number+1, return -max number of successors for each variable binding pair. The default is 10. |
-file ConfigurationFile | Specifies the full path and file name of the configuration file. |
-port PortNumber | Specifies the number of the port that listens for traps. If a port number is not specified, the cl_snmp trap function listens on the well-known port 162, which is the default port for cl_snmp traps. |
-verbose | Specifies that the output from a request should be displayed using verbose output, for example, using the textual name instead of the MIB object identifier. |
-non NonRepeaters | Specifies the number of variable binding pairs (name/value), starting with the first, for which only a single successor is returned. This parameter applies only to getbulk requests. This is ignored if the function request is not a getbulk request. The default is 0. |
Function [MIBvariable] [VariableType] [Value] [...]] | Specifies the SNMP function or operation to
perform, which is one of the following:
|
Request Type name | Description |
---|---|
findname | Sends a request that a search be done to obtain the textual name, for a given MIBVariable input, whose internal ASN.1 value best matches the input ASN.1 value. The search first checks the /etc/mib.defs file, and if a matching textual name is not found, it continues with the compiled management information base (MIB). Only one MIBVariable is allowed per cl_snmp findname invocation. |
get | Sends a request to an SNMP agent for a specific MIB variable. The cl_snmp command then waits for a response or times out. |
getbulk | Obtains the value of the variables in the MIB tree specified by the object identifier (OID) or MIB variable name. A single getbulk performs the same function as a series of getnext commands, with fewer data exchanges between the cl_snmp command and the SNMP agent. |
getnext | Sends a request to an SNMP agent for the next MIB variable that lexicographically follows the MIBVariable specified. The cl_snmp command then waits for a response or times out. |
set | Sends a request to an SNMP agent to set a specific MIBVariable. The cl_snmp command then waits for a response or times out. |
trap | Listens for SNMP traps and displays trap information when they occur. Uses the default, well-known port 162 or the port number specified on the -port option. The cl_snmp trap function continues to listen for traps until the process is killed or canceled. |
walk | Issues a getnext request for a specified prefix, then continues to issue getnext requests for as long as there are variables that match the specified prefix. A prefix can be any leading portion of the complete object identifier. |
cl_snmp -host hostname get sysName.0