Required Environment for the SNMP Command-Line Interface Syntax and Common Arguments for the SNMP Command-Line Interface

4 WebLogic SNMP Agent Command-Line Reference Deprecated 4-1 4 WebLogic SNMP Agent Command-Line Reference Deprecated WebLogic Server can use Simple Network Management Protocol SNMP to communicate with enterprise-wide management systems. The WebLogic Server subsystem that gathers WebLogic management data managed objects, converts it to SNMP communication modules trap notifications, and forwards the trap notifications to third-party SNMP management systems is called the WebLogic SNMP agent. The WebLogic SNMP agent runs on the Administration Server and collects managed objects from all Managed Servers within a domain. The WebLogic SNMP agent provides a command-line interface that lets you: ■ Retrieve WebLogic Server managed objects. ■ Generate and receive WebLogic Server traps for testing purposes. The following sections describe working with the WebLogic SNMP agent through its command-line interface: ■ Section 4.1, Required Environment for the SNMP Command-Line Interface ■ Section 4.2, Syntax and Common Arguments for the SNMP Command-Line Interface ■ Section 4.3, Commands for Retrieving WebLogic Server Managed Objects ■ Section 4.4, Commands for Testing Traps For more information about using SNMP with WebLogic Server, see: ■ SNMP Management Guide for Oracle WebLogic Server ■ SNMP MIB ANS1 File zip

4.1 Required Environment for the SNMP Command-Line Interface

To set up your environment for the WebLogic SNMP agent command-line interface: 1. Install and configure the WebLogic Server software, as described in the Oracle WebLogic Server Installation Guide. Note: The command-line utility that this document describes is deprecated in WebLogic Server 10.0. Instead, use the command-line utility that is described in WebLogic SNMP Command-Line Utility in SNMP Management Guide for Oracle WebLogic Server. 4-2 Command Reference for Oracle WebLogic Server 2. If you want to retrieve WebLogic Server managed objects, enable the WebLogic SNMP agent as described in Use SNMP to monitor WebLogic Server in the Oracle WebLogic Server Administration Console Help. 3. Open a command prompt shell and invoke the following script: WL_HOME \server\bin\setWLSEnv.sh or setWLSEnv.cmd on Windows where WL_HOME is the directory in which you installed WebLogic Server. The script adds a supported JDK to the shells PATH environment variable and adds WebLogic Server classes to the CLASSPATH variable.

4.2 Syntax and Common Arguments for the SNMP Command-Line Interface

All WebLogic SNMP agent commands take the following form: java command-name arguments Table 4–1 describes arguments that are common to most WebLogic SNMP agent commands. Table 4–1 Common Command Line Arguments Argument Definition -d Includes debugging information and packet dumps in the command output. -v {v1 | v2} Specifies whether to use SNMPv1 or SNMPv2 to communicate with the SNMP agent. You must specify the same SNMP version that you set in the Trap Version field when you configured the SNMP agent as described in Create SNMP agents in the Oracle WebLogic Server Administration Console Help. If you do not specify a value, the command assumes -v v1. WebLogic SNMP Agent Command-Line Reference Deprecated 4-3

4.3 Commands for Retrieving WebLogic Server Managed Objects