Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Apr 2005 12:40:08 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        David Xu <davidxu@freebsd.org>
Cc:        Jiawei Ye <leafy7382@gmail.com>
Subject:   Re: How does one know how many thread a process owns?
Message-ID:  <20050413174008.GD4842@dan.emsphone.com>
In-Reply-To: <425D2163.4090603@freebsd.org>
References:  <c21e92e20504122232f568545@mail.gmail.com> <425CC7F8.3030803@samsco.org> <425CD009.6040208@freebsd.org> <c21e92e205041302152c9cbaaf@mail.gmail.com> <20050413132603.GA39006@orion.daedalusnetworks.priv> <425D2163.4090603@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Apr 13), David Xu said:
> Giorgos Keramidas wrote:
> >On 2005-04-13 17:15, Jiawei Ye <leafy7382@gmail.com> wrote:
> >>On 4/13/05, David Xu <davidxu@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@allantgroup.com



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