Name

jstat — Java 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 ...

Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.