J9 Health Center Enable at Startup
The Health Center agent is shipped with IBM Java and IBM Semeru Runtimes on z/OS (though not z/Linux), but it is not currently shipped with IBM Semeru Runtimes on other platforms, though there are some unsupported workarounds. The Health Center agent neither ships with nor works with HotSpot JVMs.
- Stop the JVM
- Append the following JVM options:
- WebSphere Liberty jvm.options:
-Xhealthcenter:level=headless
- WAS traditional generic
JVM arguments:
-Xhealthcenter:level=headless
- WebSphere Liberty jvm.options:
- Start the JVM
- Reproduce the issue (at least 5 minutes worth because Health Center is a sampling profiler)
- Gracefully stop the JVM (i.e. don't kill it)
- Gather
*.hcd
files from the working directory of the process. By default:- WebSphere Liberty:
$LIBERTY/usr/servers/$SERVER/
- WAS traditional:
$TWAS/profiles/$PROFILE/
- WebSphere Liberty:
Warnings and notes:
- Sometimes HCDs gathered during startup may fail performing method
address to method name lookups due to
JVMTI_ERROR_CLASS_NOT_PREPARED (22)
. On subsequent HCDs, healthcenter should find all those methods, so, if the user is not interested in profiling startup, then they can delay starting the first HCD until the JVM has loaded all (or at least most) of its classes with-Dcom.ibm.java.diagnostics.healthcenter.headless.delay.start=$MINUTES
. Alternatively, append later HCDs into the Health Center client that have the method name mappings. - If the JVM could not be stopped gracefully, gather the temporary
files from a subdirectory of the output called
tmp_${STARTDAY}${STARTMONTH}${STARTYEAR}_${STARTHOUR}${STARTMINUTES}${STARTSECONDS}_
- Use the additional JVM option
-Dcom.ibm.java.diagnostics.healthcenter.headless.output.directory=$DIR
to redirect Health Center files to a different directory instead of the working directory. - If using Liberty and you specify
-Xtrace:buffers={2m,dynamic}
to minimize Health Center method metadata loss, since Liberty defaults to an unlimited maximum thread pool designed to maximize throughput, consider capping this with<executor maxThreads="N" />
based on available native memory to avoid native memory exhaustion, or use a smaller-Xtrace
buffer size such as-Xtrace:buffers={128k,dynamic}
(or lower). - We have observed that some monitoring agents cause problems with
Health Center. Consider removing other monitoring agents that use
-agentpath
while using HealthCenter, engage IBM and the agent company support teams to investigate, or use-Xbootclasspath/p
tohealthcenter.jar
and-agentpath
tolibhealthcenter.so
.
For details, see the Health Center chapter.