Using the Performance Monitoring Infrastructure (PMI) with WebSphere 3.5.5+ application servers

The combination of WebSphere 4.0 FixPak 2 and WebSphere 3.5.5 allows the Performance Monitoring Infrastructure (PMI) to be used with a WebSphere Version 3.5.5 or later application server. To enable this feature, you must make two configuration changes and one programmatic change.

Making the configuration changes

For PMI to interact correctly with WebSphere 3.5.x application servers, you must upgrade both the WebSphere 3.5.x runtime environment and the PMI JAR files to the levels specified below. In addition, you must prepend the repository.jar file from the upgraded WebSphere 3.5.x runtime environment to the PMI client's runtime classpath.

Changes to the WebSphere 3.5.x runtime environment

Ensure the WebSphere 3.5 environment is at WebSphere Version 3.5.5 or later.

Changes to the PMI client's runtime or development environment

  1. Ensure that PMI JAR files used to develop and run the PMI clients are are at WebSphere Version 4.0.2 or later.
  2. Copy the repository.jar and ejs.jar files from the WebSphere_35_installation_root/lib directory to each machine from which a PMI client is run.
  3. Prepend the WebSphere 3.5.5+ repository.jar and ejs.jar files to the PMI client's runtime classpath.

Making the programmatic change

A new constructor for PmiClient allows a client to monitor WebSphere Version 3.5.5 or later application servers. The new constructor takes three String parameters: hostName, serverName, and Version.

public PmiClient(String host, String port, String version)

Using this constructor with "EPM" as the third parameter creates a PmiClient that may retrieve data from WebSphere 3.5.5+ application servers.

PmiClient pmiClnt = new PmiClient(hostName, portNumber, "EPM");

No other programmatic changes, API or otherwise, are needed to use PMI with WebSphere 3.5.5+ application servers.

For a more complete description of the PmiClient class and using the Performance Monitoring Infrastructure, see the InfoCenter article "9.2: Performance Monitoring infrastructure client package."

PMI counters available in 3.5.5+

Below are tables comparing the PMI counters available in Version 4.0.x to those available in Version 3.5.5 or later. For more information, see the InfoCenter article "6.6.21: Performance data reported with Resource Analyzer." The PMI counters are available for WebSphere for the following resource categories:

Counters for enterprise beans

The following performance data is available for enterprise beans.

Name Available in 4.0.x Available in 3.5.5+
Num Creates YES YES
Num Removes YES YES
Num Activates YES YES
Num Passivates YES YES
Num Instantiates YES YES
Num Destroys YES YES
Num Loads YES YES
Num Stores YES YES
Concurrent Actives YES YES
Concurrent Lives YES YES
Total Method Calls YES YES
Avg Method Rt (ms) YES YES
Avg CreateTime (ms) YES NO
Avg Remove Time (ms) YES NO
Active Methods YES YES
Gets from Pool YES YES
Gets Found YES YES
Returns to Pool YES YES
Returns Discarded YES YES
Drains from Pool YES YES
Avg Drain Size YES YES
Pool Size YES YES

Counters for database connection pools

Each data source (database instance) has a connection pool.

Name Available in 4.0.x Available in 3.5.5+
Num Creates YES YES
Num Destroys YES YES
Num Returns YES NO
Num Allocates YES YES
Pool Size YES YES
Concurrent Waiters YES YES
Avg Wait Time (ms) YES YES
Faults YES YES
Percents Used YES YES
Percents Maxed YES YES
PrepStmt Cache Discards YES NO

Counters for J2C connectors

The following performance data is available for J2C Connectors.

Name Available in 4.0.x Available in 3.5.5+
Num Managed Connections YES NO
Num Connections YES NO

Counters for the JVM run time

The following performance data is available for the Java Virtual Machine (JVM) run time.

Name Available in 4.0.x Available in 3.5.5+
Total Memory (bytes) YES YES
Free Memory (bytes) YES YES
Used Memory (bytes) YES YES

Counters for the JVMPI profiler

Resource Analyzer leverages a Java Virtual Machine Profiler Interface (JVMPI) to enablea more comprehensive performance analysis. This profiling tool enables the collection of information about the Java Virtual Machine (JVM) that runs the application server. For information on this tool, see the InfoCenter article "Enabling JVMPI data reporting."

Name Available in 4.0.x Available in 3.5.5+
Num Calls YES NO
Avg Time Between Calls YES NO
Avg Duration YES NO
Num Waiters YES NO
Avg Wait Time YES NO
Num Objects Alloc YES NO
Num Objects Freed YES NO
Num Objects Moved YES NO
Num Threads Started YES NO
Num Threads Dead YES NO

Counters for the servlet session manager

Performance data for HTTP sessions is shown in the table below.

Performance data for a servlet is collected only if the servlet is loaded when the application server starts. To ensure that data is collected for a servlet, see the InfoCenter article "Starting data retrieval."

Name Available in 4.0.x Available in 3.5.5+
Created Sessions YES YES
Invalidated Sessions YES YES
Finalized Sessions YES YES
Session Lifetime YES YES
Session Invalidate Time YES YES
Active Sessions YES YES
Live Sessions YES YES

Counters for ORB container thread pool

The following performance data is available for the ORB thread pool.

Name Available in 4.0.x Available in 3.5.5+
Thread Creates YES YES
Thread Destroys YES YES
Active Threads YES YES
Pool Size YES YES
Percent Maxed YES YES

Counters for Web container thread pool

The following performance data is available for the Web container thread pool.

Name Available in 4.0.x Available in 3.5.5+
Thread Creates YES NO
Thread Destroys YES NO
Active Threads YES NO
Pool Size YES NO
Percent Maxed YES NO

Counters for the transaction manager

The following performance data is available for container transactions.

Name Available in 4.0.x Available in 3.5.5+
Global Trans Begun YES NO
Global Trans Involved YES NO
Local Trans Begun YES NO
Active Global Trans YES YES
Active Local Trans YES NO
Global Trans Duration YES YES
Local Trans Duration YES NO
Global Before Completion Duration YES NO
Global Prepare Duration YES NO
Global Commit Duration YES NO
Local Before Completion Duration YES NO
Local Commit Duration YES NO
Num Optimizations YES NO
Global Trans Committed YES YES
Local Trans Committed YES NO
Global Trans RolledBack YES YES
Local Trans RolledBack YES NO
Global Trans Timeout YES NO
Local Trans Timeout YES NO

Counters for Web applications

The following performance data is available for Web applications.

Name Available in 4.0.x Available in 3.5.5+
Num Loaded Servlets YES YES
Num Reloads YES YES
Total Requests YES YES
Concurrent Requests YES YES
Response Time (ms) YES YES
Num Errors YES YES

Fixing problems with counters

When using the Resource Analyzer, you might encounter the problems with counters described in this section.

Setting database connection pool counters on Version 3.5.5

If you have database connection pool counters on WebSphere Application Server Version 3.5.5 and you set the performance monitoring level for the database connection pool module, later changing it to a lower level disables some of the counters. After you disable the counters, you will not be able to re-enable the counters without restarting the application server.

To work around the problem, do not lower the level for connection pool counters. If you do, you will have to restart the application server in order to enable them again.

Understanding negative numbers in the Resource Analyzer

You might encounter negative numbers in the Resource Analyzer in the following situations:

Restriction on using the same PmiClient object in multiple threads

Because the EpmService session bean in Version 3.5.5 is a stateful session bean, you cannot call the same PmiClient object in multiple threads at the same time. Doing so gives you a BeanNotRetrantException. There is no such restriction when calling PmiClient against a Version 4.0.x server.