Java, Maven and Gradle 25 · Diagnostics
Show heap usage
Print a summary of the heap.
jcmd 12345 GC.heap_info
Official Java, Maven and Gradle 25 documentation
More diagnostics commands
- List running Java processes
- Take a thread dump
- Write a heap dump
- Dump the heap on OutOfMemoryError
- Show the flags a JVM is using
All diagnostics commands · Java, Maven and Gradle 25 cheatsheet