Generating a heap dump when running JBoss EAP as a Windows service
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 8.x
- 7.x
Issue
- While running JBoss EAP as a Windows Service it is noticed that the utilities like
jstackorjconsoleare not able to collect the dumps. So is there any alternative?
Resolution
To generate heap dump when running JBoss EAP as a Windows Service users can execute one of below command-line:
C:\..\PSTools>psexec -s jcmd JBOSS_EAP_PID GC.heap_dump -all=true %USERPROFILE%\Desktop\jcmd_dump.hprof
C:\..\PSTools>psexec -s jmap -dump:format=b,file=%USERPROFILE%\Desktop\jmap_heap.hprof JBOSS_EAP_PID
Diagnostic Steps
Disclaimer: Links contained herein to an external website(s) are provided for convenience only. Red Hat has not reviewed the links and is not responsible for the content or its availability. The inclusion of any link to an external website does not imply endorsement by Red Hat of the website or their entities, products or services. You agree that Red Hat is not responsible or liable for any loss or expenses that may result due to your use of (or reliance on) the external site or content.
-
Users must download PSExec directly from Content from learn.microsoft.com is not included.Microsoft Sysinternals website
-
Run
jcmd/jmapin CMD terminal running as administrator -
Replace JBOSS_EAP_PID with the PID of the JBoss EAP Java process.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.