Setting up IBM Health Center to collect performance data

IBM Health Center for Java is a low-overhead agent that collects Java configuration and performance data. The data that is collected includes CPU usage, native memory usage, method profiling, garbage collection, locks, threads, and more.

When the agent is configured in headless mode, it continuously collects performance data into Health Center (.hcd) files. This data is valuable not only for performance tuning, but it also serves as a performance flight recorder for root cause analysis of production incidents.

To set up Health Center in headless mode, complete these steps:

You can analyze the Health Center data that is collected in headless mode by using the Health Center client (see Installing Health Center).

Tip: As an alternative to the Health Center client, you can use the WebSphere Commerce Health Center Report tool. This tool uses the Health Center file (.hcd) to generate a web-based report of the performance data with insights that are specific to WebSphere Commerce. For more information, see WebSphere Commerce Health Center Report.

Step 1. Updating the Health Center agent

The Health Center agent libraries are included with the WebSphere Application Server Java SDK. However, Health Center 3.0 or later is required for WebSphere Commerce.


Ensure that you have the Health Center agent version 3.0 or later installed.
Tip: To see the version, use this command:
WAS_installdir/java/bin/java -Xhealthcenter -version

The version is also displayed in the Health Center client.

To update the libraries, choose one of the following options:

  • Option 1: Update the SDK component of WebSphere Application Server to Fix Pack 37 ( or later. To check the current fix pack and SDK levels, run the versionInfo command. To see only the SDK information, use the -maintenancePackages | grep SDK parameter. For more information, see versionInfo command for WebSphere Application Server.
  • Option 2: Download the latest libraries that are included with the Health Center client. The Health Center client has more frequent release cycles than WebSphere Application Server. Therefore, the libraries that are provided with the Health Center client are typically more recent than the libraries that are provided with WebSphere Application Server. For more information on downloading the libraries from the client, see Installing Health Center.

Step 2. Enabling the Health Center agent in headless mode

Use the WebSphere Integrated Solutions console to update the server's generic JVM arguments that enable the agent in headless mode.


  1. Open the WebSphere Integrated Solutions Console.
  2. Select Servers.
  3. Expand Server Type and then click WebSphere application servers.
  4. Click the name of your server.
  5. Expand Java and Process Management and then click Process Definition.
  6. Under the Additional Properties section, click Java Virtual Machine.
  7. Scroll down and locate the Generic JVM arguments field.
  8. Add the following arguments in a single line:

    For more information, see Health Center Configuration Properties.

Step 3: Implementing a script to archive Health Center files

Health Center continuously creates healthcenter*.hcd files in the directory that is specified by the property at the interval that is set by the run.duration property. The default interval is 15 minutes. You must implement a script to archive older files.

With the recommended configuration, files are typically from 500 KB to 2 MB. A week's worth of data might use from 0.5 GB to 1.5 GB of disk space.


Implement the script to archive the files.

The following Linux sample script archives .hcd files from yesterday and keeps the files for up to a week. Schedule the script to run daily, for example, as a Cron job.

Note: In the sample script, the working directory path is an example. Ensure that the path in your script matches the location of your Health Center files.

# Working directory
cd /opt/WebSphere/AppServer/profiles/demo/logs/server1/healthcenter/
# Back up files from yesterday
find healthcenter*.hcd -daystart -mtime +0 -exec zip -m healthcenter_`date -d yesterday +"m%d"`.zip {} +
# Delete backups older than a week
find healthcenter_*.zip -daystart -mtime +6 -delete