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:
- Step 1. Updating the Health Center agent
- Step 2. Enabling the Health Center agent in headless mode
- Step 3: Implementing a script to archive Health Center files
You can analyze the Health Center data that is collected in headless mode by using the Health Center client (see Installing Health Center).
Step 1. Updating the Health Center agent
WebSphere Application Server V8.5 includes Health Center V3.0. You can optionally upgrade the Health Center libraries to obtain the latest fixes and improvements.
Procedure
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.
Procedure
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 output.directory 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.
Procedure
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.
#!/bin/sh
# 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