Skip to content
Capture JVM thread dumps without requiring safepoints
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


astack is a JVM TI agent that allows capturing Java stack traces of all threads in a JVM, similar to jstack, but without requiring the JVM to reach a safepoint. This allows debugging and monitoring without impacting the running application, which is important because reaching a safepoint may take many seconds when the system is under heavy load.

The agent listens on a TCP port and returns a new thread dump whenever a client connects, allowing easy remote monitoring.


make JAVA_HOME=/path/to/jdk


Run Java with the agent added as a JVM argument, specifying the port number for the agent to listen on:


Alternatively, if modifying the Java command line is not possible, the above may be added to the JAVA_TOOL_OPTIONS environment variable.

You can’t perform that action at this time.