Name

nnmsnmpwalk.ovpl — Query a node using SNMP GET or GETNEXT requests

SYNOPSIS

nnmsnmpwalk.ovpl -u user_name -p passwd [options] node object-id

nnmsnmpget.ovpl -u user_name -p passwd [options] node object-id [,object-id]...

nnmsnmpnext.ovpl -u user_name -p passwd [options] node object-id [,object-id]...

options: [-d] [-v version] [-c community] [-port port(default:161)] [-t timeout(default:5000)] [-r retries(default:1)] [-T] [-pp Proxy Port] [-pa Proxy Address] [-a Authentication Protocol] [-A Authentication Pass phrase] [-x Privacy Protocol] [-X Privacy Passphrase] [-N Context Name] [-oen OID and Output Encoding] [-oex OIDs that are not encoded] [-v3u SNMPv3 user name] [-jndiHost hostname] [-jndiPort port Default is 1099]

DESCRIPTION

The nnmsnmpwalk.ovpl script sends repeated SNMP GETNEXT requests to retrieve values for all instances of MIB objects registered on node node. The nnmsnmpwalk.ovpl script determines whether to use SNMP Version 1 or Community-based SNMP Version 2 (SNMPv2c) or version 3, based on the value supplied for the -v option and the type of remote node. If you do not specify a variable, the nnmsnmpwalk.ovpl script retrieves all values beneath object.iso.org. If you do supply a variable, the variable's value determines the starting point in the object identifier space that is searched. For example, the nnmsnmpwalk.ovpl script retrieves the entire system group if you supply .1.3.6.1.2.1.1.1. as a variable value. The nnmsnmpwalk.ovpl script terminates when all object information beneath the specified variable has been returned.

The nnmsnmpget.ovpl script uses the SNMP Get request to query node for information.

Normally an SNMP instance number needs to be appended, such as using .0 in .1.3.6.1.2.1.1.1.0 to get the system.sysDescr.0 value).

The nnmsnmpnext.ovpl script performs the same action as the nnmsnmpwalk.ovpl script, except that the nnmsnmpnext.ovpl script only returns a single value.

node can be an IP-addressable system that supports SNMP, or a target name for which an SNMP proxy configuration is defined. You can identify IP nodes by Internet address or hostname.

You might supply one or more variables as arguments to any of these scripts. Each variable is an object identifier in dotted decimal format or mnemonic name. If you plan to specify the variables by mnemonic name, use the nnmloadmib.ovpl script to load the MIB that defines the object identifier before using this method.

If you attempt to search beyond the end of the remote node's MIB with either the nnmsnmpwalk.ovpl or nnmsnmpnext.ovpl scripts, the scripts display an End of MIB message.

Only users who belong to System, Administrator or Web Service Client roles can run these scripts. Users who are in Level1, Level2 or Guest roles cannot run these commands.

Options

-d

Dumps all SNMP packets to standard output in a hexadecimal and decoded ASN.1 format.

-v version

Requests the script to use a specific version of SNMP to communicate with the remote node. Valid choices for version are 1, 2c, or 3.

If you do not specify the version, the script uses 2c as the default for nodes not in the topology.

-c community

Specifies the community string to use for authentication on the remote node.

Note: If the community string contains characters the shell interferes with, use one or more escape symbols or quotation marks as required.

-port port

Specifies the port to use in communication with the remote node.

-t timeout

Specifies a timeout period, in milliseconds, for communication with the remote node.

-r retries

Specifies the number of retries to use for communication with the remote node.

-T

Prints the OID in dotted decimal format and the MIB variable value with no textual conventions applied.

-pp Proxy Port

Specifies the Proxy Port to use in communication with the node

-pa Proxy Address

Specifies the Proxy IP Address to use in communication with the node

-a Authentication Protocol

SNMPv3 Authentication Protocol (MD5|SHA)

-A Authentication Passphrase

SNMPv3 Authentication Passphrase

-x Privacy Protocol

SNMPv3 Privacy Protocol (DES|3DES|AES|AES192|AES256)

-X Privacy Passphrase

SNMPv3 Privacy Passphrase

-N context

SNMPv3 Context Name (for example, vlan1)

-oen <OID>:<encoding>

OID and Output Encoding.

The output shows the encoded string for the octet string of the collected MIB only if that octet string is encoded as provided. The command shows hexa-decimal strings, In case octet strings are not encoded by specified encoding.

-oex <OID1,OID2,...>

OIDs that are not encoded

Specifies OID that is excluded from the encoding target. The OID specified by this option is not encoded and printed as hexa-decimal.

-v3u SNMPv3 user name

SNMPv3 security name (for example, testV3user)

-u <username>

Supply the NNMi administrator username to run the script. This script requires the NNMi administrator username unless you use an nnm.properties file. See the nnm.properties.4 reference page for more information.

-p <password>

Supply the NNMi administrator password to run the script. This script requires the NNMi administrator password unless you use an nnm.properties file. See the nnm.properties.4 reference page for more information.

-jndiHost<jndiHost>

The hostname of the server running the jboss application server. If you do not specify a hostname, the nnmcommload.ovpl script uses localhost as the default value.

-jndiPort<jndiPort>

The jboss application server port. If you do not specify this port, the nnmcommload.ovpl script uses 1099 as the default value.

If the nnmsnmpget.ovpl, nnmsnmpnext.ovpl, or nnmsnmpnnmsnmpwalk.ovpl scripts do not receive a response, a linear backoff algorithm based on the timeout and retries arguments is used to resend the SNMP request. For example, if the timeout argument is 2000 (two seconds) and the retries argument is 3, the initial request would time out after two seconds, the first retry would time out after four seconds, the second retry would time out after six seconds, and the last retry would time out after eight seconds. The nnmsnmpget.ovpl, nnmsnmpnext.opvl, and nnmsnmpwalk.ovpl scripts require additional time to resolve the configuration.

EXAMPLES

The following script usage requests the system subtree for the node testnode:

nnmsnmpwalk.ovpl testnode system

Output for the above command typically resembles the following:


      nnmsnmpwalk.ovpl -c community 10.97.1.7 .1.3.6.1.2.1.1
      .1.3.6.1.2.1.1.1.0: ASN_OCTET_STR = Ethernet Switch 470-24T-PWR
      .1.3.6.1.2.1.1.2.0: ASN_OBJECT_ID = .1.3.6.1.4.1.45.3.63.1
      .1.3.6.1.2.1.1.3.0: ASN_TIMETICKS = 63050579
      .1.3.6.1.2.1.1.4.0: ASN_OCTET_STR = Bob Jones 933-558-3453
      .1.3.6.1.2.1.1.5.0: ASN_OCTET_STR = wr3-2-front-storage-n91-60-2
      .1.3.6.1.2.1.1.6.0: ASN_OCTET_STR = Woods Run 3 2nd floor
      .1.3.6.1.2.1.1.7.0: ASN_INTEGER = 3      
      

The following example shows the usage of the option -oen and -oex for node 192.168.50.1

nnmsnmpwalk.ovpl -v 2c -c public -oen .1.3.6.1.2.1.1.4:shift-jis 192.168.50.1 .1.3.6.1.2.1.1

The output shows shift-jis encoded strings for the octet string of the collected MIB only if that octet string is valid shift-jis.In case the octet string is not encoded by specified encoding, the command output shows hexa-decimal strings.

nnmsnmpwalk.ovpl -v 2c -c public -oen .1.3.6.1.2.1.1.4:shift-jis -oex .1.3.6.1.2.1.1.4.0 192.168.50.1 .1.3.6.1.2.1.1

The output shows the returned MIB value for the .1.3.6.1.2.1.1 and the shift-jis encoded characters for the hexa-decimal values which are children of the 1.3.6.1.2.1.1.4 except for the 1.3.6.1.2.1.1.4.0

AUTHOR

nnmsnmpwalk.ovpl, nnmsnmpget.ovpl, and nnmsnmpnext.ovpl were developed by Hewlett Packard Enterprise.

FILES

Windows: %NNM_BIN%\nnmsnmpwalk.ovpl

Windows: %NNM_BIN%\nnmsnmpget.ovpl

Windows: %NNM_BIN%\nnmsnmpnext.ovpl

UNIX: $NNM_BIN/nnmsnmpwalk.ovpl

UNIX: $NNM_BIN/nnmsnmpget.ovpl

UNIX: $NNM_BIN/nnmsnmpnext.ovpl

For information about universal paths for your platform and shell, see the nnm.envvars(1) reference page.

SEE ALSO

nnmsnmpset.ovpl(1M), nnmsnmpbulk.ovpl(1M), nnmsnmpnotify.ovpl(1M).

RFC 1155, 1157, 1212: SNMP Version 1.

RFC 1901 - 1908, 2576, 2578, 3416 - 3418: SNMP Version 2.

RFC 3411 - 3415: SNMP Version 3.

EXTERNAL INFLUENCES

Environmental Variables

$LANG determines the language in which messages appear. If $LANG is not specified or is set to an empty string, a default of C is used instead of $LANG. If any internationalization variable contains an invalid setting, nnmsnmpget.ovpl behaves as if all internationalization variables are set to C.

International Code Set Support

Supports single-byte and multiple-byte character code sets.

NOTE: SNMP MIB values of the type DISPLAY STRING are restricted to NVT-ASCII.

Return to Reference Pages Index