Ask the Community
Groups
Heap dump collection on DGE/DGEX (Linux) - Connect IT Community | Kaseya
<main> <article class="userContent"> <p><strong>QUESTION</strong> </p> <p>How do I collect heap dumps for the DGE component when troubleshooting issues such as Out Of memory (OOM)</p> <p><br><strong>RESOLUTION</strong></p> <p>-install JDK. For example, in CentOS;<br><code class="code codeInline" spellcheck="false" tabindex="0">yum install java-1.6.0-openjdk-devel</code></p> <p>-Use netstat -anp to determine DGE component process ID:<br><code class="code codeInline" spellcheck="false" tabindex="0">netstat -anp | grep 7692</code><br>tcp 0 0 0.0.0.0:7692 0.0.0.0:* LISTEN 8523/java<br>In this case the process id is found to be '8523'</p> <p>-Generate an initial heap dump using 'jmap' (8523 is process id in this example);<br><code class="code codeInline" spellcheck="false" tabindex="0">jmap -dump:format=b,file=/tmp/initial_dge.hprof 8523</code><br>Dumping heap to /tmp/initial_dge.hprof ...<br>Heap dump file created</p> <p>-Generate a heap dump about an hour later using 'jmap' (8523 is process id in this example);<br><code class="code codeInline" spellcheck="false" tabindex="0">jmap -dump:format=b,file=/tmp/dge_1hs.hprof 8523</code><br>Dumping heap to /tmp/second_dge.hprof ...<br>Heap dump file created</p> <p>-Generate a heap dump after a crash (in the event logs/oom_dge.hprof is not generated) using 'jconsole' (8523 is process id in this example);</p> <p><code class="code codeInline" spellcheck="false" tabindex="0">jmap -dump:format=b,file=/tmp/dge_post_crash.hprof 8523</code><br>Dumping heap to /tmp/crash_dge.hprof ...<br>Heap dump file created</p> <p> </p> <p>The steps below were part of the original article and are no longer applicable:</p> <p>-Enable heap memory dump on OOM (<TRAVERSE_HOME>/etc/monitor.init):<br><code class="code codeInline" spellcheck="false" tabindex="0">CONFIG="${CONFIG} -Dcom.sun.management.jmxremote.ssl=false"</code><br>change to<br><code class="code codeInline" spellcheck="false" tabindex="0">CONFIG="${CONFIG} -Dcom.sun.management.jmxremote.ssl=false"</code><br><code class="code codeInline" spellcheck="false" tabindex="0">CONFIG="${CONFIG} -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=../logs/oom_dge.hprof"</code></p> <p>-Restart DGE component</p> <p> </p> <p><strong>APPLIES TO</strong></p> <p>All Linux Traverse versions</p> <p><br><strong>REFERENCE </strong></p> <p>See also <a rel="nofollow" href="https://kaseya.vanillacommunities.com/kb/articles/aliases/kaseya/hc/en-gb/articles/229044008">Troubleshooting: Generate a thread/stack dump for a Traverse component</a></p> </article> </main>