Use the following command to capture allocation site statistics in a file for display in the HPjmeter garbage collection viewer. The GC viewer automatically opens when you open an Xverbosegc file from the HPjmeter console in one of the following ways:
•Using
$ java ...
•Sending a signal to the JVM to capture allocation site statistics data at that time: $ kill
OR
$ kill
Data from the opened file is visible in the Allocation Site Statistics (page 161) visualizer.
Collecting Glance Data for Viewing in HPjmeterIf you have the HP GlancePlus product installed on your
$ /opt/hpjmeter/bin/javaGlanceAdviser.ksh 1234 ga.out.1234
This command collects information about process 1234 using the default sampling interval, and writes the results to the file ga.out.1234. You can then open this file in the HPjmeter console to view the data graphically. If you also collected GC information using the
Data from the opened file is visible in the Glance Data (page 170) visualizer, accessible from the Glance Adviser tab on the GC visualizer. Glance system call data is obtained from the PROC_SYSCALL loop in Glance Plus, and is visible in the Glance System Call Data (page 174) visualizer, accessible from the Glance System Call tab on the GC visualizer.
Collecting GC Data with Zero Preparation
Zero preparation GC data collection is a feature in the HP JDK/JRE 5.0.14 and later, and 6.0.02 and later. It is started from the command line by sending a signal to the JVM to start GC data collection.
To collect GC data without interrupting an already running application, do the following from the command line:
1.Confirm that HP JDK/JRE 5.0.14 or later, or 6.0.02 or later is running the application that you want to analyze, and that no
3.Start the profiling interval. Send a signal to the JVM by typing: kill
The GC data will be written to a file named java_pid.vgc in the current directory of the JVM process.
Obtaining Garbage Collection Data | 83 |