Java statistics monitoring (
jstat tool to obtain Java Virtual Machine (JVM) statistics. The tool is similar to the HotSpot tool of the same name; the OpenJ9 version of
jstat is an independent implementation, added for compatibility.
The command syntax is as follows:
jstat [<option>] [<vmid>]
vmid is the Attach API virtual machine identifier for the Java process. This ID is typically the same as
the operating system process ID, unless you specified the -Dcom.ibm.tools.attach.id system property when you started the process.
VMID is shown in Java process status (jps) tool or other Attach API-based tools.
On its own,
jstat prints help information. The values for
<option> are as follows:
-J: supplies arguments to the JVM that is running the
jstatcommand. You can use multiple
-Joptions, for example:
jstat -J-Xmx10m -J-Dcom.ibm.tools.attach.enable=yes
-h: prints help information
-options: lists the available command options
-class: displays classloading statistics
The output has the following format:
Class Loaded Class Unloaded 860 0
- This tool is not supported and is subject to change or removal in future releases.
- Although similar in usage and output to the HotSpot tool of the same name, this tool is a different implementation that is specific to OpenJ9. For more information about differences, see Switching to OpenJ9.
The tool uses the Attach API, and has the following limitations:
- Displays information only for local processes that are owned by the current user, due to security considerations.
- Displays information for OpenJ9 Java processes only
- Does not show information for processes whose Attach API is disabled. Note: The Attach API is disabled by default on z/OS.
For more information about the Attach API, including how to enable and secure it, see Java Attach API.