top(1) annoyances
Chris Turner
c.turner at 199technologies.org
Fri Feb 4 01:53:59 PST 2011
Chris Turner wrote:
top's "this terminal can only display N processes"
gets on my nerves.
Ok - so the top(1) saga continues.
Digging around, and meditating on it a bit,
the following is clear -
1) top was made when fast computers were slow
2) top was made for serial terminals
(duh)
So - some assumptions for that:
1) scanning the process table is slow.
2) redrawing the terminal is slow
therefore:
1) only rewrite the needed / changed lines to the
screen
2) Keeping #1 in mind, don't display more than the terminal
can display, else the terminal become an endlessly
scrolling nightmare of uninterruptable top output
(kind of like running 'find / |xargs cat' on a 9600 baud vax tty)
3) The number of processes displayed w/r/t the screen is important
4) And only display what is needed / asked for.
as a result:
1) top does not display more than the default number of processes
unless requested to do so.
Someone had asked this previously - to show more, run e.g:
top 100
DOH! arty-effem! silly me.
it is the 'show the top N programs program' not 'fill my screen
with program stuff program'. Like the top-10 Radio Countdown WOOHOO.
With Casey Casem.
or you can fill the screen with program stuff by running 'top -a'
or if you prefer apropos to man -k : by running 'top all'.
2) top will provide a highly annoying warning when not able to
view the expected number of processes
in conclusion, I suggest:
1) re-enabling the annoying top warning message, and perhaps choosing
a sensible default to prevent the annoying warning on a handy-dandy
default punched-card sized 80x24 display
this would mean changing DEFAULT_TOPN in /usr/src/usr.bin/top/config.h
to 17. (24 - 7 for the 'header' stuff)
fun.
comments?
- Chris
p.s: did you know you can setup TOPCOLORS to configure colorful
alert thresholds as well? nifty.
More information about the Kernel
mailing list