[PATCH] add nmeter applet
Rob Landley
rob at landley.net
Fri Feb 10 19:00:33 UTC 2006
Some design notes on top.c direction:
The existing top.c code isn't that bad now that I've looked more closely, it's
just very non-generic. Some refactoring would help.
The naieve implementation of generic code would be something that fills out a
system structure (free memory, load average, etc) a list of process
structures. In theory, this list of process structures could get darn long.
In practice, we need the whole list in order to sort it, and we can't figure
out what processes to display without sorting the list, so...
Then the current "top" could display the first two lines from the system
structure and the individual process lines from the process list, and your
nmeter thing could use the same data structures to display one-line summaries
in whatever format seems appropriate.
(The other issue is determining cpu usage percentage, but that shouldn't be
too hard either...)
Rob
--
Steve Ballmer: Innovation! Inigo Montoya: You keep using that word.
I do not think it means what you think it means.
More information about the busybox
mailing list