adam bien's blog

Taking A Heap Dump With jcmd (Java 7 / 8) 📎

  1. Execute jcmd without any parameters to list all JVM processes, starting with a PID. The command jps also does the job.
  2. Execute: jcmd [PID] GC.heap_dump [PATH] to create a heap dump.
  3. 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!