Retrieving performance data with PerfServlet
The PerfServlet is used for simple end-to-end retrieval of performance data that any tool, provided by either IBM or a third-party vendor, can handle.
The servlet provides a way to use an HTTP request to query the performance metrics for an entire WebSphere Application Server administrative domain. Because the servlet provides the performance data through HTTP, issues such as firewalls are trivial to resolve.
The PerfServlet provides the performance data output as an XML document, as described in the provided document type description (DTD). In the XML structure, the leaves of the structure provide the actual observations of performance data and the paths to the leaves that provide the context.
The PerfServlet is a sample monitoring tool that uses WebSphere Application Server administration and monitoring interfaces to expose performance data. Using the PerfServlet is not intended for real-time performance monitoring in production environments or for use in large topologies. For these environments you should use the Tivoli Performance Viewer for WebSphere Application Server.
Specific best practices for the PerfServlet are the following:
PerfServlet overhead: The PerfServlet is not designed to run concurrently. Being a single threaded servlet, it would collect the data sequentially from available servers. This single threaded operation can cause higher response times when the PerfServlet is used in larger deployments.
PerfServlet in large deployments:
By default, when the PerfServlet is first initialized, it retrieves the list of nodes
and servers within the cell in which it is deployed. Because collecting this data costs
in system processing time, the PerfServlet holds this information as a cached list.
To force the servlet to refresh its configuration, you can use the option
refreshconfig=true". However, using this option is not recommended unless
required, because this option adds extra overhead to the PerfServlet processing.
Use option, node and server, if you are looking for a specific server's performance data.
PerfServlet response time: The PerfServlet responsiveness depends on the following factors:
Numbers of application servers that exist in the cell.
Number of resources configured in the cell (including applications).
PerfServlet alternative: If you are looking for an alternative to using the PerfServlet to capture data programmatically, refer to the Perf MBean programming interfaces documentation, which exists in the Reference > Programming Interfaces > MBean interfaces section of the WebSphere Application Server information center..
Starting with version 6.0, the PerfServlet in WebSphere Application Server uses the JMX Perf MBean interface to retrieve the PMI data and outputs an XML document that uses the Java Platform, Enterprise Edition (Java EE) 1.4 Performance Data Framework to describe the statistics. The PerfSerlvet in can also provide an output that is compatible with the PerfServlet 5.0. To provide PerfServlet 5.0 compatible output it uses the PMI client interface.
The performance servlet
PerfServletApp.ear is located in the
WAS_HOME/installableApps directory, where
WAS_HOME is the installation path for
WebSphere Application Server.
Starting with version 6.1, you must enable application security to get the PerfServlet working.
The performance servlet is deployed exactly as any other servlet. To use it, follow these steps:
Deploy the servlet on a single application server instance within the domain.
After the servlet deploys, you can invoke it to retrieve performance data for the entire domain. Invoke the performance servlet by accessing the following default URL:
The performance servlet provides performance data output as an XML document, as described by the provided document type
definition (DTD). The DTD is located inside the
The Performance Servlet provides a basic filter functionality for the XML results. To filter the results simply add parameters to the URL. IBM defined serveral parameters:
The servlet can limit the information it provides to a specific host by using the
The servlet can limit the information it provides to a specific server by using the
For example, in order to limit the data collection to the
server1 on all nodes, invoke the
To limit the data collection to the specific server on the specific node invoke the following URL:
The PMI module name for which stats are displayed. Modules include the following:
alarmManagerModule beanModule cacheModule connectionPoolModule jvmRuntimeModule j2cModule objectPoolModule orbPerfModule schedulerModule servletSessionsModule systemModule threadPoolModule transactionModule webAppModule webServicesModule wlmModule wsgwModule
The servlet can limit the information it provides to a specific PMI module by using the
You can request multiple modules by using the following URL:
For example, to limit the data collection to the
beanModule on all servers and nodes,
invoke the following URL:
To limit the data collection to the
beanModule on the server
server1 on the
MyNode01, invoke the following URL:
To find the list of the modules, invoke the PerfServlet help with the following URL: