czwartek, 9 marca 2017

How to take heap dump of a Tomcat installed as a Windows Service


  1. You need to download PsExec tool from Microsoft. This is because Tomcat service usually run with Local System account.
  2. You need a Tomcat service PID. Get it with the task manager.
  3. PsExec tool don't need to be installed. Just go to where PsExec.exe or PsExec64.exe file is located and run:
  4. >psexec64 -s "C:\Program Files\Java\jdk1.8.0_121\bin\jmap" -dump:file=c:\dump\heapdump170309.data 19304

    The last argument is the PID. You'll also need to locate the jmap tool which is usually installed with your Java JDK.

Brak komentarzy:

Prześlij komentarz