1. Printing stack information using jstack command
jstack -l pid >> thread.txt
Parameter: – l long lists to print out additional lock information. Jstack – L PID can be used to observe the lock holding status when a deadlock occurs
Examples
jstack -l 7052 >> thread.txt
2. Analyze stack information
take thread.txt Download it locally and use IBM thread and monitor dump analyzer for Java to open the analysis