How do I generate a Heap Memory dump for a particular Traverse component?
These steps assume that the component is listed as running within the Traverse Service Controller (or ./etc/traverse.init status for Linux).
On a Linux server:
- First install a JDK on the Traverse Linux server, if not already installed:
sudo yum install java-1.6.0-openjdk-devel
- Next determine the process ID of the Traverse component (see https://kaseya.zendesk.com/entries/92066808-How-to-determine-PID-process-ID-of-a-Traverse-component)
- Generate a heap dump from a shell prompt using the 'jmap' utility included with the JDK and substituting the correct process ID instead of '9999' and specifying an appropriate output file name;
sudo jmap -dump:format=b,file=/tmp/jvm.hprof 9999 Dumping heap to /tmp/jvm.hprof ... Heap dump file created
On a Windows server:
- Download and install the Oracle JDK (https://www.oracle.com/java/)
- Determine the process ID of the Traverse component (see https://kaseya.zendesk.com/entries/92066808-How-to-determine-PID-process-ID-of-a-Traverse-component)
- From the 'bin' folder in the JDK installation location, run the 'jmap' utility, substituting the correct process ID and an appropriate output file name. For example;
cd C:\Program Files\Java\jdk1.7.0_45\bin
jmap -dump:format=b,file=jvm.hprof 9999
Dumping heap to C:\Program Files\Java\jdk1.7.0_45\bin\jvm.hprof ...
Heap dump file created
Generating A Heap Dump Using JConsole