Skip navigation.

WebLogic Server Command Reference

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents Index View as PDF   Get Adobe Reader

 


snmptrapd

Starts a daemon that receives traps and prints information about the trap.

Syntax

java snmptrapd [-d] [-c snmpCommunity] [-p TrapDestinationPort]

Argument

Definition

-c snmpCommunity

Specifies that community name that the SNMP agent (or snmpv1trap command) used to generate the trap.

If you do not specify a value, the command assumes -c public.

-p TrapDestinationPort

Specifies the port number on which the trap daemon receives traps.

If you do not specify a value, the command assumes -p 162.


 

Example

The following command starts a trap daemon and instructs it to listen for requests on port 165. The daemon runs in the shell until you kill the process or exit the shell:

java snmptrapd -p 165

If the command succeeds, the trap daemon returns a blank line with a cursor. The trap daemon waits in this state until it receives a trap, at which point it prints the trap.

Example: Sending Traps to the Trap Daemon

To generate WebLogic Server traps and receive them through the trap daemon:

  1. Open a command prompt (shell) and invoke the following script:
  2. WL_HOME\server\bin\setWLSEnv.sh (or setWLSEnv.cmd on Windows)
    where WL_HOME is the directory in which you installed WebLogic Server.

  3. To start the trap daemon, enter the following command:
  4. java snmptrapd

  5. Open another shell and invoke the following script:
  6. WL_HOME\server\bin\setWLSEnv.sh (or setWLSEnv.cmd on Windows)

  7. To generate a trap, enter the following command:
  8. java snmpv1trap localhost .1.3.6.1.4.140.625 localhost 6 60 1000

The snmpv1trap command generates a serverStart Trap and broadcasts it through port 162.

In the shell in which the trap daemon is running, the daemon prints the following:

Trap received from: /127.0.0.1, community: public
Enterprise: .1.3.6.1.4.140.625
Agent: /127.0.0.1
TRAP_TYPE: 6
SPECIFIC NUMBER: 60
Time: 1000
VARBINDS:

 

Back to Top Previous Next