Get a list of server statistics 

Use administrative commands to retrieve server statistics.


Before you begin

To run administrative commands, use the wsadmin client. See Starting the wsadmin client for details.


Procedure

  1. To get a list of server statistics from a web page:

    1. Open a web browser and access the Activities application, providing the required authentication credentials.

    2. After logging in, go to the following web address:

        http://<servername.com:port>/activities/service/html/serverstats

        where <servername.com:port> is the host name and port number for your server.

        Note: 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 WAS 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.

  2. To get a list of server statistics using the wsadmin client:

    1. Open a command window and start the wsadmin command line tool. See Starting the wsadmin client for more details.

    2. Start the Activities Jython script interpreter.

      1. Access the Activities configuration file:

          execfile("activitiesAdmin.py")

          If prompted to specify which server to connect to, type 1.

          Note: The information about which server to connect to is only used by the wsadmin client when you are running administrative commands to collect statistics.

    3. Enter one of the following commands.

      • To get a list of all the statistics formatted as a java.util.Hashtable:

          StatisticsService.fetchStatistics()

      • 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

            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.


Parent topic

Monitoring statistics and metrics


   

 

});