Skip to main content

Accessing Heap Dump

  • August 24, 2021
  • 0 replies
  • 147 views

Drew Kreiger
Rock star
Forum|alt.badge.img

Sometimes it may be necessary to take a heap dump (memory snapshot) of a running pipeline or data collector in order to troubleshoot issues such as memory leaks or excessive memory consumption by a stage.

The most commonly known tool for doing this is jmap which is included in the Java Development Kit (JDK). This tool has actually been superseded by another tool called jcmd which is available not only in the JDK but also in the server Java Runtime Environment (JRE) which is what is installed in the official StreamSets Docker image.

Detailed usage is available at the following URL: https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/tooldescr006.html

Taking a Heap Dump can be done by issuing the following command:

jcmd <pid> GC.heap_dump <filename>.hprof

this is equivalent to the old jmap command:

jmap -dump:file=<filename>.hprof <pid>

 

-Adam Kunicki

October 28, 2020 15:22
This topic has been closed for replies.