|
WebLogic Server provides a command-line utility that offers many of the same features as an SNMP manager. You can use this utility to test and troubleshoot the configuration of your SNMP agents in a WebLogic Server domain.
The following sections describe working with the WebLogic Server SNMP command-line utility:
To set up your environment for the WebLogic Server SNMP command-line utility:
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 shell’s PATH environment variable and adds WebLogic Server classes to the CLASSPATH variable.
Invoke the SNMP command-line utility as follows:
java weblogic.diagnostics.snmp.cmdline.Manager command [-?]
where command is one of the commands described in Table 5-1 and-? outputs usage information for the specified command.
The examples in this section assume that you have created an SNMP agent on the Administration Server and that you have not modified the default values for the agent. (For example, the agent listens on UDP port 161 and uses public as its community name.)
The examples use the -m and -M options to load the WebLogic Server MIB module. Loading the MIB module enables you to refer to managed objects by their display names instead of OIDs. The -M option assumes that you installed WebLogic Server in c:\bea\wlserver_10.0.
To see the display names for all WebLogic Server managed objects, refer to WebLogic Server SNMP MIB Reference.
SnmpWalk command:
java weblogic.diagnostics.snmp.cmdline.Manager SnmpWalk -?
java weblogic.diagnostics.snmp.cmdline.Manager SnmpWalk
-m BEA-WEBLOGIC-MIB -M c:\bea\wlserver_10.0\server\lib
applicationRuntimeObjectName
SnmpGetBulk commands in each request:
java weblogic.diagnostics.snmp.cmdline.Manager SnmpBulkWalk -v2 -Bm 3
-m BEA-WEBLOGIC-MIB -M c:\bea\wlserver_10.0\server\lib
applicationRuntimeTable
java weblogic.diagnostics.snmp.cmdline.Manager SnmpGetBulk -v2
-Bn 1 -Bm 2 applicationRuntimeObjectName
jmsServerRuntimeObjectName jmsServerRuntimeBytesPendingCount
|