Administration guide > Monitor the environment > Monitoring with WAS PMI
Enable PMI
Overview
Use WebSphere Application Server Performance Monitoring Infrastructure (PMI) to enable or disable statistics at any level. For example, you can choose to enable the map hit rate statistic for a particular map, but not the number of entry statistic or the loader batch update time statistic. You can enable PMI in the administrative console or with scripting.
Your application server must be started and have an eXtreme Scale-enabled application installed.
To enable PMI with scripting, you also must be able to log in and use the wsadmin tool. For more information about the wsadmin tool, see the wsadmin tool topic in the WebSphere Application Server information center.
Use WebSphere Application Server PMI to provide a granular mechanism with which you can enable or disable statistics at any level. For example, you can choose to enable the map hit rate statistic for a particular map, but not the number of entry or the loader batch update time statistics. This section shows how to use the administrative console and wsadmin scripts to enable ObjectGrid PMI.
Procedure
- Enable PMI in the administrative console.
- In the administrative console, click...
Monitoring and Tuning | Performance Monitoring Infrastructure | server_name
- Verify that Enable Performance Monitoring Infrastructure (PMI) is selected. This setting is enabled by default. If the setting is not enabled, select the check box, then restart the server.
- Click Custom. In the configuration tree, select the ObjectGrid and ObjectGrid Maps module. Enable the statistics for each module.
The transaction type category for ObjectGrid statistics is created at runtime. You can see only the subcategories of the ObjectGrid and Map statistics on the Runtime tab.
- Enable PMI with scripting.
These steps enable eXtreme Scale runtime PMI, but do not modify the PMI configuration. If you restart the application server, the PMI settings are lost except for the main PMI enablement.
- Start the wsadmin command line tool.
cd $WAS_ROOT/bin
./wsadmin.sh
- Modify the eXtreme Scale PMI runtime configuration. Verify that PMI is enabled for the server using the following commands:
wsadmin>set s1 [$AdminConfig getid /Cell:CELL_NAME/Node:NODE_NAME/Server:APPLICATION_SERVER_NAME/] wsadmin>set pmi [$AdminConfig list PMIService $s1] wsadmin>$AdminConfig show $pmi.If PMI is not enabled, enable by running...
wsadmin>$AdminConfig modify $pmi {{enable true}} wsadmin>$AdminConfig save...and then restart the server.
- Set variables for changing the statistic set to a custom set using the following commands:
wsadmin>set perfName [$AdminControl completeObjectName type=Perf, process=APPLICATION_SERVER_NAME,*] wsadmin>set perfOName [$AdminControl makeObjectName $perfName] wsadmin>set params [java::new {java.lang.Object[]} 1] wsadmin>$params set 0 [java::new java.lang.String custom] wsadmin>set sigs [java::new {java.lang.String[]} 1] wsadmin>$sigs set 0 java.lang.String
- Set statistic set to custom using the following command:
wsadmin>$AdminControl invoke_jmx $perfOName setStatisticSet $params $sigs
- Set variables to enable the objectGridModule PMI statistic using the following commands:
wsadmin>set params [java::new {java.lang.Object[]} 2] wsadmin>$params set 0 [java::new java.lang.String objectGridModule=1] wsadmin>$params set 1 [java::new java.lang.Boolean false] wsadmin>set sigs [java::new {java.lang.String[]} 2] wsadmin>$sigs set 0 java.lang.String wsadmin>$sigs set 1 java.lang.Boolean
- Set the statistics string using the following command:
wsadmin>set params2 [java::new {java.lang.Object[]} 2] wsadmin>$params2 set 0 [java::new java.lang.String mapModule=*] wsadmin>$params2 set 1 [java::new java.lang.Boolean false] wsadmin>set sigs2 [java::new {java.lang.String[]} 2] wsadmin>$sigs2 set 0 java.lang.String wsadmin>$sigs2 set 1 java.lang.Boolean
- Set the statistics string using the following command:
wsadmin>$AdminControl invoke_jmx $perfOName setCustomSetString $params2 $sigs2
Enable PMI statistics for the sample application
- Launch the application using:
http://host:port/ObjectGridSample
- To generate actions to the ObjectGrid and maps, in the sample application, click...
ObjectGridCreationServlet | action buttons 1, 2, 3, 4, 5
Do not close this servlet page right now.
- In the administrative console, click...
Monitoring and Tuning | Performance Monitoring Infrastructure | server_name | Runtime tab | Custom radio button | Runtime tree | ObjectGrid Maps module clusterObjectGrid link | ObjectGrid Maps group
Under the clusterObjectGrid group four maps exist:
- counters
- employees
- offices
- sites
In the ObjectGrids instance, there is the clusterObjectGrid instance, and under that instance is a transaction type called DEFAULT.
- You can enable the statistics of interest to you. For example, you can enable number of map entries for employees map, and transaction response time for the DEFAULT transaction type.
What to do next
After PMI is enabled, you can view PMI statistics with the administrative console or through scripting.
Parent topic:
Monitor with WAS PMI