BibleGateway.com Verse Of The Day

Thursday, June 14, 2007

Getting Thread Dump Of Running Java Process

Of course you can kill -3 a process to get the thread dump, but for Java apps you can also get thread dumps of running processes using the JDK 5 tools jps and jstack. For example, on a server where I am running Tomcat 5.5, typing jps gets a list of all Java processes running:
-bash-3.00$ jps
25515 Bootstrap
26912 Jps
Then using that process id, run jstack:

jstack 25515

No comments: