Updated procstat(1)




Dear all,

I've updated the procstat(1) kernel patch and userland tool; the updated version can be found at:

http://www.watson.org/~robert/freebsd/20071127-procstat.tgz

The new version includes a number of changes from the old version, including:

- A number of bug fixes and cleanliness improvements in the layout of output,
etc, including fixes for bugs reported by Skip Ford.

- "-a" now means "all processes", and the old -a has become -c, and the old -c
has become -s. I.e., "All", "Command line" and "Security" rather than
"Args" and "Credential".

- Threads and processes are now sorted by pid and then tid. If processes are
specified manually by pid, they are not sorted, although their threads will
be.

- 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.

The last of these required new kernel changes, including an MD component. I've tested the MD parts only on i386, although I have quick hacks at what they should look like on amd64, arm, powerpc, sparc64, sun4v. I don't promise these compile or work, but they might do.

I think procstat(1) is getting a lot closer to commitable state for 8-CURRENT, but further feedback would be most welcome (including reports of success on non-i386 architectures, and possibly patches to fix them). For FreeBSD developers with P4 access, you can also check out

//depot/user/rwatson/procstat/...

Robert N M Watson
Computer Laboratory
University of Cambridge
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: RFC [patch 13/34] PID Virtualization Define new task_pid api
    ... >> Any place the kernel saves a pid and then proceeds to signal it later. ... > Through some method of signaling the kernel a ... A pointer to a task_struct while it kind of sort of works. ...
    (Linux-Kernel)
  • kernel BUG at fs/jbd/commit.c:760!
    ... kernel BUG at fs/jbd/commit.c:760! ... Stack traceback for pid 297 ... kdb> btp 7346 ...
    (Linux-Kernel)
  • Re: Thread and process dentifiers (CPU affinity, kill)
    ... > that PID, ... In the kernel, I think this ... > means that kill() should actually be looking up tgids rather than pids. ... well I guess the current way it works you can set the affinity per ...
    (Linux-Kernel)
  • Re: [PATCH 0/16] Pid namespaces
    ... | configurable, zero overheaded;) pid namespaces. ... | The namespace are organized as a tree - once a task is cloned ... Suka's patches change the kernel/pid.c code too heavy. ... | numerical pid from the kernel at all. ...
    (Linux-Kernel)
  • Re: [PATCH 0/16] Pid namespaces
    ... | configurable, zero overheaded;) pid namespaces. ... | The namespace are organized as a tree - once a task is cloned ... Suka's patches change the kernel/pid.c code too heavy. ... | numerical pid from the kernel at all. ...
    (Linux-Kernel)