aboutsummaryrefslogtreecommitdiff
path: root/libbb/procps.c
AgeCommit message (Collapse)Author
2008-04-25libbb: fix wrong sscanf count check (affects pidof etc)Denis Vlasenko
2008-03-17*: add -Wunused-parameter; fix resulting breakageDenis Vlasenko
function old new delta procps_scan 1265 1298 +33 aliascmd 278 283 +5 parse_file_cmd 116 120 +4 dname_enc 373 377 +4 setcmd 90 93 +3 execcmd 57 60 +3 count_lines 72 74 +2 process_command_subs 340 339 -1 test_main 409 407 -2 mknod_main 179 177 -2 handle_incoming_and_exit 2653 2651 -2 argstr 1312 1310 -2 shiftcmd 131 128 -3 exitcmd 46 43 -3 dotcmd 297 294 -3 breakcmd 86 83 -3 evalpipe 353 349 -4 evalcommand 1180 1176 -4 evalcmd 109 105 -4 send_tree 374 369 -5 mkfifo_main 82 77 -5 evalsubshell 152 147 -5 typecmd 75 69 -6 letcmd 61 55 -6 add_cmd 1190 1183 -7 main 891 883 -8 ash_main 1415 1407 -8 parse_stream 1377 1367 -10 alloc_procps_scan 55 - -55 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148) Total: -94 bytes text data bss dec hex filename 797195 658 7428 805281 c49a1 busybox_old 797101 658 7428 805187 c4943 busybox_unstripped
2008-01-05ps: add conditional support for -o [e]timeDenis Vlasenko
2007-09-29trivial typo fixDenis Vlasenko
2007-09-29pgrep,pkill: new applets by Loic Grenie <loic.grenie@gmail.com>Denis Vlasenko
2007-09-29remove if() which is always trueDenis Vlasenko
2007-09-28more "if (p) free(p)" fixes; fix a typo in commentDenis Vlasenko
2007-09-08top: TOPMEM feature - 's(how sizes)' command. +2.5k when enabled,Denis Vlasenko
+80 bytes when disabled (mainly because of text wrapping fixes in display_process_list).
2007-08-26ps: fix RSS parsing (rss field in /proc/PID/stat is in pages, not bytes)Denis Vlasenko
2007-07-27bb_getpwuid, bb_getgrgid: change order of arguments to more intuitive one;Denis Vlasenko
comment thoroughly when they die and when they dont.
2007-07-19stray trailing tabs removedDenis Vlasenko
2007-07-17remove accumulated stray trailing whitespaceDenis Vlasenko
2007-06-30top,ps: improve /proc/PID/cmdinfo reading codeDenis Vlasenko
function old new delta display_status - 1231 +1231 read_cmdline - 101 +101 parse_conf 1284 1303 +19 arith 2033 2042 +9 collect_blk 467 474 +7 fsck_main 1909 1911 +2 dhcprelay_main 1125 1122 -3 singlemount 4555 4547 -8 read_close 50 36 -14 get_lcm 123 105 -18 ed_main 3111 3084 -27 func_args 73 28 -45 procps_scan 732 658 -74 top_main 2187 899 -1288 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 4/8 up/down: 1369/-1477) Total: -108 bytes text data bss dec hex filename 676048 2744 13968 692760 a9218 busybox_old 675940 2744 13968 692652 a91ac busybox_unstripped
2007-06-30killall, pidof: use argv0 for process matching tooDenis Vlasenko
top: show cmdline, not comm field (fixes problems with re-execed applets showing as processes with name "exe", and not being found by pidof/killall by applet name) function old new delta find_pid_by_name 98 156 +58 procps_scan 692 732 +40 top_main 2724 2762 +38 find_pair 164 180 +16 collect_int 114 123 +9 cmp_main 547 555 +8 collect_fork 112 119 +7 collect_ctx 112 119 +7 read_package_field 253 257 +4 passwd_main 1983 1985 +2 process_stdin 435 433 -2 xstrtoul_range_sfx 229 226 -3 get_next_block 1852 1849 -3 arith 2042 2033 -9 sv_main 1236 1226 -10 singlemount 4690 4672 -18 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 10/6 up/down: 189/-45) Total: 144 bytes text data bss dec hex filename 734789 3028 14400 752217 b7a59 busybox_old 734933 3028 14400 752361 b7ae9 busybox_unstripped
2007-06-30procps: shrink /proc scanning code a bitDenis Vlasenko
function old new delta skip_fields 16 15 -1 .rodata 144266 144258 -8 procps_scan 739 692 -47 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-56) Total: -56 bytes text data bss dec hex filename 734845 3028 14400 752273 b7a91 busybox_old 734789 3028 14400 752217 b7a59 busybox_unstripped
2007-06-21remove extra ')'Denis Vlasenko
2007-06-19top,ps: 'stringify' tty only when needed. -60 bytes.Denis Vlasenko
2007-06-19top: speedup if tty info is not requestedDenis Vlasenko
2007-06-19top,ps: reduce CPU usage in decimal conversion (optional)Denis Vlasenko
text data bss dec hex filename 734651 3040 14416 752107 b79eb busybox_old 734751 3040 14416 752207 b7a4f busybox_unstripped
2007-06-10top: add config option and code for global CPU % displayDenis Vlasenko
2007-06-06ps: fix -Z (by Yuichi Nakamura <ynakam@hitachisoft.jp>)Denis Vlasenko
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-19ps: add -o tty and -o rss supportDenis Vlasenko
1373 14 24 1411 583 busybox.t1/procps/ps.o 1462 14 24 1500 5dc busybox.t2/procps/ps.o
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-01-19ls: use get_cached_username/groupnameDenis Vlasenko
2007-01-11Trailing whitespace removal over entire treeDenis Vlasenko
2006-11-27safe_strtoXX interface proved to be a bit unconvenient.Denis Vlasenko
Remove it, introduce saner bb_strtoXX. Saved ~350 bytes.
2006-11-24tar: sanitize option handlingDenis Vlasenko
2006-11-24tar: small fixes:Denis Vlasenko
* size-optimize mapping code * kill double close
2006-11-24tar: cache [ug]id->username/groupname mappings. Cuts down amountDenis Vlasenko
of open/read/close of /etc/passwd and /etc/group dramatically (we were rereading those for each untarred file!!!)
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-01Unneeded code removed, usused field "unsigned pscpu" removedDenis Vlasenko
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-14add open_read_close() and similar stuffDenis Vlasenko
2006-10-12small style fixesDenis 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-07-12decuddle () from for/if/whileMike Frysinger
2006-06-27Fix http://bugs.busybox.net/view.php?id=906 which could cause failures in top.Rob Landley
2006-06-07comment all fieldsMike Frysinger
2006-06-07add reference to proc(5)Mike Frysinger
2006-05-19- remove emacs layout block as suggested by Robert P.J. DayBernhard Reutner-Fischer
- use shorter boilerplate while at it
2006-04-25Portability tweak from Shaun Jackman, don't include asm/page.h directly.Rob Landley
2006-04-12- add and use bb_opendir(), bb_xopendir().Bernhard Reutner-Fischer
text data bss dec hex filename 889445 9392 1035784 1934621 1d851d busybox.gcc-4.2.orig 889297 9392 1035784 1934473 1d8489 busybox.gcc-4.2 889009 9820 1037860 1936689 1d8d31 busybox.gcc-4.1.orig 888817 9820 1037860 1936497 1d8c71 busybox.gcc-4.1
2006-03-06Robert P. Day removed 8 gazillion occurrences of "extern" on functionRob Landley
definitions. (That should only be on prototypes.)
2006-02-14cleanups after changes by Denis Vlasenko. Size optimization"Vladimir N. Oleynik"
2006-02-13Cleanups from Denis Vlasenko.Rob Landley
2005-09-20- rename libbb's password helpers as suggested in libbb.hBernhard Reutner-Fischer
my_getpwnam -> bb_xgetpwnam /* dies on error */ my_getgrnam -> bb_xgetgrnam /* dies on error */ my_getgrgid -> bb_getgrgid my_getpwuid -> bb_getpwuid my_getug -> bb_getug
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"