Java stack (jstack) tool

Use the jstack tool to obtain Java stack traces and thread information for processes. The tool is similar to the HotSpot tool of the same name; the Eclipse OpenJ9™ version of jstack is an independent implementation, added for compatibility.

The command syntax is as follows:

jstack <options>* <pid>*

Where <pid>* is a list of process IDs. If none are supplied, the process IDs are read from stdin, which allows a user running a Bourne or equivalent shell to query all processes via jps -q | jstack. IDs of inactive processes are silently ignored. The output contains Java stacks and thread information of the specified processes (equivalent to the information provided in java.lang.management.ThreadInfo).

The values for <options>* are as follows:

Restrictions:

The tool uses the Attach API, and has the following limitations:

For more information about the Attach API, including how to enable and secure it, see Support for the Java Attach API.