Adam Bien's Weblog

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:!

NEW workshop: HTML 5 and JavaScript Essentials, Three days in April 2017: from Java EE 7 Architectures over Microservices to Performance, Troubleshooting and Monitoring
On demand workshops: Java EE 7: Bootstrap, Effective, Testing and Microservices available for streaming.


A book about rethinking Java EE Patterns


Fuck you alll!
I hate you

Posted by Mariusz on June 19, 2015 at 11:15 AM CEST #


it seems like you don't like heap dumps.

Plain Java EE, without threadlocals and custom singletons minimizes the possibility of memory leaks and so the need for taking heap dump.

IMO vanilla Java EE should significantly improve your mood,


Posted by Adam Bien on June 22, 2015 at 01:48 PM CEST #

Heh....never seen someone so angered by heap dumps :-)
Maybe he wasn't held enough as a child ?!

Posted by on October 26, 2016 at 05:54 PM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
Online Workshops
...the last 150 posts
...the last 10 comments