You can use the Performance Monitoring Infrastructure (PMI) interfaces
to develop your own applications to collect and display performance information.
![[AIX Solaris HP-UX Linux Windows]](../images/dist.gif)
Before you begin
The
Version 4.0 APIs are supported in this release, however, some data hierarchy
changes have occurred in the PMI modules, including the enterprise bean and
HTTP sessions modules. If you have an existing PmiClient application and you
want to run it against Version 5.0, you might have to update the PerfDescriptor(s)
based on the new PMI data hierarchy.
The getDataName and getDataId methods
in PmiClient have also changed. They are now non-static methods in order to
support multiple WebSphere® Application Server versions. You might
have to update your existing application which uses these two methods.
About this task
This section discusses the use of the Performance Monitoring Infrastructure
(PMI) client interfaces in applications. Read the basic steps in the programming
model:
Procedure
- Retrieve an initial collection or snapshot of performance data
from the server. A client uses the CpdCollection interface to retrieve
an initial collection or snapshot from the server. This snapshot, which is
called Snapshot in this example, is provided in a hierarchical structure as
described in data organization and hierarchy, and contains the current values
of all performance data collected by the server. The snapshot maintains the
same structure throughout the lifetime of the CpdCollection instance.
- Process and display the data as specified. The client
processes and displays the data as specified. Processing and display objects,
for example, filters and GUIs, can register as CpdEvent listeners to data
of interest. The listener works only within the same Java™ virtual
machine (JVM). When the client receives updated data, all listeners are notified.
- Display the new CpdCollection instance through the hierarchy. When the client receives new or changed data, the client can simply
display the new CpdCollection instance through its hierarchy. When it is necessary
to update the Snapshot collection, the client can use the update method to
update Snapshot with the new data.
Snapshot.update(S1);
// ...later...
Snapshot.update(S2);
Results
Steps 2 and 3 are repeated through the lifetime of the client.