Performance Monitoring Infrastructure servlet
The Performance Monitoring Infrastructure (PMI) servlet 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 PMI 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 performance servlet 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. There are three types of leaves or output formats within the XML structure:
- PerfNumericInfo
- PerfStatInfo
- PerfLoadInfo
PerfNumericInfo.When each invocation of the performance servlet retrieves the performance values from Performance Monitoring Infrastructure (PMI), some of the values are raw counters that record the number of times a specific event occurs during the lifetime of the server. If a performance observation is of the type PerfNumericInfo, the value represents the raw count of the number of times this event has occurred since the server started. This information is important to note because the analysis of a single document of data provided by the performance servlet might not be useful for determining the current load on the system. To determine the load during a specific interval of time, it might be necessary to apply simple statistical formulas to the data in two or more documents provided during this interval. The PerfNumericInfo type has the following attributes:
- time--Specifies the time when the observation was collected (Java System.currentTimeMillis)
- uid--Specifies the PMI identifier for the observation
- val--Specifies the raw counter value
The following document fragment represents the number of loaded servlets. The path providing the context of the observation is not shown.
<numLoadedServlets> <PerfNumericData time="988162913175" uid="pmi1" val="132"/> </numLoadedServlets>
PerfStatInfo.When each invocation of the performance servlet retrieves the performance values from PMI, some of the values are stored as statistical data. Statistical data records the number of occurrences of a specific event, as the PerfNumericInfo type does. In addition, this type has sum of squares, mean, and total for each observation. This value is relative to when the server started.
The PerfStatInfo type has the following attributes:
- time--Specifies the time the observation was collected (Java System.currentTimeMillis)
- uid--Specifies the PMI identifier for this observation
- num--Specifies the number of observations
- sum_of_squares--Specifies the sum of the squares of the observations
- total--Specifies the sum of the observations
- mean--Specifies the mean (total number) for this counter
The following fragment represents the response time of an object. The path providing the context of the observation is not shown:
<responseTime> <PerfStatInfo mean="1211.5" num="5" sum_of_squares="3256265.0" time="9917644193057" total="2423.0" uid="pmi13"/> </responseTime>
PerfLoadInfo.When each invocation of the performance servlet retrieves the performance values from PMI, some of the values are stored as a load. Loads record values as a function of time; they are averages. This value is relative to when the server started.
The PerfLoadInfo type has the following attributes:
- time--Specifies the time when the observation was collected (Java System.currentTimeMillis)
- uid--Specifies the PMI identifier for this observation
- currentValue--Specifies the current value for this counter
- integral--Specifies the time-weighted sum
- timeSinceCreate--Specifies the elapsed time in milliseconds since this data was created in the server
- mean--Specifies time-weighted mean (integral/timeSinceCreate) for this counter
The following fragment represents the number of concurrent requests. The path providing the context of the observation is not shown:
<poolSize> <PerfLoadInfo currentValue="1.0" integral="534899.0 " mean="0.9985028962051592" time="991764193057" timeSinceCreate="535701.0 "uid="pmi5"</poolSize>
When the performance servlet is first initialized, it retrieves the list of nodes and servers located within the domain in which it is deployed. Because the collection of this data is expensive, the performance servlet holds this information as a cached list. If a new node is added to the domain or a new server is started, the performance servlet does not automatically retrieve the information about the newly created element. To force the servlet to refresh its configuration, add the refreshConfig parameter to the invocation as follows:
http://hostname/wasPerfTool/servlet/perfservlet?refreshConfig=true
By default, the performance servlet collects all of the performance data across a WebSphere domain. However, it is possible to limit the data returned by the servlet to either a specific node, server, or PMI module.
- Node.The servlet can limit the information it provides to a specific host by using the node parameter. For example, to limit the data collection to the node rjones, invoke the following URL:
http://hostname/wasPerfTool/servlet/perfservlet?Node=rjones
- Server.The servlet can limit the information it provides to a specific server by using the server parameter. For example, in order to limit the data collection to the TradeApp server on all nodes, invoke the following URL:
http://hostname/wasPerfTool/servlet/perfservlet?Server=TradeAppTo limit the data collection to the TradeApp server located on the host rjones, invoke the following URL:
http://hostname/wasPerfTool/servlet/perfservlet?Node=rjones&Server=TradeApp
- Module.The servlet can limit the information it provides to a specific PMI module by using the module parameter. You can request multiple modules from the following Web site:
http://hostname/wasPerfTool/servlet/perfservlet?Module=beanModule+jvmRuntimeModuleFor example, to limit the data collection to the beanModule on all servers and nodes, invoke the following URL:
http://hostname/wasPerfTool/servlet/perfservlet?Module=beanModuleTo limit the data collection to the beanModule on the server TradeApp on the node rjones, invoke the following URL:
http://hostname/wasPerfTool/servlet/perfservlet?Node=rjones&Server=TradeApp &Module=beanModule>
Developing your own monitoring applications with Performance Monitoring Infrastructure servlet