snmpGet command
snmpGet command retrieves information in agents using SNMP protocol.
- Source dataLoad.env -i <Instance Number>:
- snmpGet <OPTIONS>.snmpGet <OPTIONS> -n <COLLECTOR_ID>.OR
SYNOPSIS
snmpGet <target> <oid> [-m <mibs>] [-c <readCommunity>] [-t <timeout>] [-r <tries>]
[-F {RAW|CLEAN|MIMIC}]
[-D <debugLevel>] {-all | -n <collNumber> | [-S <server> [-P <port>]]} [-?] [--version]
Options
Option | Description |
---|---|
<target> | This is the IP address or the name of the SNMP device. |
<oid> | This is either the dotted form of the oid, or the name.instance of the oid to read. The <oid> can contains star character '*', in this case GetNext will be used instead of Get to retrieve content of a complete table. Several <oid> can be repeated in the command, and they will all be retrieved in the same PDU whenever possible. |
-m <mibs> | The compiled Mib file name that contains the definition for the required oid. This is a .oid file, without path. The file is expected to be found in the SNMP dataload's mibs/oid directory. |
-c <readCommunity> | The read community to use to perform the action if different from the default read community configured in SNMP_CONF for that device. |
-t <timeout> | The SNMP timeout to use. Default value is defined in theSNMP_CONF for that device |
-r <tries> | The number of SNMP tries to use (1 or more). Default value is defined in the SNMP_CONF for that device |
-F {RAW|CLEAN|MIMIC|PROVISO} | The output format for the OIDs. |
-D <debugLevel> | <debugLevel> is a number between 0 and 6. 0 represents no debug, 6 is the most verbose. |
-sim <simulationFile> | <simulationFile> is a file, on the collector machine, that is used in place of the remote SNMP agent. This file can be obtained using a -f PROVISO on the snmpGet command. |
-all | All SNMP dataload currently running in the system will receive the request. |
-n <collectoNumber> | The request will only be sent to SNMP dataload process running collection set number <collectoNumber>. |
-S <serverName> | <serverName> is the name of the machine that hosts a specific SNMP dataload. If this switch is not defined, 'localhost' is assumed. |
-P <portNumber> | <portNumber> is the listening port number of the SNMP dataload. If this switch is not defined, the value of the DL_ADMIN_TCP_PORT environment variable will be used. If the environment variable is not defined, 3002 is assumed. If none of the -all, -n, -S and -P switches are specified, then localhost:3002 will be assumed. |
-? | Display this usage page. |
--version | Display copyright and version information. |
- Examples
- Get the number of network interfaces on localhost using default
community name: snmpGet localhost ifNumber.0 -m rfc1213-MIB-II.oid
- Get the names of all network interfaces on localhost using default
community name: snmpGet localhost ifDescr.* -m rfc1213-MIB-II.oid
- Get the contact and location information of an IPv6 device using
SNMPv3 credentials:
snmpGet 2001:4860:800f::67 sysContact.0 sysLocation.0 -c "&V3,AccessMode=Auth-MD5-Priv-DES,SecurityName=userdes, AuthPasswd=1234567890abcdef,PrivPasswd=1234567890abcdef"
- Get the number of network interfaces on localhost using default
community name: