cvs commit: src/usr.bin/top machine.c

Ivan Voras ivoras at fer.hr
Mon Apr 18 12:33:41 PDT 2005


Giorgos Keramidas wrote:

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

I didn't sugest removing them, only shortening them - does anyone really 
need two decimal places on them? AFAIK, the information gathered by top 
is not really that precise (or if it is, the precision is not usable 
because of averaging over time/delays/etc). Maybe removing the decimal 
parts completely isn't a good idea, but trimming them to single decimal 
place probably is.

> 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.

Probably isn't feasable to do it here, but I like the way some Windows 
program deal with this problem: remove the middle part of the string. 
For example:

"This is a really long filename.doc"

becomes

"This is ... filename.doc"

Maybe it could be applied on this information:
(IRL situation:)

"xfce4-mcs-manager/30" -> "xfce4*ger/30"

or, less fancy & probably more useful, trim the process name, leave 
thread count:

"xfce4-mcs-m*/30"

Just a thought... (I really like that form :) )


(trimming usernames would be BAD because most "business" installations 
today are hooked to LDAP or somesuch and have usernames of form 
"somename.domain", e.g. *long*)

> 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

Well, it is ideal, but then there's the effort/benefit thing: if you 
make it all configurable, nobody will configure it :)

> ... *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 :-/

Yes.

Ok, another idea: instead of making everything configurable, make just 
one alternative mode: "rich client" - for those of us that mainly use 
X-terms & have insanely big terminal windows.

That mode could have fancy & weird output, like using TWO lines for 
every process in the list - one with general information, pretty much 
like the default list now, and the second with detailed information 
about threads. Redability would be a concern, but IMO not a big one.



More information about the cvs-src mailing list