JSTAT is Java Virtual Machine Statistics Monitoring Tool. jstat provides information on performance and resource consumption of running applications.
Usage: jstat [ outputOptions vmid [interval[s|ms] [count]] ]
If you do not specify a general option, then you can specify output options. Output options determine the content and format of jstat’s output, and consist of a single statOption, plus any of the other output options ( -h, -t, and -J). The statOption must come first.
Output is formatted as a table, with columns are separated by spaces. A header row with titles describes the columns. Use the -h option to set the frequency at which the header is displayed. Column header names are gener ally consistent between the different options. In general, if two options provide a column with the same name, then the data source for the two columns are the same.
Use the -t option to display a time stamp column, labeled Timestamp as the first column of output. The Timestamp column contains the elapsed time, in seconds, since startup of the target JVM. The resolution of the time stamp is dependent on various factors and is subject to variation due to delayed thread scheduling on heavily loaded systems.Us e the interval and count parameters to determine how frequently and how many times, respectively, jstat displays its output.
Some of the frequently used statOptions:
# jstat -class prints statistics on the behavior of the class loader;
# jstat -compiler prints statistics of the behavior of theHotSpot compiler.
# jstat -gc prints statistics of the behavior of the garbage collected heap.
# jstat -gccause prints the summary of garbage collection statistics (same as -gcutil), with the cause of the last and current (if applicable) garbage collection events.
# jstat -gcutil prints a summary of garbage collection statistics.
In this example vmid=21891, interval=250ms count=7