snmptrapsend(1M) TCP/IP 5.4R3.00 snmptrapsend(1M)
NAME
snmptrapsend, trapsend - send SNMP trap message,
SYNOPSIS
snmptrapsend host community stdtrap|enterprise/specific [ object type
value ] ... [ port ]
where:
host is a hostname or Internet address
community is a community string
stdtrap is the name or number of a standard trap.
enterprise/specific is used to generate an enterprise specific trap.
object is an optional object ID
type is the data type of the optional object
value the value of the optional object
port is an optional UDP port number to send the trap to.
DESCRIPTION
Use the snmptrapsend command to send a trap message to a Network
Management Station. The management software running on host, will
use the community name to authenticate the sender of the message.
There are two different types of trap messages: standard and
enterprise specific. Standard traps are defined in RFC 1157.
Enterprise traps, may be defined by any organization, and are defined
in the organization's proprietary MIBs. The trap message may contain
a list of objects and "value of type" pairs. The MIBs define what
objects are expected for a specific type of trap.
Specify the host as either a hostname or an Internet address in dot-
notation.
Specify the community name as a text string to be used by the NMS to
authenticate the request.
Specify the trap as either an integer value, a standard trap name, or
in the format enterprise/specific for an enterprise trap. Legal
values for standard traps are: 0=coldStart, 1=warmStart, 2=linkDown,
3=linkUp, 4=authenticationFailure, 5=egpNeighborLoss, and
6=enterpriseSpecific. If the enterprise/specific format is used the
enterprise should be an Object ID representing the authority defining
the trap. The specific parameter is an integer value used for the
trap-specific field in the enterprise trap.
Specify the object as either an object identifier in dot-notation or
as an object descriptor using a text string.
Legal data types are:
-i value is integer type (e.g., 123)
-o value is octet string type in hexadecimal notation (e.g., "FF
EE 12")
-s value is display string type (e.g., "hello world")
Licensed material--property of copyright holder(s) 1
snmptrapsend(1M) TCP/IP 5.4R3.00 snmptrapsend(1M)
-D value is display string type (e.g., "hello world") (same as
-s)
-d value is object identifier type in dot notation (e.g.,
1.3.6.1.2.1.2)
-a value is Internet address type in dot notation (e.g.,
127.0.0.1)
-c value is counter type (e.g., 12345)
-g value is guage type (e.g., 12345)
-t value is time-tick type (e.g., 12345)
-N value is NULL.
EXAMPLE
In the following example snmptraprecv is used to demonstrate the trap
generated by snmptrapsend.
$ snmptraprecv &
$ snmptrapsend localhost public coldStart
Community: public
Enterprise: dataGeneral
Agent-addr: 128.222.8.3
Cold start trap.
Time Ticks: 0
This example demonstrates using snmptrapsend to generate an
enterprise specific trap and how to specify objects for the varbind
list.
$ snmptrapsend localhost public dataGeneral.1.2/108 ifDescr.0 -D "inen0"
Community: public
Enterprise: dgHwIdAviionHw
Agent-addr: 128.222.8.3
Enterprise Specific trap.
Enterprise Specific trap: 108
Time Ticks: 0
ifDescr.0 = inen0
DIAGNOSTICS
Exit status is 0 for success. Exit status is -1 if there are errors
parsing the command line. Traps are not acknowledged by the agent,
thus it is not possible to ensure their delivery.
SEE ALSO
snmpgetmany(1M), snmpgetnext(1M), snmpsetany(1M), snmptraprecv(1M),
snmpgettab(1M), snmpgetone(1M), snmpd(1M), snmpd.config(4M),
snmpdfiles(4M).
Licensed material--property of copyright holder(s) 2