How does one know how many thread a process owns?
Dan Nelson
dnelson at allantgroup.com
Wed Apr 13 10:40:11 PDT 2005
In the last episode (Apr 13), David Xu said:
> Giorgos Keramidas wrote:
> >On 2005-04-13 17:15, Jiawei Ye <leafy7382 at gmail.com> wrote:
> >>On 4/13/05, David Xu <davidxu at freebsd.org> wrote:
> >>>I believe he wants to see total threads number in a process. add a
> >>>column to top to display total kernel threads in per-process,
> >>>p_numthreads in proc structure is what you need . :)
Still only accurate for libthr, though, right?
> >>Exactly what I want. Is is possible to modify our top?
> >
> >I've added a THR column when top displays only one line per process.
> >So when the "display each thread separately" mode is off, you should
> >see something like this:
I sort of like Solaris' prstat output, where the thread count is after
the command:
PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
3120 dnelson 9320K 7256K sleep 0 19 0:00:01 0.3% pike/2
3169 dnelson 4800K 4440K cpu3 59 0 0:00:00 0.2% prstat/1
3144 dnelson 4192K 2936K sleep 59 0 0:00:00 0.1% zsh/1
17037 root 89M 26M sleep 29 10 3:02:52 0.1% java/23
I also find myself asking exactly what our CPU column really
represents. Is it any use at all?
--
Dan Nelson
dnelson at allantgroup.com
More information about the freebsd-current
mailing list