Hi All,
This post is to quickly check how to take a heap dump from Tomcat running on Windows machine.
- First open a command prompt running as Administrator
- First we have to find the process ID of running Tomcat. For that it would be easy to know the Tomcat running port. In my case it's 8081. Therefore I'll execute the following command. > netstat -ano | findstr 8081
- Create a folder to store the dump file
- Execute the following command.jmap -dump:file=E:\dump\myheapfump.hprof -F <process_id>
- Now you can analyze the heapdump using a tool like eclipse memory analyzer
Hope that helps,
Thanks.
Thanks.