You can select and view monitoring data for JVM, server, applications,
thread pools, HTTP service, transaction service, log statistics, and call
flow statistics. A diagram showing how these components and services are organized
is shown in About the Tree Structure of Monitorable Objects.

For details on viewing or configuring monitoring, see the online help
available with the Admin Console.

To Use the asadmin monitor Command to View Monitoring
Data

asadmin has two ways of viewing monitoring data.
The first is to use the monitor command. This command prints
out the commonly-monitored statistics, and has options for filtering out statistics
and capture the output in a Comma Separated Values (CSV) file.

To Use the asadmin get and list Commands to View Monitoring
Data

The monitor command is useful in most situations. However, it does not
offer the complete list of all monitorable objects. To view all monitorable
data using the asadmin tool, use the asadmin list and asadmin get commands followed by the dotted name of a monitorable
object, as follows.

To view the names of the objects that can be monitored, use the asadmin list command.

For example, to view a list of
application components and subsystems that have monitoring enable for the
server instance, type the following command in a terminal window:

asadmin> list --user adminuser --monitor server

The preceding command returns a list of application components and subsystems
that have monitoring enabled, for example:

To display monitoring statistics for an application component
or subsystem for which monitoring has been enabled, use the asadmin
get command.

To get the statistics, type the asadmin
get command in a terminal window, specifying a name displayed by
the list command in the preceding step. The following example
attempts to get all attributes from a subsystem for a specific object:

Understanding and Specifying
Dotted Names

In the asadmin list and get commands,
specify the dotted name of monitorable objects. All child objects are addressed
using the dot (.) character as separator, thus these are referred to as dotted names. If a child node is of singleton type, then only the
monitoring object type is needed to address the object, otherwise a name of
the form type.name is needed to address the object.

For example, http-service is one of the valid monitorable
object types and is a singleton. To address a singleton child node representing
the http-service of instance server,
the dotted name is:

server.http-service

Another example, application, is a valid monitorable
object type and is not a singleton. To address a non-singleton child node
representing, for example, the application PetStore, the
dotted name is:

server.applications.petstore

The dotted names can also address specific attributes in monitorable
objects. For example, http-service has a monitorable attribute
called bytesreceived-lastsampletime. The following name
addresses the bytesreceived attribute:

The administrator is not expected to know the valid dotted names for asadmin list and get commands. The list command
displays available monitorable objects, while the get command
used with a wildcard parameter allows the inspection of all available attributes
on any monitorable object.

The underlying assumptions for using the list and get commands with dotted names are:

Any list command that has a dotted name
that is not followed by a wildcard (*) gets as its result the current node’s immediate children.
For example, list --useradminuser--monitorserver lists all immediate children
belonging to the server node.

Any list command that has a dotted name
followed by a wildcard of the form .* gets as its result
a hierarchical tree of children nodes from the current node. For example, list --useradminuser--monitor
server.applications.* lists all children of applications and
their subsequent child nodes and so on.

Any list command that has a dotted name
preceded or followed by a wildcard of the form *dottedname or dotted * name or dotted name * gets as
its result all nodes and their children matching the regular expression created
by the provided matching pattern.

A get command followed by a .* or
a * gets as its result the set of attributes and their
values belonging to the current node to be matched.

Examples of the list and get Commands

Examples for the list --user admin-user --monitor
Command

The list command provides
information about the application components and subsystems currently being
monitored for the specified server instance name. Using this command, you
can see the monitorable components and subcomponents for a server instance.
For a more complete listing of list examples, see Expected Output for list and get Commands at All Levels.

Example 1

asadmin> list --user admin-user --monitor server

The preceding command returns a list of application components and subsystems
that have monitoring enabled, for example:

It is also possible to list applications that are currently monitored
in the specified server instance. This is useful when particular monitoring
statistics are sought from an application using the get command.

Examples for the get --user admin-user --monitor
Command

This command retrieves the following monitored
information:

All attribute(s) monitored within a component or subsystem

Specific attribute monitored within a component or subsystem

When an attribute is requested that does not exist for a particular
component or subsystem, an error is returned. Similarly, when a specific attribute
is requested that is not active for a component or subsystem, an error is
returned.

Example 3

Example 4

Attempt to get an unknown attribute from within a subsystem attribute:

asadmin> get --user admin-user --monitor server.jvm.badname

Returns:

No such attribute found from reflecting the corresponding Stats
interface: [badname]
CLI137 Command get failed.

To Use the PetStore Example

The following example illustrates how the asadmin tool
might be used for monitoring purposes.

A user wants to inspect the number of calls made to a method in the
sample PetStore application after it has been deployed
onto the Application Server. The instance onto which it has been deployed is named server. A combination of the list and get commands
are used to access desired statistics on a method.

Start the Application Server and the asadmin tool.

Set some useful environment variables to avoid entering them for
every command:

Nothing to list at server.applications.petstore.signon-ejb_jar.
UserEJB.bean-methods.getUserName. To get the valid names beginning with a
string, use the wildcard "*" character. For example, to list all names
that begin with "server", use "list server*".

There are no monitorable subcomponents for methods. Get all monitorable
statistics for the method getUserName.

Note: In standalone modules, the node containing the application name
(app1 in this example) will not appear.

No attributes, but a message saying: Nothing to list at server.applications.appl.ejb-module1_jar.bean1-cache. To get the valid names beginning with a string, use the wildcard
(*) character. For example, to list all names that begin with server,
use list server*.

get -m

server.applications.app1.ejb-module1_jar.bean1.bean-pool.*

Note: In standalone modules, the node containing the application name
(app1 in this example) will not appear.

List of attributes and values corresponding to EJB Pool attributes as
described in Table 18–4.

list -m

server.applications.app1.ejb-module1_jar.bean1.bean-cache

Note: In standalone modules, the node containing the application name
(app1 in this example) will not appear.

No attributes, but a message saying “Use get command with the
--monitor option to view this node’s attributes and values.”

get -m

server.applications.app1.ejb-module1_jar.bean1.bean-cache.*

Note: In standalone modules, the node containing the application name
(app1 in this example) does not appear.

List of attributes and values corresponding to EJB Cache attributes
as described in Table 18–5.

list -m

server.applications.app1.ejb-module1_jar.bean1.bean-method.method1

Note: In standalone modules, the node containing the application name
(app1 in this example) will not appear.

No attributes, but a message saying “Use get command with the
--monitor option to view this node’s attributes and values.”

get -m

server.applications.app1.ejb-module1_jar.bean1.bean-method.method1.*

Note: In standalone modules, the node containing the application name
(app1 in this example) will not appear.

List of attributes and values corresponding to EJB Methods attributes
as described in Table 18–2.

list -m

server.applications.app1.web-module1_war

Displays the virtual server(s) assigned to the module.

get -m

server.applications.app1.web-module1_war.*

No output except a message saying there are no attributes at this node.

list -m

server.applications.app1.web-module1_war.virtual_server

Displays list of servlets registered.

get -m

server.applications.app1.web-module1_war.virtual_server.*

No output except a message saying there are no attributes at this node.

list -m

server.applications.app1.web-module1_war.virtual_server.servlet1

No attributes, but a message saying “Use get command with the
--monitor option to view this node’s attributes and values.”

get -m

server.applications.app1.web-module1_war.virtual_server.servlet1.*

List of attributes and values corresponding to web container (Servlet)
attributes as described in Table 18–7.

The following table shows the command, dotted name, and corresponding
output for the HTTP Service level.

Table 18–35 HTTP-Service Level

Command

Dotted Name

Output

list -m

server.http-service

List of virtual servers.

get -m

server.http-service.*

No output except message saying there are no attributes at this node.

list -m

server.http-service.server

List of HTTP Listeners.

get -m

server.http-service.server.*

No output except message saying there are no attributes at this node.

The following table shows the command, dotted name, and corresponding
output for the thread pools level.

Table 18–36 Thread-Pools Level

Command

Dotted Name

Output

list -m

server.thread-pools

List of thread-pool names.

get -m

server.thread-pools.*

No output except message saying there are no attributes at this node.

list -m

server.thread-pools.orb\.threadpool\.thread-pool-1

No attributes, but a message saying “Use get command with the
--monitor option to view this node’s attributes and values.”

get -m

server.thread-pools..orb\.threadpool\.thread-pool-1.*

List of attributes and values corresponding to Thread Pool attributes
as described in Table 18–13.

The following table shows the command, dotted name, and corresponding
output for the resources level.

Table 18–37 Resources Level

Command

Dotted Name

Output

list -m

server.resources

List of pool names.

get -m

server.resources.*

No output except message saying there are no attributes at this node.

list -m

server.resources.jdbc-connection-pool-pool.connection-pool1

No attributes, but a message saying “Use get command with the
--monitor option to view this node’s attributes and values.”

get -m

server.resources.jdbc-connection-pool-pool.connection-pool1.*

List of attributes and values corresponding to Connection Pool attributes
as described in Table 18–9.

The following table shows the command, dotted name, and corresponding
output for the transaction service level.

Table 18–38 Transaction-Service Level

Command

Dotted Name

Output

list -m

server.transaction-service

No attributes, but a message saying “Use get command with the
--monitor option to view this node’s attributes and values.”

get -m

server.transaction-service.*

List of attributes and values corresponding to Transaction Service attributes
as described in Table 18–14.

The following table shows the command, dotted name, and corresponding
output for the ORB level.