Java Troubleshooting Guide for HP-UX Systems
Table 1-13 Options to the jstat Command
Prints statistics on the behavior of the class loader
-class
Prints statistics on the behavior of the Java compiler
-compiler
Prints statistics on the behavior of the garbage collected heap
-gc
Prints statistics of the capacities of the generations and their
corresponding spaces
-gccapacity
Prints the summary of garbage collection statistics with the cause of the
last and current (if applicable) garbage collection events
-gccause
Prints statistics of the behavior of the new generation
-gcnew
Prints statistics of the sizes of the new generations and their
corresponding spaces
-gcnewcapacity
Prints statistics of the behavior of the old and permanent generations
-gcold
Prints statistics of the sizes of the old generation
-gcoldcapacity
Prints statistics of the sizes of the permanent generation
-gcpermcapacity
Prints a summary of garbage collection statistics
-gcutil
Prints Java compilation method statistics
-printcompilation
A complete description of the jstat tool, including examples, can be found at:
http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/jstat.html
The following example of the jstat command attaches to pid 27395 and takes five samples at
250 millisecond intervals. The -gcnew option specifies that statistics of the behavior of the new
generation is output.
$ jstat -gcnew 27395 250 5
S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT
64.0 64.0 0.0 31.7 31 31 32.0 512.0 178.6 249 0.203
64.0 64.0 0.0 31.7 31 31 32.0 512.0 355.5 249 0.203
64.0 64.0 35.4 0.0 2 31 32.0 512.0 21.9 250 0.204
64.0 64.0 35.4 0.0 2 31 32.0 512.0 245.9 250 0.204
64.0 64.0 35.4 0.0 2 31 32.0 512.0 421.1 250 0.204
The following table lists the descriptions of the column headings in the example:
Table 1-14 jstat — New Generation Statistics
DescriptionColumn
Current survivor space 0 capacity (KB)S0C
Current survivor space 1 capacity (KB)S1C
Survivor space 0 utilization (KB)S0U
Survivor space 1 utilization (KB)S1U
Tenuring thresholdTT
Maximum tenuring thresholdMTT
Desired survivor size (KB)DSS
Current Eden space capacity (KB)EC
Eden space utilization (KB)EU
Number of young generation GC eventsYGC
Young generation garbage collection timeYGCT
1.17 jstat (1.5+ only) 41