[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: KGDB: list hung processes



Amit Purohit <amit.purohit@xxxxxxxxx> writes:

> Hi,
>
> I have a linux-2.6.7 setup as a vmware machine connected to a linux
> host over serial port for debug purpose.   I am trying to write a gdb
> macro that will display the status of all the processes.  I want to
> know if the process is waiting for some event then what that event is.
>   This will help me identify the hung processes.
>
> ps -l shows us the status of the process, with the name of wchan (wait
> channel).  Is there any way to do this through a gdb macro.

This isn't a direct answer to your question, but you can use the magic
system request key feature over a serial cable to dump the state of
all processes.

I figure if you're hearty enough to use KGDB, you can also handle
magic sysrq! 

  Documentation/sysrq.txt



-- 
  Ed L Cashin <ecashin@xxxxxxxxxx>


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/