trap_recv(1M) TCP/IP 5.4.2 trap_recv(1M)
NAME
traprecv - receive SNMP trap messages
SYNOPSIS
traprecv [ -d ] [ port ]
where:
port is an optional UDP port number
DESCRIPTION
Use the traprecv command to receive Trap-PDUs from SNMP agents. The
command listens on UDP port number port for incoming traps and prints
information about them as they are received. If you do not specify a
port, traprecv will determine the port number using
getservbyname(3N) for "snmp-trap". Superuser access is required for
any port number less than 1024, including the default port of 162.
Use the -d option to print additional information about the packets
as they are received.
EXAMPLE
In the following example, traprecv is used to demonstrate the
trap generated by trapsend.
$ traprecv &
$ trapsend localhost public coldStart
Packet Dump:
30 32 02 01 00 04 06 70 75 62 6c 69 63 a4 25 06
09 2b 06 01 03 01 2a 2a 2a 2a 40 04 80 de 08 1e
02 01 00 02 01 00 43 01 00 30 09 30 07 06 03 29
01 01 05 00
Community: public
Enterprise: DataGeneral
Agent-addr: 127.0.0.1
Cold start trap.
Time Ticks: 0
Name: iso.1.1.1
Value: NULL
DIAGNOSTICS
Exit status of -1 is returned if there are command line errors or the
user does not have access to bind to the UDP port.
SEE ALSO
getmany(1M), getnext(1M), setany(1M), snmpd(1M), trapsend(1M),
getservbyname(3N), snmpd.communities(4M), snmpd.config(4M),
snmpd.trapcommunities(4M).
Licensed material--property of copyright holder(s) 1