Want to get Heap dump from server node java process, but do not know how to do it.
- Some memory leak is observed, but cannot be allocated without heap dump.
- Want to produce heap dump.
- Heap dump
- Memory analyzer
You need to produce heap dump. Need instructions step by step what to do.
To make a heap dump in server node java process, nevertheless there were
or there weren't OutOfMemory, you have two properties in JVM (Java Virtual Machine)
For our purposes it is enough to use the first property. We will search generated heap dump
java_pid<PID>@COUNT.hprof file in: _\usr\sap\<SID>\<Instance_name><Instance_number>\j2ee\cluster\server<X>
for server node <X>.
To enable heap dump - read and apply following steps:
Open config tool
Navigate to "additional properties"
Add new Additional property without value, with name:
Save configuration in config tool. (And close it.)
Restart the cluster in order to apply the new property.
(Starting of java process with added property will enable heap dump for current java process)
To get the heap dump afterwards, follow next steps:
Navigate to "AS Java Process Table"
Select server node, which heap dump you want (server0 / server1).
From context menu select "Dump Stack Trace"
Your *.hprof file with heap dump is generated in folder for server process that you have selected:
For server process 0 - see in folder: \usr\sap\<SID>\<Instance_name><Instance_number>\j2ee\cluster\server0\
Search for file like this one: java_pid11984_@COUNT.hprof (where 11984 is the PID <Process ID> of java process for server node in OS).
To open and analyze produced heap dump afterwards read steps:
You already have java_pid<PID>_@COUNT.hprof file and need to analyze gathered information.
Navigate in menu: File -> Open Heap Dump... or File -> Open File...
New window with browser will appear asking where is stored *.hprof file with heap dump.
Navigate to produced heap dump file and click "Open" button.
Analyze the results.
NOTE: Plug-in for NWDS may throw OutOfMemory, when it opens a big heap dump. So it is recommended to use standalone memory analyzer application.
NOTE: If you have no installed memory analyzer, you should refer to links in Related External References below.
The symbols used on this page have the following meaning:
- <SID> as the name of the SAP "System ID". For instance: J2E, Q1M, PT1, etc.
- <Instance_Name> as the name of the instance. For example: J, JC, DVEBMGS, D.
- <Instance_Number> as the number of the instance. For example 00, 60, 01, 40, 90, etc.
- <X> as the number of the server process in particular instance. For example 0, 1, 2, etc.