WebLogic Server Command Reference
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:
The following sections describe working with the WebLogic SNMP agent through its command-line interface:
For more information about using SNMP with WebLogic Server, see:
To set up your environment for the WebLogic SNMP agent command-line interface:
All WebLogic SNMP agent commands take the following form:
Table 5-1 describes arguments that are common to most WebLogic SNMP agent commands.
Includes debugging information and packet dumps in the command output. |
|
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 "Configure the SNMP Agent" in the Administration Console Online Help) |
|
The community name that you set for the WebLogic SNMP agent and optionally specifies the server instance that hosts the objects with which you want to interact. To request a managed object on the Administration Server, specify: where To request a managed object on a single Managed Server, specify: where To request a managed object for all server instances in a domain, specify a community string with the following form: where If you do not specify a value for this argument, the command assumes |
|
The port number on which the WebLogic SNMP agent listens for requests. |
|
The number of milliseconds the command waits to successfully connect to the SNMP agent. |
|
The number of times the command retries unsuccessful attempts to connect to the SNMP agent. If you do not specify a value, the command exits on the first unsuccessful attempt. |
|
The DNS name or IP address of the computer that hosts the WebLogic Server Administration Server, which is where the WebLogic SNMP agent runs. |
Table 5-2 is an overview of commands that retrieve WebLogic Server managed objects and object instances.
Returns all managed objects and instances that are below a specified node in the MIB. See snmpwalk. |
|
Returns the managed object or instance that immediately follows an OID that you specify. See snmpgetnext. |
|
Returns managed object instances that correspond to one or more OIDs. See snmpget. |
Returns all managed objects or instances that are below a specified node in the MIB.
If you specify the OID for a tabular object, the command returns all of its object instances along with all related (child) objects and instances.
java snmpwalk [-d] [-v (v1,v2)] [-c
snmpCommunity
] [-psnmpPort
]
[-ttimeout
] [-rretries
]host
OID
The following example retrieves the names of all applications that have been deployed on the Administration Server. The managed object for an application name is applicationRuntimeName
, which is a child of the applicationRuntimeTable
object. (See WebLogic Server SNMP MIB Reference.)
java snmpwalk localhost .1.3.6.1.4.1.140.625.105.1.15
If you invoke this command from a computer that is running the example MedRecServer, the command returns output similar to the following truncated output. Note that the output includes the full OID for each instance of the applicationRuntimeName
object.
Object ID: .1.3.6.1.4.1.140.625.105.1.15.32.49.102.98.97.100.97.102.99.57.48.50.
102.48.98.53.54.100.100.49.54.50.54.99.54.99.49.97.97.98.53.100.97
STRING: MedRecServer_uddiexplorer
Object ID: .1.3.6.1.4.1.140.625.105.1.15.32.54.98.49.101.57.56.54.98.98.50.57.10
0.54.55.48.100.56.98.101.101.97.55.48.53.57.99.49.51.56.98.97.99
STRING: MedRecServer_StartupEAR
Object ID: .1.3.6.1.4.1.140.625.105.1.15.32.56.48.97.53.50.52.99.101.53.54.57.54
.52.52.99.54.48.55.54.100.102.49.54.97.98.52.48.53.98.100.100.49
STRING: MedRecServer_wl_management_internal2
...
The following example retrieves the name of all applications that have been deployed on all servers in the medrec
domain.
java snmpwalk -c public@medrec localhost .1.3.6.1.4.1.140.625.105.1.15
The following example retrieves the name of all applications that have been deployed on a Managed Server named MS1
.
java snmpwalk -c public@MS1 localhost .1.3.6.1.4.1.140.625.105.1.15
Returns a description of the managed object or object instance that immediately follows one or more OIDs that you specify. If you specify a tabular object, this command returns the first child managed object. If you specify a scalar object, this command returns the first instance of the object.
Instead of the recursive listing that the snmpwalk
command provides, this command returns the description of only one managed object or instance whose OID is the next in sequence. You could string together a series of snmpgetnext
commands to achieve the same result as the snmpwalk
command.
java snmpgetnext [-d] [-v (v1,v2)] [-c
snmpCommunity
] [-psnmpPort
]
[-ttimeout
] [-rretries
]host
OID
[OID
]...
The following example retrieves the name of an application that has been deployed on the Administration Server. The managed object for an application name is applicationRuntimeName
, which is a scalar object and is a child of the applicationRuntimeTable
object. (See WebLogic Server SNMP MIB Reference.)
java snmpgetnext localhost .1.3.6.1.4.1.140.625.105.1.15
If you invoke this command from a computer that is running the example MedRecServer, the command returns output similar to the following:
Response PDU received from /127.0.0.1, community: public
Object ID: .1.3.6.1.4.1.140.625.105.1.15.32.49.102.98.97.100.97.102.99.57.48.50.
102.48.98.53.54.100.100.49.54.50.54.99.54.99.49.97.97.98.53.100.97
STRING: MedRecServer_uddiexplorer
To determine whether there are additional applications deployed on the Administration Server, you can use the output of the snmpgetnext
command as input for an additional snmpgetnext
command:
java snmpgetnext localhost .1.3.6.1.4.1.140.625.105.1.15.32.49.102.98.97.100.97.102.99.57.48.50.102.
48.98.53.54.100.100.49.54.50.54.99.54.99.49.97.97.98.53.100.97
The command returns output similar to the following:
Response PDU received from /127.0.0.1, community: public
Object ID: .1.3.6.1.4.1.140.625.105.1.15.32.54.98.49.101.57.56.54.98.98.50.57.10
0.54.55.48.100.56.98.101.101.97.55.48.53.57.99.49.51.56.98.97.99
STRING: MedRecServer_StartupEAR
The following example specifies two OIDs to retrieve the name of an application that has been deployed on the Administration Server and the name of a JDBC connection pool. The OIDs in the example command are for the applicationRuntimeName
object, which is the name of an application, and jdbcConnectionPoolRuntimeName
, which is the name of a JDBC connection pool.
java snmpgetnext localhost .1.3.6.1.4.1.140.625.105.1.15
.1.3.6.1.4.1.140.625.190.1.15
If you invoke this command from a computer that is running the example MedRecServer, the command returns output similar to the following:
Response PDU received from /127.0.0.1, community: public
Object ID:
.1.3.6.1.4.1.140.625.105.1.15.32.49.102.98.97.100.97.102.99.57.48.50.
102.48.98.53.54.100.100.49.54.50.54.99.54.99.49.97.97.98.53.100.97
STRING: MedRecServer_uddiexplorer
Object ID:
.1.3.6.1.4.1.140.625.190.1.15.32.53.53.49.48.50.55.52.57.57.49.99.102
.55.48.98.53.50.54.100.48.100.53.53.52.56.49.57.49.49.99.99.99
STRING: MedRecPool-PointBase
Retrieves the value of one or more object instances. This command does not accept OIDs for managed objects.
java snmpget [-d] [-v (v1,v2)] [-c
snmpCommunity
] [-psnmpPort
]
[-ttimeout
] [-rretries
]host
object-instance-OID
[object-instance-OID
]...
The following example retrieves the serverRuntimeState
and serverRuntimeListenPort
managed object instances for the Administration Server. Both of these objects are children of the serverRuntimeTable
object. (See WebLogic Server SNMP MIB Reference.)
java snmpget localhost .1.3.6.1.4.1.140.625.360.1.60.32.102.100.48.98.101.102.100.99.102.52.98.
97.48.48.49.102.57.53.51.50.100.102.53.55.97.101.52.56.99.99.97.99
.1.3.6.1.4.1.140.625.360.1.35.32.102.100.48.98.101.102.100.99.102.52.
98.97.48.48.49.102.57.53.51.50.100.102.53.55.97.101.52.56.99.99.97.99
If you invoke this command from a computer that is running the example MedRecServer, the command returns output similar to the following:
Response PDU received from /127.0.0.1, community: public
Object ID:
.1.3.6.1.4.1.140.625.360.1.60.32.102.100.48.98.101.102.100.99.102.52.
98.97.48.48.49.102.57.53.51.50.100.102.53.55.97.101.52.56.99.99.97.99
STRING: RUNNING
Object ID:
.1.3.6.1.4.1.140.625.360.1.35.32.102.100.48.98.101.102.100.99.102.52.
98.97.48.48.49.102.57.53.51.50.100.102.53.55.97.101.52.56.99.99.97.99
INTEGER: 7001
Table 5-3 is an overview of commands that generate and receive traps for testing purposes.
Starts a daemon that receives traps and prints information about the trap. See snmptrapd. |
|
Constructs an SNMPv1 trap and distributes it to the SNMP manager or trap daemon that is running on the specified host and listening on the specified port number. See snmpv1trap. |
Starts a daemon that receives traps and prints information about the trap.
java snmptrapd [-d] [-c
snmpCommunity
] [-pTrapDestinationPort
]
The community name that the SNMP agent (or If you do not specify a value, the command assumes |
|
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:
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.
Constructs an SNMPv1 trap and distributes it to the SNMP manager or trap daemon that is running on the specified host and listening on the specified port number.
As part of invoking this command, you specify the value for fields within the trap packet that you want to send. The values that you specify must resolve to traps that are defined in the WebLogic Server MIB. For information about WebLogic Server traps and the fields that trap packets require, refer to "Format of WebLogic Trap Notifications" in the WebLogic SNMP Management Guide.
java snmpv1trap [-d] [-c
snmpCommunity
] [-pTrapDestinationPort
]
TrapDestinationHost
.1.3.6.1.4.140.625
agent-addr generic-trap specific-trap timestamp
[OID {INTEGER | STRING | GAUGE | TIMETICKS | OPAQUE |
IPADDRESS | COUNTER}value
] ...
A community name for the trap. SNMP managers (or the trap daemon) can access the trap only if they are configured to use this community name. If you do not specify a value, the command assumes |
|
The port number on which the SNMP manager or trap daemon is listening. |
|
The DNS name or IP address of the computer that hosts the SNMP manager or trap daemon. |
|
The value of the trap's |
|
The value of the trap's This field is intended to indicate the computer on which the trap was generated. When using the |
|
The value of the trap's For a list of valid values, refer to "Format of WebLogic Trap Notifications" in the WebLogic SNMP Management Guide. |
|
The value of the trap's For a list of valid values, refer to "Format of WebLogic Trap Notifications" in the WebLogic SNMP Management Guide. |
|
The value of the trap's This field is intended to indicate the length of time between the last re-initialization of the SNMP agent and the time at which the trap was issued. When using the |
|
OID {INTEGER | STRING | GAUGE | TIMETICKS | OPAQUE | IPADDRESS | COUNTER} |
(Optional) The value of the trap's For each name-value pair, specify an OID, a value type, and a value. For example, a log message trap includes a |
The following example generates a log message trap that contains the trapTime
and trapServerName
variable bindings. It broadcasts the trap through port 165. In the example:
6
is the generic trap value that specifies "other WebLogic Server traps."60
is the specific trap value that WebLogic Server uses to identify log message traps.trapTime
variable binding and .1.3.6.1.4.1.140.625.100.10 is the OID for the trapServerName
variable binding.java snmpv1trap -p 165 localhost .1.3.6.1.4.140.625 localhost 6 60 1000
.1.3.6.1.4.1.140.625.100.5 STRING "2:00 pm" .1.3.6.1.4.1.140.625.100.10
STRING localhost
The SNMP manager (or trap daemon) that is listening at port number 165
receives the trap. If the trap daemon is listening on 165
, it returns 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:
Object ID: .1.3.6.1.4.1.140.625.100.5
STRING: 2:00 pm
Object ID: .1.3.6.1.4.1.140.625.100.10
STRING: localhost
To use the snmpv1trap
command to generate WebLogic Server traps and receive them through the trap daemon:
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:
To use WebLogic SNMP agent to generate WebLogic Server traps and receive them through the trap daemon:
See "Configure the SNMP Agent" in the Administration Console Online Help.
165
. Keep all other default settings that the Administration Console presents.See "Create Trap Destinations" in the Administration Console Online Help.
When the Administration Server starts, the SNMP agent generates a serverStart
trap and broadcasts it through port 165.
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: 65
Time: 1000
VARBINDS: