In one of my web applications there is an issue:
I want to check whether objects are properly initialized or not.
For that I want to extract a memory dump and analyse it . How can I take a memory dump in Tomcat and analyse it ?
In one of my web applications there is an issue:
I want to check whether objects are properly initialized or not.
For that I want to extract a memory dump and analyse it . How can I take a memory dump in Tomcat and analyse it ?
(1) Get Tomcat (Bootstrap) process ID by jps command
# jps
24717 Jps
3652 Bootstrap
3737 DirectoryServer
(2) Run jmap command
# jmap -dump:format=b,file=./heapdump.hprof 3652
(3) Download Memory Analyzer (MAT)
(4) Open heapdump.hprof by MAT