Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Java™ Troubleshooting Guide for HP-UX Systems: > Chapter 1 Diagnostic and Monitoring Tools and Options

jstat (1.5+ only)

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

The jstat utility is a statistics monitoring tool. It attaches to a Java VM and collects and logs performance statistics as specified by the command-line options. The target Java VM is identified by its virtual machine identifier.

The jstat utility does not require the Java VM to be started with any special options. This utility is included in the JDK download.

The following table lists the jstat command options:

Table 1-13 Options to the jstat Command

-classPrints statistics on the behavior of the class loader
-compilerPrints statistics on the behavior of the Java compiler
-gcPrints statistics on the behavior of the garbage collected heap
-gccapacityPrints statistics of the capacities of the generations and their corresponding spaces
-gccausePrints the summary of garbage collection statistics with the cause of the last and current (if applicable) garbage collection events
-gcnewPrints statistics of the behavior of the new generation
-gcnewcapacityPrints statistics of the sizes of the new generations and their corresponding spaces
-gcoldPrints statistics of the behavior of the old and permanent generations
-gcoldcapacityPrints statistics of the sizes of the old generation
-gcpermcapacityPrints statistics of the sizes of the permanent generation
-gcutilPrints a summary of garbage collection statistics
-printcompilationPrints Java compilation method statistics

 

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

ColumnDescription
S0CCurrent survivor space 0 capacity (KB)
S1CCurrent survivor space 1 capacity (KB)
S0USurvivor space 0 utilization (KB)
S1USurvivor space 1 utilization (KB)
TTTenuring threshold
MTTMaximum tenuring threshold
DSSDesired survivor size (KB)
ECCurrent Eden space capacity (KB)
EUEden space utilization (KB)
YGCNumber of young generation GC events
YGCTYoung generation garbage collection time

 

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2009 Hewlett-Packard Development Company, L.P.