Extending PMI using Custom PMI API
PMI can be extended using the Custom PMI API to create application specific statistics. For example, a stock trading application can use Custom PMI API to create business specific statistics like "number of stock sell transactions" and "number of stock buy transactions".
Note that PMI provides detailed performance data about various runtime and application components. In WAS v6, PMI has approximately 180 or more performance statistics. Before creating new statistics, it is important to make sure that the same data is not captured by PMI already.
WebSphere PMI has been extended to allow application developers to add their own application-specific instrumentation. The Custom PMI API simplifies the process of "PMI enabling" an application by providing an easy to use API. The statistics created via the Custom PMI can be accessed via the standard PMI and JMX interfaces that are used by monitoring tools including the Tivoli Performance Viewer.
PMI instrumentation is based on the J2EE 1.4 standard. As a result, Custom PMI supports all the Statistic types (CountStatistic, TimeStatistic, RangeStatistic, and BoundedRangeStatistic) defined in the JSR-77 Performance Data Framework. Custom PMI does not support user-defined Statistic types.
What we need to know
PMI collects performance data on runtime applications and provides interfaces that allow external applications to monitor the performance data.
The server side PMI has been extended to allow application developers to add their own instrumentation to their applications to help monitor their own predefined performance metrics.
Key features of Custom PMI:
- Create a custom Stats/PMI (Stats is J2EE terminology) module using an XML template.
- Used by the application to instrument code.
- Statistics in the custom Stats module can be accessed via the standard PMI and JMX interfaces that are used by monitoring tools, including the Tivoli Performance Viewer.
- PMI instrumentation is based on the J2EE 1.4 standard. As a result, Custom PMI supports all the Statistic types (CountStatistic, TimeStatistic, RangeStatistic, and BoundedRangeStatistic) defined in the JSR-77 Performance Data Framework.
- Custom PMI does not support user-defined Statistic types.
PMI is for application server performance monitoring, and the data collected by PMI is used to tune the application server resources such as pools, queues and caches etc. Since performance instrumentation and statistics can have considerable impact on the application server performance, it is necessary that every statistic added via Custom PMI is relevant towards solving a performance problem. When the statistic to be added is designed, the issues like the following should be taken into consideration:
- Significance of the statistic with respect to solving performance problems.
- Relevance to tuning or configuring the application.
- Check for avoiding data redundancy and does not need frequent updates.
See also
Instrumenting an application with Custom PMI - an example