HPjmeter 4.2 User's Guide
• Heap in use after the GC event
• Current maximum heap size
• Duration of the GC event
To capture basic -Xloggc data, use the following command:
$ java ... -Xloggc:filename
More data are available if you start the JVM with the -XX:+PrintGCDetails or
-XX:+PrintHeapAtGC options. For example, you can type:
$ java ... -XX:+PrintGCDetails -Xloggc:filename
Use these additional options to obtain more data on GC activity in the eden space, the survivor
space, the old generation, and the permanent generation.
NOTE:
Using -XX:+PrintGCDetails and -XX:+PrintHeapAtGC Together
Some JVMs improperly mix the output from these two options, resulting in a data file that cannot
be parsed properly by HPjmeter. We recommend using only one of the two options.
To see the availability in HPjmeter of metrics derived from -Xloggc data, see -Xverbosegc and
-Xloggc Options and Their Corresponding Metrics (page 85).
Naming GC Data Files
The following table shows the file name formats used by default when naming files containing
garbage collection data. You may want to follow this convention when naming GC data files,
but it is not required.
Table 6-3 Default File Name Suffixes for GC Data
File Name SuffixOption
.vgc-Xverbosegc
.vgc-Xloggc
-Xverbosegc and -Xloggc Options and Their Corresponding Metrics
The following metrics or features are available depending on the option used to collect data.
Table 6-4 Available Metrics from -Xverbosegc and -Xloggc Garbage Collection Data
-Xloggc-XverbosegcMetric
NoYesAllocation Site Statistics (page 161)†
YesYesHeap Usage After GC (page 157)
YesYesDuration (Stop the World) (page 158)
YesYesCumulative Allocation (page 159)
YesYesCreation Rate (page 160)
YesYesCumulative GC duration*
YesYesHeap usage before GC*
YesYesHeap capacity*
YesYesReclaimed bytes*
NoYesPromoted bytes*
YesYesPercentage of Time in GC*
-Xverbosegc and -Xloggc Options and Their Corresponding Metrics 85