Capture states of all processes at the same time

Artem Belevich art at freebsd.org
Wed Mar 14 17:19:17 UTC 2012


On Wed, Mar 14, 2012 at 9:31 AM, Maninya M <maninya at gmail.com> wrote:
> How can I capture the states of all running processes at a particular point
> in time? How can I retrieve this information for later use?

Go into DDB. Do 'panic'. wait for the kernel to finish dumping core.
Once system reboots and saves kernel core, examine process state in
the core file with gdb. Obviously it's a postmortem examination which
may not be exactly what you want.

Less destructive option would be to do 'ps' or 'show threads' in DDB,
save its output and then continue.

--Artem


More information about the freebsd-hackers mailing list