Re: How does one know how many thread a process owns?

From: Giorgos Keramidas <keramida_at_freebsd.org>
Date: Fri, 15 Apr 2005 14:50:05 +0300
On 2005-04-15 19:16, David Xu <davidxu_at_freebsd.org> wrote:
>Giorgos Keramidas wrote:
>>On 2005-04-15 06:02, Andre Guibert de Bruet <andy_at_siliconlandmark.com> wrote:
>>>Please commit the following patch which unbreaks the display problems
>>>which appear on 80-column terminals with the THR column (The D would
>>>wrap and cause weird behavior):
>>>
>>>http://bling.properkernel.com/freebsd/top.machine.c.patch
>>
>>David, do you think it's ok to change s/COMMAND/CMD/ or is that too
>>silly to do to fit THR in there?  I can probably reduce the columns of
>>THR to 4 too, since I noticed that after 1500 threads the value of THR
>>doesn't increase anymore here; so, being able to display up to 9999
>>threads is ok I guess.
>
> I think we should change THR columns to 4,
> 9999 threads is okay for me.

I just checked what top does on SunOS, when a program has more than 999
threads and it seems to clip the number of threads to 999, as if
something min(999, numthreads) is what is printed :-)

I'll change the width of THR to 4 columns if that's enough to fix the
wrapping issue of COMMAND, or even to 3 if that is not enough.  Clipping
the value of numthreads to something less than or equal to 999 is also a
relatively good idea that shouldn't be too hard to implement.
Received on Fri Apr 15 2005 - 09:50:10 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:32 UTC