Thread dumps are only for java processes.
Commands to take thread dump:
Thread Analysis:
Thread dumps should be taken multiple times to get exact issue and one dump is not sufficient and may mislead the investigation. We should atleast take 3-5 thread dumps at an interval of 10 secs.30 sec or 1 minutes as per the performance issue.
To analyse, take the thread dumps and upload the files in site - fastThread Java Thread Dump Analyzer
Thread Status:
Commands to take thread dump:
- jstack -l <pid> > threaddump.txt
- kill -3 <pid>
- jcmd <pid> Thread.print > <file-path>
Thread Analysis:
Thread dumps should be taken multiple times to get exact issue and one dump is not sufficient and may mislead the investigation. We should atleast take 3-5 thread dumps at an interval of 10 secs.30 sec or 1 minutes as per the performance issue.
To analyse, take the thread dumps and upload the files in site - fastThread Java Thread Dump Analyzer
Thread Status:
- NEW: The thread is created but has not been processed yet.
- RUNNABLE: The thread is occupying the CPU and processing a task. (It may be in WAITING status due to the OS's resource distribution.)
- BLOCKED: The thread is waiting for a different thread to release its lock in order to get the monitor lock.
- WAITING: The thread is waiting by using a wait, join or park method.
- TIMED_WAITING: The thread is waiting by using a sleep, wait, join or park method. (The difference from WAITING is that the maximum waiting time is specified by the method parameter, and WAITING can be relieved by time as well as external changes.)
No comments:
Post a Comment