You can 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.
Before you begin
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.
About this task
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 .
- 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.
- Open a command line prompt. Navigate to the was_root/bin directory.
Type wsadmin to start the wsadmin command line
tool.
- 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,
run the following commands to enable PMI: wsadmin>$AdminConfig modify $pmi {{enable true}}
wsadmin>$AdminConfig save
If you need to enable PMI,
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
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.
Example
You can perform the following steps
to enable PMI statistics
for the sample application:
- Launch the application using the http://host:port/ObjectGridSample Web
address, where host and port are the host name and HTTP port number
of the server where the sample is installed.
- In the sample
application, click ObjectGridCreationServlet, and
then click action buttons 1, 2, 3, 4, and 5 to generate actions to
the ObjectGrid and maps. Do not close this servlet page right now.
- In the administrative console, click Click
the Runtime tab.
- Click the Custom radio
button.
- Expand the ObjectGrid Maps module in the runtime
tree, then click
the clusterObjectGrid link. Under the ObjectGrid Maps group, there
is an ObjectGrid instance called clusterObjectGrid, and under the
clusterObjectGrid group four maps exist: counters, employees, offices,
and 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.