HPlogo HP SNMP/XL User's Guide: HP 3000 MPE/iX Computer Systems > Chapter 3 Using SNMPUTIL

SNMP Command Files

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

The following is a list of the command files provided for the HP SNMP/XL subsystem that perform the following operations:

Command File

Operation

snmpget

Sends an SNMP get request to the specified node to retrieve specific management information.

snmpnext

Sends an SNMP get next request to the next specified node.

snmpset

Sends an SNMP set request to the specified node.

snmptrap

Generates an SNMP trap and sends it to the configured management stations. This is used to report extraordinary events.

snmpwalk

Sends an SNMP get next request from the specified starting point (usually a group name), through the MIB names until the end of the MIB group is reached.

The format of the variable-name parameters for these commands are described in Appendix A “SNMP Variable Description”

In order to execute the SNMP commands, either include NET.SYS in the HPPATH variable (see setvar in MPE/iX Commands Manual.)

setvar HPPATH "!hppath,net.sys"

or execute the command with full path name.

SNMPxxxx.NET.SYS

NOTE: Although SNMP starts up and shuts down automatically when the network is started or shut down, you can manually start or stop SNMP using SNMPUTIL. The user interface for these commands changes if the network is down and you are trying to execute one of these commands to query the local SNMP agent. (This is true of all the CI commands listed above except SNMPTRAP.) If the network is down, the second field in these commands must have a value of 0. This sends the request to the agent on the machine that you are running the command on. For example if the network is down the following requests are rejected:
snmpget perseus public system.sysDescr.0 snmpget 15.13.104.133 public system.sysDescr.0 snmpget wabbit public system.sysDescr.0

An example of an accepted value might look like this:

snmpget 0 public system.sysDescr.0

SNMPGET

The SNMPGET command is used to query a node using SNMP GetRequests.

SNMPGET NODE
                  COMMUNITY
                  VARIABLE
                  [VARIABLE...]

Parameters

NODE

This is a required parameter. It specifies the network element that is to be the target of the SNMP GetRequest. This parameter can either be a fully qualified IP address or a valid host name that is found in the hosts database. If 0 is specified, the request is sent to the local host.

COMMUNITY

This is a required parameter. It defines the SNMP community name that is used in the SNMP GetRequest. If 0 is specified, the community name defaults to public.

VARIABLE

This is a required parameter. This command accepts 1-20 fully qualified object identifiers as arguments. Each variable has the format of A.B.C.D..., where A, B, C, and D are subidentifiers in decimal notation.

Description

SNMPGET is an SNMP application that uses the GetRequest to query for information on a node. The response to the SNMP GetRequest is then formatted and returned.

Examples

The following example retrieves the system description object from the node called MPENODE.

MPEXL: snmpget mpenode public 1.1.0
Name: system.sysDescr.0
Octet String: HP3000 SERIES 925, MPE XL version B.31.00 NS Transport version B.
04.00
MPE XL:

SNMPNEXT

The SNMPNEXT command is used to query a node using SNMP GetNextRequests.

SNMPNEXT NODE
                     COMMUNITY
                     VARIABLE
                     [VARIABLE...]

Parameters

NODE

This is a required parameter. It specifies the network element that is to be the target of the SNMP GetNextRequest. This parameter can either be a fully qualified IP address or a valid host name that is found in the hosts database. If 0 is specified, the request is sent to the local host.

COMMUNITY

This is a required parameter. It defines the SNMP community name that is used in the SNMP GetNextRequest. If 0 is specified, the community name defaults to public.

VARIABLE

This is a required parameter. This command accepts 1 to 20 fully qualified object identifiers as arguments. Each variable has the format of A.B.C.D..., where A, B, C, and D are subidentifiers in decimal notation.

Description

SNMPNEXT is an SNMP application that uses the GetNetRequest to query for information on a node. The response to the SNMP get request is then formatted and returned.

Examples

The first example retrieves the next object after the object described by 1.1.0.

The second example retrieves the same object but uses the symbolic name for the variable parameter.

MPEXL: snmpnext mpenode public 1.1.0
Name: system.sysObjectID.0
Object Identifier: .iso.org.dod.internet.private.enterprises.hp.nm.system.mpe_xl.2
MPEXL:
MPEXL: SNMPNEXT SLNODE1 PUBLIC SYSTEM.SYSCONTACT.0
system.sysName.0 : DISPLAY STRING- : xlnode1.domain.org
MPEXL:

SNMPSET

The SNMPSET command is used to send an SNMP SetRequest to a node.

SNMPSET NODE
                 COMMUNITY
                 [VARIABLE
                  TYPE
                  VALUE...]

Parameters

NODE

This is a required parameter. It specifies the network element that is to be the target of the SNMP SetRequest. This parameter can either be a fully qualified IP address or a valid host name that is found in the hosts database. If 0 is specified, the request is sent to the local host.

COMMUNITY

This is a required parameter. It defines the SNMP community name that is used in the SNMP SetRequest. If 0 is specified, the community name defaults to public.

VARIABLE

This is a required parameter. This command accepts 1 to 10 fully qualified object identifiers as arguments. Each variable has the format of A.B.C.D..., where A, B, C, and D are subidentifiers in decimal notation.

TYPE

This is a required parameter which is paired up with a variable and value. The type parameter must be one of the following:

Integer, OctetString, ObjectIdentifier, Null, IpAddress, Counter, Gauge, TimeTicks, or Opaque.

VALUE

This is a required parameter. It defines the new value for the variable specified. The value must be valid for the type specified.

Description

SNMPSET is an SNMP command that is used to send a SetRequest to an SNMP agent and allows for certain MIB variables to be modified. It is used to update the configuration file and IP address. This means that a trap is sent to this managed node.

Example

The following example sets the system contact to "Bob Jones" for the node xlnode using the SNMP community name public.

MPEXL: snmpset xlnode public system.syscontact.0
               Octetstring " 'Bob Jones' "
               Name: system.sysContact.0
Display String: Bob Jones
MPEXL:

SNMPWALK

The SNMPWALK command is used to retrieve particular groups of the MIB from a remote node or possibly the entire MIB. This command uses the SNMP GetNextRequest to "walk" through the MIB.

SNMPWALK NODE
                      COMMUNITY
                      [VARIABLE]

Parameters

NODE

This is a required parameter. It specifies the network element that is to be the target of the SNMP Walk request. This parameter can either be a fully qualified IP address or a valid host name that is found in the hosts database. If 0 is specified, the request is sent to the local host.

COMMUNITY

This is a required parameter. It defines the SNMP community name that is used in the SNMP Walk request. If 0 is specified, the community name defaults to public.

VARIABLE

This is an optional parameter. If it is not specified, the walk operation begins at the top of the internet management MIB (.iso.org.dod.internet.mgmt.mib). If the parameter is specified, it must be a fully qualified object identifier. The variable has the format of A.B.C.D..., where A, B, C, and D are subidentifiers in decimal notation.

Description

SNMPWALK is an SNMP application that uses the GetNextRequest to query for a subtree of information about a node. All variables in the subtree below the given mib-group-name are queried and their values presented.

Example

The following example walks through the system group of the MIB.

MPEXL: snmpwalk mpenode public system
Name: system.sysDescr.0
Octet String: HP3000 SERIES 925, MPE XL version B.31.00 NS Transport version B.
04.00
Name: system.sysObjectID.0
Object Identifier: .iso.org.dod.internet.private.enterprises.hp.nm.system.mpe_xl.2
Name: system.sysUpTime.0
Timeticks: (319338799) 3 days, 16:43:07
Name: system.sysContact.0
Display String: John Smith
Name: system.sysName.0
Display String: mpenode.domain.organization
Name: system.sysLocation.0
Display String: in Cupertino, Building 43U Pillar N4
Name: system.sysServices.0
Integer: 72
MPEXL:

SNMPTRAP

The SNMPTRAP command is used to send a SNMP Trap to a remote node which in most cases is a management node.

SNMPTRAP NODE
                     COMMUNITY
                     ENTERPRISE
                     AGENT_ADDR
                     GENERIC_TRAP
                     SPECIFIC_TRAP
                     TIME_STAMP
                     [VARIABLE
                      TYPE
                      VALUE..]

Parameters

NODE

This is a required parameter. It specifies the network element that is to be the target of the SNMP Trap. This parameter can either be a fully qualified IP address or a valid host name that is found in the hosts database. If you specify 0 the trap is broadcast to all registered managers.

COMMUNITY

This is a required parameter. It defines the SNMP community name that is used in the SNMP Trap request. If 0 is specified, the community name defaults to public.

ENTERPRISE

This is a required parameter. The enterprise name is an object identifier that defines the entity generating the SNMP trap. If you wish, this parameter can be set to 0, and the command inserts the enterprise value for the system where the trap is generated.

AGENT_ADDR

This is a required parameter. It defines the IP address of the node where the trap actually originated. This parameter can be an IP address in dot notation or a host name that is in the hosts database. If you wish, this parameter can be set to 0, and the IP address of the current node is used.

GENERIC_TRAP

This is a required parameter. The generic_trap must be a number between 1 and 6 where:

SPECIFIC_TRAP
1 — warmStart
2 — linkDown
3 — linkUp
4 — authentificationFailure
5 — egpNeighborLoss
6 — enterpriseSpecific

This is a required parameter. When the generic_trap value is 6, this value is used to further define the trap that has occurred. This parameter must be a positive number.

TIME_STAMP

This is a required parameter. This parameter defines the number of TimeTicks since the network entity has been restarted. If you set this value to 0, the time_stamp is computed by the SNMPTRAP command.

VARIABLE

This is an optional parameter. This command accepts 0 to 5 fully qualified object identifiers as arguments. Each variable has the format of A.B.C.D..., where A, B, C, and D are subidentifiers in decimal notation.

TYPE

This is an optional parameter which is paired up with a variable and value. The type parameter must be one of the following:

Integer, OctetString, ObjectIdentifier, Null, IpAddress, Counter, Gauge, TimeTicks, or Opaque.

For a complete description of each type, refer to RFC 1155.

VALUE

This is an optional parameter. It defines the new value for the variable specified. The value must be valid for the type specified.

Description

SNMPTRAP allows you to generate a trap to a single node in the network or a trap that is routed to each of the management stations that are listed in the trap-destination list in the SNMP configuration file.

This command requires PM and DI capabilities, in addition to the normal NM capability required for all of the SNMP command set.

Example

The following example sends a linkUp trap to node xlnode2 from xlnode1 with the default enterprise name and time_stamp.

MPEXL: snmptrap 0 public 0 192.1.27.63 6 1234 0
The snmp trap was successfully sent (SNMPINFO 1813)
MPEXL:
Feedback to webmaster