Managing NerveCenter - Controlling NerveCenter from the Command Line - NerveCenter UNIX Shell/DOS Prompt Commands - trapgen -
Previous: serializedb     Next: NerveCenter Command Line Interface

trapgen

NAME

trapgen

SYNOPSIS


   trapgen [-v2c] [-p port] [-c community] destinationAddress enterprise {agentAddress|trapOID} [{genericTrapNumber specificTrapNumber}] timeStamp [variable type value...]

DESCRIPTION

Generates an SNMP-style trap for NerveCenter testing purposes.

OPTIONS

-p port

Port number to which the trap is being sent.

-c community

The community name for the agent sending the trap.

destinationAddress

Destination address for the trap. destinationAddress can be an IP address or a node's name.

enterprise

(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.

agentAddress

(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.

trapOID

(v2c only) A unique object identifier for the trap itself.

genericTrapNumber

(v1 only) One of the SNMP generic trap numbers (0-6).

specificTrapNumber

(v1 only) A particular enterprise-specific trap number. If not used, you should specify zero.

timeStamp

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.

variable

Name of variable. variable must be a valid OID in dot notation. A string is not acceptible.

type

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

Value of variable. Enclosing strings with quotes is optional.

EXAMPLES

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