Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 723 Bytes

jvm-thread-dumps-on-windows.md

File metadata and controls

23 lines (14 loc) · 723 Bytes

JVM Thread Dumps On Windows

Category: Java

JVM thread dumps can be used to inspect the internal state of a Java process and determine whether any threads are deadlocked or spiking the CPU. A thread dump can be performed at the command line on Windows.

Get the process ID (PID) for the running JVM using Task Manager or PowerShell:

Get-Process java

Create a thread dump using jstack

With the PID, perform the thread dump using jstack and send the output to a file:

jstack <PID> > thread-dump-output.txt

Create a thread dump with key commands

Alternatively, from a running console window, press Ctrl + Shift + Pause which will print the thread dump directly to the console.