Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Mar 2012 10:19:14 -0700
From:      Artem Belevich <art@freebsd.org>
To:        Maninya M <maninya@gmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Capture states of all processes at the same time
Message-ID:  <CAFqOu6i1TY-4FcGYEqvD00uz2qx9yL971s0Ca6PsxEVSTjnCSQ@mail.gmail.com>
In-Reply-To: <CAC46K3mNJQDf%2BKqA0YYiAXXdyjhU3iSX8V-5%2B2rF8Ah0aH-7rA@mail.gmail.com>
References:  <CAC46K3mNJQDf%2BKqA0YYiAXXdyjhU3iSX8V-5%2B2rF8Ah0aH-7rA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 14, 2012 at 9:31 AM, Maninya M <maninya@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFqOu6i1TY-4FcGYEqvD00uz2qx9yL971s0Ca6PsxEVSTjnCSQ>