Updated procstat(1)
Skip Ford
skip at menantico.com
Wed Nov 28 04:03:22 PST 2007
Robert Watson wrote:
> On Wed, 28 Nov 2007, Skip Ford wrote:
>
>>>- "-a" now means "all processes",
>>
>>Thanks. :-) I'm a little surprised. You seemed pretty dedicated to a
>>per-process tool.
>
> I was, but then I read your e-mail and became convinced that the first
> patch that would be submitted against procstat(1) would be a "-a" patch. :-)
Yep, would've happened. Now the first patch submitted will be a
"-w interval" patch... :-)
>>>- A new "-k" has been added, which prints the kernel thread stacks for
>>>threads
>>> in a process (although not swapped out or actively running threads).
>>> This
>>> is extremely useful for answering questions of the sort "But *why* is
>>> the
>>> process blocked in UMA". It has both a simple mode (-k_, which lists
>>> just
>>> kernel function names, and a slightly more detailed mode (-kk), which
>>> adds
>>> the offset into the function.
>>
>>This is excellent. Does this absolutely have to depend on DDB and KDB?
>
> Currently, yes, as stack(9) is conditional on DDB, and the MD bits of
> stack(9) are defined in db_trace.c (and in some cases, depend on DDB
> definitions, such as DDB types, although I think not critically so). I've
> also been pondering breaking out stack(9) from DDB but haven't done that
> yet. Maybe that will be today's task, as I'd like -k to work without the
> kernel debugger, as it has use significantly beyond kernel debugging.
That'd be great if it worked without DDB. It just "feels" like it should.
This tool is a very nice addition. Thanks for writing it and for asking for
feedback, then putting up with the responses.
--
Skip
More information about the freebsd-hackers
mailing list