Getting a list of server statisticsAdded by IBM | Edited by IBM on March 15, 2012 | Version 3 (Show original)
|Use administrative commands to retrieve server statistics.
Use administrative commands to retrieve server statistics.
Before you begin
To run administrative commands, you must use the wsadmin client. See Starting the wsadmin client
- To get a list of server statistics from a web page:
- Open a web browser and access the Activities application, providing the required authentication credentials.
- After logging in, go to the following web address:
is the host name and port number for your server.
You must be assigned to the metrics-reader role to be able to view metrics. Everyone is added to the metrics-reader role by default. If you want to limit who can view metrics, edit the membership of the metrics-reader role using the WebSphere
® Application Server Integrated Solutions Console. You might want to limit the members of this role, for example, if you are using the Tivoli
® Access Manager (TAM) and do not want everyone to be able to see the server identity, which is displayed on the metrics page for the Activities application. No other application metrics pages include the TAM server identity information.
- To get a list of server statistics using the wsadmin client:
- Open a command window and start the wsadmin command line tool. See Starting the wsadmin client for more details.
- Start the Activities Jython script interpreter.
- Use the following command to access the Activities configuration file:
If prompted to specify which server to connect to, type 1.
The information about which server to connect to is only used by the wsadmin client when you are running administrative commands to collect statistics.
- Enter one of the following commands.
Parent topic: Monitoring statistics and metrics
- To get a list of all the statistics formatted as a java.util.Hashtable:
- To return statistics for a specific area of the product:
StatisticsService.fetchStatistic( java.lang.String key)
- Specify the name of one of the statistics listed in the web page that you accessed earlier as the value for the key parameter. Use the Stop Watch Statistics to return a hash table of all of the statistics.
This command returns a value formatted as a java.lang.Integer or java.util.Hashtable object containing the following statistics data:
Average duration of a single invocation.invocations
Number of times that the function was invoked. maximum
Maximum duration of a single invocation.minimum
Minimum duration of a single invocation. total
Total duration of this operation.