Every FileCatalyst application that runs, whether it is a service or in stand-alone mode has a Process ID (PID) associated with it when it launches.
A Heap Dump is a snapshot of the memory of a Java Process. The snapshot contains information about the Java objects and classes in the heap at the moment the snapshot is triggered. Our developers can use this information to analyze the root cause of failures.
This article will explore a command line method which can be used on Linux, Windows, and MAC OSX Environments. There are two PDF documents attached which will explore alternative methods with a GUI. If the primary method using the jmap command do not produce results please use the method listed in the respective PDF.
The JMAP application which is shipped with the Java Development Kit (JDK) is no available through standard Java RE installations and a Java JDK is required to collect a Heap Dump. The Java Development Kit installer is available through Java's Download Portal: http://www.oracle.com/technetwork/java/javase/downloads/index.html
FileCatalyst Direct Suite.
Java Development Kit v7.0 and v8.0.
- Verify Java Version
- Open a Command Prompt or Terminal Window.
- Run the following command:
The output should return:
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
- If the Java version information is not displayed properly, you will need to re-install the Java JDK.
- Process ID of the FileCatalyst Application
- Open the Task Manager application.
- Under the Details tab locate the java.exe process and look for the PID.
- MacOSX (using UI):
- Open the Activity Monitor application.
- Under the Process Name column locate your FileCatalyst Application. In the corresponding row, the Process ID (PID) will be shown.
- Linux and MacOSX (command line method):
- Open the command prompt.
- Run the following command:
ps -ax | grep FileCatalyst
This command will output a list of applications running with their PID. Here is an example of MAC OSX output:
0 71 1 0 Mon10am 89:16.73 /Applications/FileCatalystServer.app/Contents/MacOS/FileCatalystServer -service
0 101 1 0 Mon10am 46:11.65 /Applications/FileCatalystHotFolder.app/Contents/MacOS/FileCatalystHotFolder -service
503 14625 1 0 1:53pm 0:42.27 /Applications/FileCatalystHotFolderAdmin.app/Contents/MacOS/FileCatalystHotFolderAdmin
503 14636 1 0 1:53pm 0:54.89 /Applications/FileCatalystServerAdmin.app/Contents/MacOS/FileCatalystServerAdmin
In this list, the second column references the PID and the FileCatalyst Server Service has a PID of 71.
- Capturing a Heap Dump
For this section we will use the Process ID of the FileCatalyst Server Service in step 2c), which was observed as 71.
From the command line run the following command to process the Heap Dump:
Windows and Linux Command:
jmap -dump:format=b,file=<storage_path>/filecatalyst-application.hprof <PID>
Mac OSX Command:
jmap -J-d64 -dump:format=b,file=<storage_path>/filecatalyst-application.hprof <PID>
Using the Process ID from the example above, the command would look like:
jmap -dump:format=b,file=/heapdump-storage/filecatalyst-server-heapdump.hprof 71
- The parameter file=/heapdump-storage/filecatalyst-server-heapdump.hprof, will indicate where the Heap Dump will be stored.
- At the bottom of this article, there are two PDF's that are available for the Heap Dump Process in a Windows and Linux Environment.