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

Ivan Voras ivoras at fer.hr
Mon Apr 18 10:27:55 PDT 2005


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:

the "NICE" column seems to be 4 chars wide when it only needs to be 3
(for values +/-20). Sure, "NIC" or "NCE" looks slightly ugly but saves a
column :)

What about the "PRI" column? Does it serve useful purpose in system
diagnostics beyond debugging schedulers?

I liked a suggestion someone made, of using "procname/#threads" instead
of a separate column (as in "mysqld/30")... it saves at least one
character for the column padding :) of course, the "/#threads" part 
would be removed in "H" mode.

Do CPU & WCPU really need to be displayed with precision of two decimal
places? Maybe one or no decimal places would be more appropriate,
depending on the real or needed precision...

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; threads can't be zombies in themselves, can they?)




More information about the cvs-src mailing list