How Do You Check for Hung Threads in Unix?
Contents You Can Run “Strace -P ” Command to Check If the Process Is Hung or Not. How Do I Know If a Process Is Hanging? 4 Answers Run Ps to Find List of Pids...
Contents
You can run “strace -p
How do I know if a process is hanging?
4 Answers
- run ps to find list of PIDs of the watched processes (along with exec time, etc)
- loop over the PIDs.
- start gdb attaching to the process using its PID, dumping stack trace from it using thread apply all where , detaching from the process.
- a process was declared hung if:
9 окт. 2013 г.
Must Read
How do I check if a thread is running?
Using the top command
The top command can show a real-time view of individual threads. To enable thread views in the top output, invoke top with “-H” option. This will list all Linux threads. You can also toggle on or off thread view mode while top is running, by pressing ‘H’ key.