You have several options: it is easiest to check the pending WCHAN
channel that the process was sleeping on:
$ ps -o "pid,wchan,comm" PID WCHAN COMMAND 2350 wait bash 20639 hrtime i3status 20640 poll_s dzen2 28821 - ps
This can give you a good idea of ββwhat the process is doing and is very easy to get.
You can use ktruss
and ktrace
or DTrace
to track your process. (Sorry, there is no Solaris here, so no examples.)
You can also attach gdb(1)
to your process:
# gdb -p 20640 GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2 ... (gdb) bt
Backtrace is often the most useful error report you can get from a process, so you should install gdb(1)
if it is not already installed. gdb(1)
can do a lot more than just show you backtracks, but the full tutorial goes beyond the overflow stack.
source share