Reputation: 453
I am trying to analyize the memory usage for a application that is being deployed in Tomcat.
I need to get the heap dump and thread dump while the application is running in tomcat.
Can anybody let me know how to get those dumps in mac from terminal for Tomcat.
I tried getting tomcat PID using "ps ux | grep apache" and then did "kill -3 PID", but nothing happens...
Upvotes: 0
Views: 5028
Reputation: 299
After you executed kill -3 PID ,where is PID process id of Apache Tomcat, thread dump will be written into /tomcat/logs/catalina.out
Upvotes: 0
Reputation: 1856
it depends on the JVM you use to run your Tomcat. I strongly recommend to run all applications and servers using the JDK (in case of HotSpot, which you likely use). Then you should have multiple utilities at hand:
or you use jvisualvm which bundles all the tools into a nice ui. Last, but not least, it is possible that you have gotten the wrong PID :-)
Upvotes: 1