Sun Java System Web Server 7.0 Update 3 Performance Tuning, Sizing, and Scaling Guide

Monitoring Current Activity Using stats.xml

You can also display statistics using stats-xml, which displays statistics in XML format. The output of stats-xml is in XML so that various tools can easily parse the statistics. You can view the stats-xml output through a URI, which you have to enable, or you can view the stats-xml output through the CLI, which is enabled by default.

ProcedureTo Enable the stats-xml URI from the Admin Console

If you enable the stats-xml URI, you can access statistics for your server in XML format through a browser. Note that when you use the stats-xml URI, you can access statistics even when the Administration Server is not running. Also, with the stats-xml URI activated, users can see the statistics information for your server, unless you take precautions to deny access.

  1. On the Common Tasks page, select the configuration from the pull-down menu on the left.

  2. Select the virtual server from the pull-down menu on the right, then click Edit Virtual Server.

  3. On the Server Settings tab, click the Monitoring Settings sub tab.

  4. Select the XML Report enabled checkbox.

  5. Provide a URI, for example, /stats-xml.

  6. Click Save.

  7. Deploy the configuration.

  8. Access the stats-xml URI, for example:

    http://yourhost:port/stats-xml

    The statistics are displayed in XML format.

ProcedureTo Enable the stats-xml URI from the CLI

  1. Use the following command to enable stats-xml:

    ./wadm enable-stats-xml --user=admin-user --password-file=admin-password-file [--uri-prefix=prefix]--config=config-name --vs=virtual-server-name

    Use the uri-prefix option to set the stats-xml URI.

  2. Deploy the configuration using the wadm deploy-config command.

  3. Access the stats-xml URI, for example:

    http://yourhost:port/stats-xml

    The statistics are displayed in XML format.

ProcedureTo Limit the stats-xml Statistics Displayed in the URI

You can modify the stats-xml URI to limit the data it provides.

  1. Modify the stats-xml URI to limit the information by setting elements to 0 or 1. An element set to 0 is not displayed on the stats-xml output. For example:

    http://yourhost:port/stats-xml?thread=0&process=0

    This syntax limits the stats-xml output so that thread and process statistics are not included. By default all statistics are enabled (set to 1).

    Most of the statistics are available at the server level, but some are available at the process level.

    Use the following syntax elements to limit stats-xml:

    • cache-bucket

    • connection-queue

    • connection-queue-bucket (process-level)

    • cpu-info

    • dns-bucket

    • jdbc-resource-bucket

    • keepalive-bucket

    • process

    • profile

    • profile-bucket (process-level)

    • request-bucket

    • servlet-bucket

    • session-replication

    • thread

    • thread-pool

    • thread-pool-bucket (process-level)

    • virtual-server

    • web-app-bucket

ProcedureTo View stats-xml Output from the CLI

In addition to a URI, you can also access stats-xml output through the command-line interface which is enabled by default. Unlike viewing stats-xml output through the URI, the Administration Server must be running to view stats-xml output at the command-line. However, if request processing threads are hanging in your server, and you cannot use the URI, you can still access stats-xml output through the CLI.

  1. To view the stats-xml output through the command-line interface, enter:

    ./wadm get-stats-xml --user=admin-user --password-file=admin-password-file --config=config-name --node=node-name