Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Apr 2005 20:45:12 +0300
From:      Giorgos Keramidas <keramida@freebsd.org>
To:        Ivan Voras <ivoras@fer.hr>
Cc:        cvs-src@freebsd.org
Subject:   Re: cvs commit: src/usr.bin/top machine.c
Message-ID:  <20050418174512.GA1847@orion.daedalusnetworks.priv>
In-Reply-To: <4263EDFF.8020005@fer.hr>
References:  <200504161543.j3GFhclO075103@repoman.freebsd.org> <86acnyd2k7.fsf@xps.des.no> <20050418063321.GA85819@dragon.NUXI.org> <42636A16.2070702@elischer.org> <20050418095850.GB12892__4420.21584972299$1113818160$gmane$org@orion.daedalusnetworks.priv> <4263EDFF.8020005@fer.hr>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2005-04-18 19:27, Ivan Voras <ivoras@fer.hr> wrote:
>Giorgos Keramidas wrote:
>>>>>> Reduce the width of the THR column to 4 characters, to avoid
>>>>>> wrap-around of lines in SMP machines (which are wider), until we
>>>>>> have a better way of handling window sizes & columns in top.
>>>>>
>>>>> We should probably drop the CPU column (WCPU should suffice),
>>>>
>>>> No, 'CPU' is quite useful on SMP machines.
>>>
>>> except for multi threaded apps
>
> I'm not an expert, but have you considered this:

[ snip suggestions for 3-column NICE, removal of PRI, procname/#threads
and removal of either CPU/WCPU ]

Yes, all of these have been suggested at times.  I'm frankly a bit hard
pressed finding space for the THR column, without disappointing at least
some of the users of top.  None of the suggestions above would work, as
every bit off information is useful to someone and removing it would be
a loss.

Even the procname/#threads suggestion is not as good as it sounds at
first, because too short terminals will end up clipping the thread count
anyway.

The ideal solution of making every bit of every column configurable at
run-time *and* allowing the user to select:

	- What fields are displayed.
	- In what order
	- The width of every column
	- The sort fields and their order

... *and* still making it possible to run top with a very narrow
terminal without nasty wrap-around effects, is probably going to require
a major rewrite of many parts of top.  I'm still in the process of
judging if the result would be worth the effort :-/

> What about displaying total number of threads in kernel in the second
> line of the top status info, something like:
>
> "95 processes, 120 threads: 3 running, 117 sleeping, 1 zombie processes"
> (the "running/sleeping" would then apply to threads, which is probably
> more appropriate now;

IMHO, that's a good sugestion :-)

> threads can't be zombies in themselves, can they?)

No, threads can't ever be zombies.  A process is a zombie only after it
has exited and until its parent reaps it.  At that time, there should be
no active threads in the process.

- Giorgos



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