Managing NerveCenter
-
Controlling NerveCenter from the Command Line - NerveCenter UNIX Shell/DOS Prompt Commands - trapgen -
trapgen [-v2c] [-p port] [-c community] destinationAddress enterprise
{agentAddress|trapOID} [{genericTrapNumber
specificTrapNumber}] timeStamp [variable type value...]
Generates an SNMP-style trap for NerveCenter testing purposes.
Port number to which the trap is being sent.
The community name for the agent sending the trap.
Destination address for the trap. destinationAddress can be an IP address or a node's name.
(v1 only) SNMP enterprise-specific trap number in dot notation (such as 1.3.6.1.4.1.9.1.3) that identifies the agent sending the trap. You can specify a null value ("") for enterprise.
(v1 only) Agent sending the trap. destinationAddress can be an IP address or a node's name. You can specify a null value ("") for agentAddress.
(v2c only) A unique object identifier for the trap itself.
(v1 only) One of the SNMP generic trap numbers (0-6).
(v1 only) A particular enterprise-specific trap number. If not used, you should specify zero.
Time elapsed between the last (re)initialization of the entity and the generation of the trap in hundredths of seconds. Taken from the MIB-II object, system.sysUpTime
. You can specify a null value ("") for timeStamp.
Name of variable. variable must be a valid OID in dot notation. A string is not acceptible.
Type for variable. type can be one of the following: integer, octetstring, octetstringhex, octetstringoctal, octetstringascii, objectidentifier, null, ipaddress, counter, gauge, timeticks, opaque, opaquehex, opaqueoctal, or opaqueascii, counter 64 (v2c only), uint32 (v2c only).
Value of variable. Enclosing strings with quotes is optional.
Example 1: In the following example, Trapgen sends an generic SNMP v1 authentication failure trap from the NerveCenter Server Blueridge to itself:
trapgen blueridge "" blueridge 4 0 ""
enterprise and timeStamp are nulls ("") and specificTrapNumber is 0 since a trapgen is sending a generic trap.
Example2: In the following example, Trapgen sends to blueridge a v2c trap identified with a unique OID (1.3.6.1.2.1.1.1), from an agent (1.3.6.1.4.1.9.1.3) using a null timestamp:
trapgen -v2c blueridge 1.3.6.1.4.1.9.1.3 1.3.6.1.2.1.1.1 ""
Example 3: In this example, Trapgen sends to the node panama, a specific trap number (1000000) from $Node (a NerveCenter variable). The trap contains a varbind with a value of type octetstring.
trapgen panama 1.3.6.1.4.1.9.1.3 $Node 6 100000 1800
1.3.6.1.2.1.1.1 octetstring "Sun Sparcstation"
Example 4: In this example, Trapgen sends to the node 10.52.174.139, a specific trap number (110000) from the node poe. The trap contains two varbinds with a values of type timeticks and octetstring, respectively.
trapgen 10.52.174.139 1.3.6.1.4.1.9.1.3 poe 6 110000 900
1.3.6.1.2.1.1.3 timeticks 9875632 1.3.6.1.2.1.1.1 octetstring
"Cisco trouter"
Previous: serializedb | Next: NerveCenter Command Line Interface |
Please send comments or corrections to Information Development | This file was last updated on 14 November © 2002 |