Taking A Heap Dump With jcmd (Java 7 / 8) 📎
- Execute
jcmd
without any parameters to list all JVM processes, starting with a PID. The commandjps
also does the job. - Execute:
jcmd [PID] GC.heap_dump [PATH]
to create a heap dump. - Enjoy the memory leak analysis :-)
See you at Java EE Workshops at MUC Airport or on demand and in a location very near you: airhacks.io!