summaryrefslogtreecommitdiff
path: root/procps/ps.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko2007-10-111-2/+2
| | | | | EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
* vsz and rss are unsigned longs (ulong ~= width of void* =>Denis Vlasenko2007-08-291-4/+4
| | | | | | | suitable for expressing total RAM in system). We account for "32 bit in 64 bit" systems by storing kbytes, not bytes there. Should allow for up to ~2000 Gb RAM on 32 bits.
* don't pass argc in getopt32, it's superfluousDenis Vlasenko2007-08-181-3/+3
| | | | | | | | (add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes text data bss dec hex filename 773469 1058 11092 785619 bfcd3 busybox_old 772644 1058 11092 784794 bf99a busybox_unstripped
* ls,ps,watch: measure terminal width on fd 0, not 1Denis Vlasenko2007-08-091-2/+2
|
* ps: fix non-desktop ps -ww -- thanks rockeychuDenis Vlasenko2007-07-251-4/+9
|
* ps: revert wrong "optimization": (i & 1) -> iDenis Vlasenko2007-07-011-1/+1
|
* ps: fix "unused variable" warning; fix integer variable declared as char.Denis Vlasenko2007-07-011-3/+4
|
* top,ps: improve /proc/PID/cmdinfo reading codeDenis Vlasenko2007-06-301-39/+24
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Consolidate ARRAY_SIZE macro; remove one unneeded global var (walter harms ↵Denis Vlasenko2007-06-251-3/+1
| | | | <wharms@bfs.de>)
* top,ps: 'stringify' tty only when needed. -60 bytes.Denis Vlasenko2007-06-191-1/+4
|
* ps: fix -Z (by Yuichi Nakamura <ynakam@hitachisoft.jp>)Denis Vlasenko2007-06-061-28/+45
|
* usage.c: remove reference to busybox.hDenis Vlasenko2007-05-261-1/+1
| | | | | *: s/include "busybox.h"/include "libbb.h"
* test: code size saving, no logic changesDenis Vlasenko2007-05-011-6/+9
| | | | | | | | | | | | | | | ps: fix warning, make a bit smaller kill -l: make smaller & know much more signals function old new delta get_signum 121 153 +32 kill_main 826 843 +17 get_signame 44 36 -8 signals 252 224 -28 .rodata 131955 131923 -32 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/3 up/down: 49/-68) Total: -19 bytes
* procps: remove all global variablesDenis Vlasenko2007-04-191-12/+24
| | | | | | | | 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
* ps: add -o tty and -o rss supportDenis Vlasenko2007-04-191-34/+45
| | | | | 1373 14 24 1411 583 busybox.t1/procps/ps.o 1462 14 24 1500 5dc busybox.t2/procps/ps.o
* getopt32: fix llist_t options ordering. llist_rev is not unused.Denis Vlasenko2007-04-081-1/+0
| | | | | | | | | | | | | | | | function old new delta tar_main 705 695 -10 sort_main 928 918 -10 decode_format_string 886 876 -10 run_parts_main 197 185 -12 ps_main 513 500 -13 wget_main 2764 2750 -14 awk_main 1014 1000 -14 od_main 2886 2866 -20 llist_rev 25 - -25 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 0/8 up/down: 0/-128) Total: -128 bytes
* ps: work around libc bug: printf("%.*s\n", MAX_INT, buffer)Denis Vlasenko2007-03-281-1/+3
|
* - change option -c to -Z to match newer upstream SElinux conventionsBernhard Reutner-Fischer2007-03-141-2/+2
|
* sort: fix multiple -k (was ignoring all except last)Denis Vlasenko2007-02-171-1/+1
|
* make sure ps/top output what they claim: vsz, not rss ... down the line we ↵Mike Frysinger2007-02-081-8/+8
| | | | should make the output controllable either at runtime or buildtime as both statistics are quite useful
* suppress warnings about easch <applet>_main() havingDenis Vlasenko2007-02-031-0/+2
| | | | no preceding prototype
* fix warning from needlessly-global functionsDenis Vlasenko2007-01-221-7/+7
|
* ps: fix buglet, add microoptimizationDenis Vlasenko2006-12-181-6/+4
|
* ps: add documentation on POSIX psDenis Vlasenko2006-11-051-1/+1
|
* ps: implement POSIX-like options, most notably -oDenis Vlasenko2006-11-051-0/+275
| | | | (activated by CONFIG_DESKTOP)
* replace /proc scanning code by more versatile one.Denis Vlasenko2006-11-051-9/+19
| | | | | | | 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
* top: improve CPU% calculationDenis Vlasenko2006-11-051-1/+1
| | | | style fixes
* Unneeded code removed, usused field "unsigned pscpu" removedDenis Vlasenko2006-11-011-2/+2
|
* mostly style fixesDenis Vlasenko2006-11-011-2/+1
|
* PID should be stored in pid_t, not int or long.Denis Vlasenko2006-11-011-4/+4
| | | | | find_pid_by_name() was returning 0 or -1 in last array element, but -1 was never checked. We can use just 0 intead.
* ps: reduce #ifdef forestDenis Vlasenko2006-11-011-25/+13
|
* get_terminal_width_height: do not pass insanely large valuesDenis Vlasenko2006-10-271-7/+7
|
* getopt_ulflags -> getopt32.Denis Vlasenko2006-10-031-4/+4
| | | | | | | | 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.
* top: add support for -b, -n <iterations>Denis Vlasenko2006-09-291-2/+2
|
* process utilities related style cleanupDenis Vlasenko2006-09-271-17/+16
|
* Change license statements (and clean up headers) on some of the files thatRob Landley2006-09-221-14/+1
| | | | Erik or I are primary copyright holders on.
* - fix copy'n paste errors that got introduced when switching to the shorter ↵Bernhard Reutner-Fischer2006-09-131-1/+1
| | | | | | boilerplate. No object code changes.
* - move #include busybox.h to the very top so we pull in the configBernhard Reutner-Fischer2006-06-021-1/+1
| | | | and eventual platform specific includes in early.
* Robert P. Day removed 8 gazillion occurrences of "extern" on functionRob Landley2006-03-061-1/+1
| | | | definitions. (That should only be on prototypes.)
* removed warning "comparison between signed and unsigned"."Vladimir N. Oleynik"2006-01-301-2/+2
|
* update bb_getopt_ulflags special for 'ps' applet, usaging '-' as first group ↵"Vladimir N. Oleynik"2005-10-051-5/+8
| | | | | | | | char from bb_opt_complementally is new feature: set argv is options; use new bb_getopt_ulflags for ps # define terminal_width 80->79 for unwide use stdout file descriptor for get_terminal_width_height. (its must)
* ps selinux logic correction, but do not tested too"Vladimir N. Oleynik"2005-10-041-4/+3
|
* use updated bb_getopt_ulflags() for ps applet"Vladimir N. Oleynik"2005-10-041-24/+31
|
* - add option 'w' to ps (wide output, optional feature defaults to off).Bernhard Reutner-Fischer2005-10-041-31/+37
| | | | | | | | | | | - move to ENABLE_ and use shorter boilerplate. sizes without selinux-support: text data bss dec hex filename 356 0 0 356 164 procps/ps.o.with-w 300 0 0 300 12c procps/ps.o.no-w 302 0 0 302 12e procps/ps.o.oorig
* A patch from Takeharu KATO to update/fix SE-Linux support.Rob Landley2005-05-031-23/+29
|
* Remove trailing whitespace. Update copyright to include 2004.Eric Andersen2004-03-151-1/+1
|
* Be entirely consistant when using ioctl(0, TIOCGWINSZ, &winsize)Eric Andersen2003-09-151-11/+3
| | | | | to ensure proper fallback behavior on, i.e. serial consoles. -Erik
* Update a bunch of docs. Run a script to update my email addr.Eric Andersen2003-07-141-2/+1
|
* Patch from Russell Coker:Eric Andersen2003-07-031-0/+33
| | | | | I've attached my latest SE Linux patch for busybox against the latest CVS version of busybox.
* Kill CONFIG_FEATURE_USE_DEVPS_PATCH and the devps patch. I'm notEric Andersen2002-12-051-104/+0
| | | | | maintaining it anymore, and it is now terribly out of date. -Erik