27
The Thread Dump is a photograph taken at T time of all threads acyivity in the application server. They are displayed one after the other as a stack trace. This photograph of the JVM state allow us to analyze the deadlock between threads.
1/ Find java process (PID)
ps aux | grep java
or
ps auxwww | grep java
or
jps -v | grep -iv jps
2/ Trigger the thread dump
kill -3 <PID>
(NB: The output is then led directly into the server logs)
3/ Thread dump analysis
Once your thread dump generated (in the server logs), 2 effective tools help you for the analysis phase:
For additional informations about thread dumps:
An Introduction to Java Stack Traces (cf. http://java.sun.com/developer/technicalArticles/Programming/Stacktrace/)
Thread Dump and Concurrency Locks jstack presentation tools and the jconsole jdk 5 (cf. http://weblogs.java.net/blog/mandychung/archive/2005/11/thread_dump_and_1.html/)