0

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 ?

Mohammad Kanan
  • 4,452
  • 10
  • 23
  • 47
user1846749
  • 2,165
  • 3
  • 23
  • 36

1 Answers1

0

(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

Kohei TAMURA
  • 4,970
  • 7
  • 25
  • 49