J9 Class Histogram Recipe
- For Semeru Java, replace
$JAVA_HOMEwith the path to Java, and$PIDwith the process ID in (if running under a Windows Service, use a technique to run the command as the SYSTEM user):$JAVA_HOME/bin/jcmd $PID GC.class_histogram - For IBM Java >= 8.0.6.25 that is a JDK (e.g. tWAS 9.0.5.7 and
above and 8.5.5.20 and above), replace
$JAVA_HOMEwith the path to Java, and$PIDwith the process ID in the following command (if running under a Windows Service, use a technique to run the command as the SYSTEM user):$JAVA_HOME/bin/java -Xbootclasspath/a:$JAVA_HOME/lib/tools.jar openj9.tools.attach.diagnostics.tools.Jcmd $PID GC.run- For example:
$ /opt/IBM/WebSphere/AppServer/java/8.0/bin/java -Xbootclasspath/a:/opt/IBM/WebSphere/AppServer/java/8.0/lib/tools.jar openj9.tools.attach.diagnostics.tools.Jcmd 658 GC.class_histogram num object count total size class name ------------------------------------------------- 1 212339 6794848 [C 2 244460 3911360 java.lang.String [...] Total 1251257 39029928
- For example: