Technical Blog Post
Pointing to a Non-default Java Health Center Agent
One of the first steps in setting up Java™ Health Center (JHC) is to update to the latest JHC Agent. See Installing Health Center in the product documentation.
In some cases, a WebSphere Application Server (WAS) administrator may not want to alter the WAS or Java binaries but still want to take advantage of the latest agent capabilities. In that case, the administrator may choose an alternative installation directory of the JHC Agent and point the WAS JVM to locate it there.
This is outlined under "It is possible to update to the latest agent without modifying the binaries in the WAS folder" in the IBM WebSphere Application Server Performance Cookbook - IBM Java Health Center:
- Extract the agent ZIP into any directory; for example, /work/healthcenter/agent/
- Take a javacore of the running target server and find the last value of -Djava.ext.dirs (note that there may be multiple instances, so always take the last value). For example: -Djava.ext.dirs=/work/local/was85/tivoli/tam:/work/local/was85/java/jre/lib/ext
- Prepend the path to the ext folder under the expanded HealthCenter agent directory to -Djava.ext.dirs. For example: -Djava.ext.dirs=/work/healthcenter/agent/jre/lib/ext:/work/local/was85/tivoli/tam:/work/local/was85/java/jre/lib/ext
- Append this parameter as well as the following parameters (replacing the path to the HealthCenter agent) to the generic JVM arguments: -Djava.ext.dirs=/work/healthcenter/agent/jre/lib/ext:/work/local/was85/tivoli/tam:/work/local/was85/java/jre/lib/ext -agentpath:/work/healthcenter/agent/jre/bin/libhealthcenter.so -Dcom.ibm.java.diagnostics.healthcenter.agent.properties.file=/work/healthcenter/agent/jre/lib/healthcenter.properties
- Append this parameter to the "Classpath" textbox on the same page as the generic JVM arguments (replacing the path to the HealthCenter agent): /work/healthcenter/agent/jre/lib/ext/healthcenter.jar
- Add the necessary HealthCenter arguments described above to enable it.
- Restart the JVM.
WARNING: Please document this change and remember to manually update the agent regularly. By changing the agent location, Java will no longer update it as part of a Java update.