The commands trap_send (see trap_send(ADMN)) and trap_rece (see trap_rece(ADMN)) provide a means of testing the trap delivery mechanism.
The command trap_rece starts a daemon that displays, to
standard output, information about SNMP traps received at
the host on which it is running.
It must be run with root permissions.
Its syntax is:
When run with the -d option, trap_rece includes a packet dump in the output display.
A typical use for this command is to test whether an agent is successfully transmitting traps to a specific host. For such a test, include the host in the /etc/snmpd.trap configuration file that the agent uses to determine trap recipients. Start trap_rece on the host intended to receive the trap messages. Start the agent and verify that the intended host received a cold-start trap message.
The command trap_send sends SNMP traps to
Its primary purpose is to test whether a management application is
successfully receiving traps.
Its syntax is:
trap_send ip_address community generic_trap_type [ enterprise_specific_trap_type ]
The argument generic_trap_type is an integer that specifies the type of trap to be generated and sent. The table ``Generic trap type values'' shows the list of legal values for generic_trap_type.
Generic trap type values
Currently, the SNMP Agent can generate the coldStart and authenticationFailure traps. The coldStart trap is generated when the SNMP Agent starts. The authenticationFailure trap is generated when authentication of the community name fails.