Team LiB
Previous Section Next Section

jstatJava VM statistics

Synopsis

jstat [ options ] pid [ interval[s|ms] [ count ]]
jstat [ options ] pid@hostname[:port] [ interval[s|ms] [ count ]]

Description

jstat probes a running JVM once or repeatedly and displays statistics about its class loading, just-in-time compilation, memory, or garbage collection performance. The type of information to be displayed is specified by options. A local process to be probed is specified by its process id, as returned, for example, by jps. A remote Java process may be probed by specifying the remote process id, the remote host name, and the port number on which the remote host's rmiregistry server is running (if other than the default of 1099). The remote host must also be running the jstatd server.

By default, jstat probes the specified Java VM once. You may also specify a probe interval, in milliseconds or seconds, to have it probe repeatedly. If you do this, you may additionally specify a total number of probes it should conduct.

jconsole can report many of the same statistics that jstat does but displays them in graphical rather than tabular form. In Java 5.0, jinfo is experimental, unsupported, and not available on all platforms.

Options


-help

Displays a help message.


-options

Displays a list of report types that jstat can display. You must use one of the listed options each time you run jstat.


-version

Displays the jstat version information and exits.


-h n

When jstat probes the Java process repeatedly, this option specifies how often it should repeat the table headers in its output. This option must follow one of the report type options below.


-t

Adds a Timestamp column to the report generated by jstat. The column displays elapsed time (in seconds) since the target Java process was started.

The following options specify the type of statistics to be reported by jstat. Unless you run jstat with -help, -options or -version, you must specify exactly one of these options, and it must be the first option on the command line. Most of the options produce detailed reports of garbage collection minutiae. Consult Sun's tool documentation (part of the JDK documentation bundle) for the interpretation of these reports.


-class

Reports the number of classes loaded and their size in kilobytes.


-compiler

Reports the amount of just-in-time compilation that has been performed, and how long it has taken.


-gc

Reports heap garbage collection statistics.


-gccapacity

Reports capacity information of the garbage collector's various memory pools.


-gccause

Like the -gcutil report but includes information about the cause of the most recent garbage collection.


-gcnew

Reports information on the "new generation" memory pools of the garbage collector.


-gcnewcapacity

Reports capacity information for the garbage collector's "new generation" memory pools.


-gcold

Reports information on the old generation and permanent memory pools of the garbage collector.


-gcoldcapacity

Reports capacity information for the garbage collector's old generation memory pools.


-gcpermcapacity

Reports capacity information for the garbage collector's permanent generation.


-gcutil

Reports garbage collection summaries.


-printcompilation

Reports additional information about just-in-time compilation, including the method names of compiled methods.

See also

jconsole, jps, jstatd

    Team LiB
    Previous Section Next Section