aboutsummaryrefslogtreecommitdiff
path: root/procps/top.c
AgeCommit message (Collapse)Author
2007-06-11top: on user suggestion make percentile calculations configurable. -56 bytes ↵Denis Vlasenko
when off. +600 bytes when on top: reorder columns, so that [P]PIDs are together and VSZ/%MEM are together. Makes more sense
2007-06-10top: improve global CPU percentage (smaller & faster code)Denis Vlasenko
2007-06-10top: add config option and code for global CPU % displayDenis Vlasenko
2007-05-26usage.c: remove reference to busybox.hDenis Vlasenko
*: s/include "busybox.h"/include "libbb.h"
2007-04-19procps: remove all global variablesDenis Vlasenko
text data bss dec hex filename 1462 14 24 1500 5dc busybox.t2/procps/ps.o 1484 0 0 1484 5cc busybox.t3/procps/ps.o 3122 0 252 3374 d2e busybox.t1/procps/top.o 3117 0 0 3117 c2d busybox.t3/procps/top.o
2007-04-16style fixes, no code changesDenis Vlasenko
2007-02-08make sure ps/top output what they claim: vsz, not rss ... down the line we ↵Mike Frysinger
should make the output controllable either at runtime or buildtime as both statistics are quite useful
2007-02-03suppress warnings about easch <applet>_main() havingDenis Vlasenko
no preceding prototype
2007-01-11Trailing whitespace removal over entire treeDenis Vlasenko
2006-12-30done a dozen of randconfig test. guess what? ALL failed...Denis Vlasenko
these are resulting fixes
2006-11-05replace /proc scanning code by more versatile one.Denis Vlasenko
Use it where appropriate. Stop scanning /etc/passwd *for every process*!!! (uid->username) top: reduce memory usage - we won't save unneeded fields from /proc info anymore. Downside: ~+250 bytes of code
2006-11-05top: improve CPU% calculationDenis Vlasenko
style fixes
2006-11-01PID should be stored in pid_t, not int or long.Denis Vlasenko
find_pid_by_name() was returning 0 or -1 in last array element, but -1 was never checked. We can use just 0 intead.
2006-10-27top: batch mode should output all processesDenis Vlasenko
2006-10-14add open_read_close() and similar stuffDenis Vlasenko
2006-10-08attempt to regularize atoi mess.Denis Vlasenko
2006-10-06dnsd fix; option_mask32 added. dnsd needs more love.Denis Vlasenko
2006-10-03getopt_ulflags -> getopt32.Denis Vlasenko
It is impossible to formulate sane ABI based on size of ulong because it can be 32-bit or 64-bit. Basically it means that you cannot portably use more that 32 option chars in one call anyway... Make it explicit.
2006-09-29top: add support for -b, -n <iterations>Denis Vlasenko
2006-09-09top: fixed wrong comment, made error message more clearDenis Vlasenko
2006-08-03Remove bb_ prefixes from xfuncs.c (and a few other places), consolidateRob Landley
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only had one user), clean up lots of #includes... General cleanup pass. What I've been doing for the last couple days. And it conflicts! I've removed httpd.c from this checkin due to somebody else touching that file. It builds for me. I have to catch a bus. (Now you know why I'm looking forward to Mercurial.)
2006-06-30Make another warning go away.Rob Landley
2006-06-28Top was catching sigterm (and fumbling sigint) so it could reset the terminalRob Landley
type on the way out, but the signal handler didn't exit. Plus it did unnecessary things with sigaction. This code is overgrown and needs a serious weed-whacking...
2006-06-02- move #include busybox.h to the very top so we pull in the configBernhard Reutner-Fischer
and eventual platform specific includes in early.
2006-05-27Consolidate #include <sys/time.h> so libbb.h does it.Rob Landley
2006-05-19- make it C89 compatible; Declarations in the middle of a function is of courseBernhard Reutner-Fischer
fine in C99, but it really serves no purpose other than breaking compilation on C89 compilers. Thanks to Rich Felker for pointing this out.
2006-05-04Fix allbareconfig.Rob Landley
2006-04-24From Denis Vlasenko:Rob Landley
* CPU% = process[i].ticks/sum(process[i].ticks) * busy_cpu_ticks/total_cpu_ticks * got rid of empty line under "Load average" line   and used last line - +2 visible processes * do not do float conversion of loadavg, just read it as string from /proc * fix display on small screens * dropped unused .stime, .utime fields * a few variables were renamed * style fixes
2006-04-12- patch from Denis Vlasenko to add and use bb_xchdir()Bernhard Reutner-Fischer
2006-02-15add last terminal line"Vladimir N. Oleynik"
2006-02-14restore change by Denis Vlasenko: file_to_buf must vary fast, best if inline"Vladimir N. Oleynik"
2006-02-13Cleanups from Denis Vlasenko.Rob Landley
2006-01-30removed warning "comparison between signed and unsigned". Added ↵"Vladimir N. Oleynik"
ATTRIBUTE_UNUSED. My whitespace
2006-01-25just whitespaceTim Riker
2005-11-29getopt -> getopt_ulflags. noticed by Rob Sullivan"Vladimir N. Oleynik"
2005-09-16ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE->CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE"Vladimir N. Oleynik"
2005-09-14FEATURE->ENABLE_FEATURE loses one for 'top' applet"Vladimir N. Oleynik"
2005-08-27some portability fixes by rmh in Bug 395Mike Frysinger
2005-07-30touchup syntaxMike Frysinger
2005-05-03A patch from Takeharu KATO to update/fix SE-Linux support.Rob Landley
2005-04-16Patch from Bernhard Fischer to make a bunch of symbols staticEric Andersen
which were otherwise cluttering the global namespace.
2004-09-14remove a cut/paste mistake, i better get some sleep.Glenn L McGrath
2004-09-14Apply patch from Felipe Kellermann to simlify logic of sort functions.Glenn L McGrath
I reversed the result of the sort functions to make the big numbers go to the top.
2004-04-14Larry Doolittle writes:Eric Andersen
This is a bulk spelling fix patch against busybox-1.00-pre10. If anyone gets a corrupted copy (and cares), let me know and I will make alternate arrangements. Erik - please apply. Authors - please check that I didn't corrupt any meaning. Package importers - see if any of these changes should be passed to the upstream authors. I glossed over lots of sloppy capitalizations, missing apostrophes, mixed American/British spellings, and German-style compound words. What is "pretect redefined for test" in cmdedit.c? Good luck on the 1.00 release! - Larry
2004-03-15Remove trailing whitespace. Update copyright to include 2004.Eric Andersen
2003-12-08Splitting statements with #define's can cause trouble for crossGlenn L McGrath
compilers (and it looks a bit messy)
2003-10-11Paul Mundt (lethal) writes:Eric Andersen
Erik, The format for /proc/meminfo has changed between 2.4 and 2.6, quite considerably. In addition to the removal of the two-line summary that was present in 2.4, MemShared was also removed. Presently (at least in busybox CVS HEAD), top fails to parse this correctly and spews forth a: top: failed to read 'meminfo' message. This patch switches around some of the semantics a little to do sane parsing for both 2.4 and 2.6. Also, in the event that the summary gets yanked from 2.4, this patch will deal with that as well. With this patch, I'm able to run top correctly on 2.6.0-test7 (tested on sh). Please apply. procps/top.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 48 insertions(+), 12 deletions(-)
2003-09-15Be entirely consistant when using ioctl(0, TIOCGWINSZ, &winsize)Eric Andersen
to ensure proper fallback behavior on, i.e. serial consoles. -Erik
2003-07-03Patch from Russell Coker:Eric Andersen
I've attached my latest SE Linux patch for busybox against the latest CVS version of busybox.
2003-03-19Major coreutils update.Manuel Novoa III