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

From: Andre Guibert de Bruet <andy_at_siliconlandmark.com>
Date: Fri, 15 Apr 2005 06:02:58 -0400 (EDT)
On Wed, 13 Apr 2005, Giorgos Keramidas wrote:

> On 2005-04-13 16:08, Anthony Ginepro <anthony.ginepro_at_laposte.net> wrote:
>> On 04/13/05 21:40, David Xu wrote:
>>> Giorgos Keramidas wrote:
>>>> Can you try the following patch?
>>>
>>> I am using the patch, it works fine, the screen output is attractive. :-)
>>
>> Except for WCPU it looks like SunOS' top.
>
> /me thinks (Oops, they caught me!)
>
> Yes, I have to admit, I used the output of SunOS top as an inspiration
> for the ordering and naming of the THR column :-)

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):

Index: machine.c
===================================================================
RCS file: /home/ncvs/src/usr.bin/top/machine.c,v
retrieving revision 1.70
diff -r1.70 machine.c
106c106
< 	"  PID %-*.*s   THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU    CPU COMMAND";
---
> 	"  PID %-*.*s   THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU    CPU CMD";
114c114
< 	"  PID %-*.*s   THR PRI NICE   SIZE    RES STATE    TIME   WCPU    CPU COMMAND";
---
> 	"  PID %-*.*s   THR PRI NICE   SIZE    RES STATE    TIME   WCPU    CPU CMD";

It is available online, for your convenience (Due to possible line-wrap 
issues with your MUA), at: 
http://bling.properkernel.com/freebsd/top.machine.c.patch

Cheers,
Andy

| Andre Guibert de Bruet | Enterprise Software Consultant >
| Silicon Landmark, LLC. | http://siliconlandmark.com/    >
Received on Fri Apr 15 2005 - 08:03:20 UTC

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