The NetView SNMP command

To issue an SNMP request from NetView®, use the SNMP command. The SNMP command provides SNMP manager function with the NetView program to query SNMP agents for network management information.

The NetView SNMP command uses the SNMP Query Engine to issue SNMP requests to agents and to process SNMP responses returned by agents. The SNMP command supports issuance of SNMPv1 requests.

The SNMP command does not support the use of IPv6 addresses.

Note: The z/OS® Communications Server SNMP agent supports SNMPv1, SNMPv2c, and SNMPv3 requests.

Format

Getting MIB Variables:

Read syntax diagramSkip visual syntax diagram
>>-SNMP--+-Get------+--host_name--community_name---------------->
         '- GETNext '                              

   .----------.   
   V          |   
>----var_name-+------------------------------------------------><

Setting the MIB Variables:

Read syntax diagramSkip visual syntax diagram
                                        .-----------------.   
                                        V                 |   
>>-SNMP Set--host_name--community_name----var_name--value-+----><

Finding an ASN.1 Variable Name:

Read syntax diagramSkip visual syntax diagram
>>-SNMP MIBvname--asn.1 name-----------------------------------><

Forwarding Traps:

Read syntax diagramSkip visual syntax diagram
>>-SNMP TRAPson--net_mask--net_desired-------------------------><

Stop Forwarding Traps:

Read syntax diagramSkip visual syntax diagram
>>-SNMP TRAPSOFf--filter_id------------------------------------><

Pinging a Node:

Read syntax diagramSkip visual syntax diagram
>>-SNMP PING--host_name----------------------------------------><

Parameters

SNMP request types
Get
Sends a request to an SNMP agent for a specific management information base (MIB) variable.
GETNext
Sends a request to an SNMP agent for the next MIB variable that lexicographically follows the var_name specified.
Set
Sends a request to an SNMP agent to set a specific MIB variable.
MIBvname
Requests the textual name of an ASN.1 MIB object.
TRAPson
Requests that the SNMP Query Engine listen on the trap port for SNMP traps and forward them to the NetView program, which displays trap information when it occurs.
TRAPSOFf
Causes the SNMP Query Engine to stop listening on the trap port for SNMP traps and stop forwarding them to the NetView program.
PING
Obtains the minimum round-trip response time from the Query Engine to a specific node.
Variables
host_name
Specifies the destination host to which you want to send a request. The host can be specified with its name or with its IP address in dotted decimal notation.
community_name
Specifies the community name used to access the specified variables at the destination SNMP agent.
Note: Community names are case-sensitive. SNMP commands issued from the NetView console are converted to uppercase. Those issued from REXX execs are not converted to uppercase.
var_name
Specifies one or more MIB variable names to be retrieved or set. You can specify the textual names or ASN.1 notation (for example, sysDescr.0 or 1.3.6.1.2.1.1.1.0). The SNMP Query Engine can accept a maximum of 10 variables for each request.

All MIB variables that are defined as part of a sequence represent variables that can have more than one occurrence. These variables require an instance identifier appended to the end of the variable name to identify which occurrence of the variable is being requested.

value
Specifies the value to be set by the SET function. On the Set command from the NetView console, a value is enclosed in single quotation marks, not double quotation marks. From the panels, you can specify no quotation marks, single quotation marks (’), or double quotation marks (”). No quotation marks and single quotation marks work the same. If you specify double quotation marks, you get double quotation marks as part of the value.
asn.1_name
Specifies the MIB object, using its object identifier in ASN.1 notation. You can specify only one variable. Additional arguments are ignored.
net_mask
Specifies, in dotted decimal notation, the network mask to be evaluated with the IP address of incoming traps. The dotted decimal IP address is ANDed with this mask.
net_desired
Specifies the network from which you want to receive traps.
filter_id
Specifies the trap filter ID.

When you request traps using the SNMP TRAPSON command, it returns a request number or filter_id, which the SNMP Query Engine associates with the TRAPSON request. To stop receiving traps, specify this filter_id in the TRAPSOFF request.

Usage

Return codes

The following table lists the return codes generated by SNMP.
Return code Description
1 Error from DSIGET, cannot continue
2 Incorrect function specified
3 Missing SNMP function
4 Not enough parameters
5 Missing variable name
6 Missing variable value
7 Missing or incorrect host name
8 Missing community name
9 SNMPIUCV not active
10 Error from DSIMQS
11 Incorrect net_mask⁄desired network
12 Missing⁄Incorrect trap filter_id
1001+ Command successful — all return codes above 1000

Examples

Usage

Context

For information about the variable ibmMvsRPingResponseTime, which enables you to send remote PING commands, see SNMP remote PING.

For a list of variables supported by the z/OS Communications Server IP agent, see Management Information Base (MIB) objects.