Tools Practical By Samson Tanimawo, PhD Published Oct 23, 2025 4 min read

jstack and jcmd for JVM Debugging

jstack and jcmd for JVM analysis.

jstack

jstack PID dumps thread state.

Find deadlocks; find what threads are blocked on.

jcmd

jcmd PID GC.heap_dump path.hprof for heap dump.

jcmd PID Thread.print equivalent to jstack.

When

Java apps with high CPU or hung threads.

jstack first; heap dump if memory.