aboutsummaryrefslogtreecommitdiff
path: root/libbb/procps.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit '1_19_4' into merge_1_19Ron Yorston2012-03-221-15/+19
|\
| * Apply post-1.19.0 patches, bump version to 1.19.11_19_1Denys Vlasenko2011-08-281-15/+19
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit '066f39956641300c1e5c6bfe6c11a115cea3e2cf' into mergeRon Yorston2012-03-221-4/+40
|\| | | | | | | | | Conflicts: procps/ps.c
| * libbb/read_cmdline: prepend {comm} if different from argv0. Closes 3835.Denys Vlasenko2011-06-181-3/+32
| | | | | | | | | | | | | | function old new delta read_cmdline 114 233 +119 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * procps: remove PSSCAN_STAT define, users were using it incorrectlyDenys Vlasenko2011-06-181-1/+8
| | | | | | | | | | | | Also contains small cleanups ps. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit '19311bfa7b8e8c6effa9c375de9b0eb4338bee12' into mergeRon Yorston2012-03-221-7/+7
|\| | | | | | | | | | | Conflicts: coreutils/ls.c shell/ash.c
| * libbb: make user/group name cache strings longer (~27 chars)Denys Vlasenko2011-03-011-7/+7
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit '8d0e0cdadf726beab28ccdc7d69738c1534e1f74' into mergeRon Yorston2012-03-211-1/+3
|\| | | | | | | | | | | | | Conflicts: include/platform.h libbb/Kbuild.src libbb/messages.c
| * suppress "'fast_strtol_10' defined but not used" warningDenys Vlasenko2011-01-071-1/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* | Merge remote-tracking branch 'upstream/master'Nguyễn Thái Ngọc Duy2011-01-041-0/+2
|\|
| * pstree: new applet. +1664 bytesLauri Kasanen2010-12-051-0/+2
| | | | | | | | | | | | | | | | | | text data bss dec hex filename 883379 936 17192 901507 dc183 busybox_old 885043 936 17192 903171 dc803 busybox_unstripped Signed-off-by: Lauri Kasanen <curaga@operamail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit '06f719fd79fe15ce6fd5431bc58fcb22851de24d^'Nguyễn Thái Ngọc Duy2011-01-041-1/+1
|\|
| * fix build failure for pmapDan Fandrich2010-09-191-1/+1
| | | | | | | | | | Signed-off-by: Dan Fandrich <dan@coneharvesters.com> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* | win32: reimplement procps_scan()Nguyễn Thái Ngọc Duy2010-09-151-0/+3
|/ | | | | | | On Linux, procps_scan() relies on /proc, which is obviously unavailable on Windows. This implementation currently supports procps_status_t.{pid,comm} only.
* pmap: new applet. +1k.Alexander Shishkin2010-08-281-52/+108
| | | | | | | | | | | | | | | | | | | pmap is a tool used to look at processes' memory maps, normally found in procps package. It provides more readable and easily sortable output (one line per mapping) from maps/smaps files in /proc/PID/. This would help in debugging memory usage issues, especially on devices where lots of typing is not a viable option. This patch does'n implement -d and -A command line options of GNU pmap, since those are not that must have features and I was afraid of going blind from looking at its code. The implementation takes smaps scanning part out of procps_scan() function and moves it into procps_read_smaps(), which does more detailed processing of a single PID's smaps data. Signed-off-by: Alexander Shishkin <virtuoso@slind.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* pidof/killall: fix bug 625 (kernel threads get stale "binary name")Denys Vlasenko2009-09-221-62/+71
| | | | | | | function old new delta procps_scan 1622 1642 +20 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ps,top: add an option to show threads. +260 bytes of codeDenys Vlasenko2009-09-191-0/+25
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix read_cmdline API and a small buglet where "[comm]" may be too narrowDenys Vlasenko2009-09-121-3/+4
| | | | | | | | | | | function old new delta func_args 25 26 +1 read_cmdline 119 114 -5 display_process_list 1462 1447 -15 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 1/-20) Total: -19 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* top, ps: do not output trailing spacesDenys Vlasenko2009-09-111-0/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* make find_pid_by_name look at /proc/PID/exe tooAlexander Shishkin2009-07-291-6/+12
| | | | | | | | | | function old new delta procps_scan 1642 1709 +67 find_pid_by_name 193 223 +30 free_procps_scan 29 37 +8 Signed-off-by: Alexander Shishkin <virtuoso@slind.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ps: conditionally support additional -o FIELDsDenys Vlasenko2009-07-031-2/+38
| | | | | | | | | | | | | | | | | | | | | | | function old new delta procps_scan 1409 1642 +233 out_spec 220 300 +80 func_ruser - 36 +36 func_rgroup - 36 +36 func_group 13 49 +36 func_nice - 29 +29 buffer_fill_and_print 179 196 +17 send_tree 355 360 +5 mkfs_vfat_main 1604 1609 +5 display_speed 85 90 +5 scriptreplay_main 194 197 +3 find_out_spec 55 58 +3 changepath 192 195 +3 sha1_process_block64 497 484 -13 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 10/1 up/down: 491/-13) Total: 478 bytes Signed-off-by: David Krakov <krakov@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: mass renaming of USE_XXXX to IF_XXXXDenis Vlasenko2009-04-211-1/+1
| | | | | | and SKIP_XXXX to IF_NOT_XXXX - the second one was especially badly named. It was not skipping anything!
* libbb: password/group function helpers rewritten by Tito:Denis Vlasenko2008-12-021-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta xgetpwuid - 27 +27 uid2uname_utoa - 22 +22 gid2group_utoa - 22 +22 uid2uname - 18 +18 gid2group - 18 +18 buffer_fill_and_print 179 196 +17 print_user 12 24 +12 print_group 12 24 +12 get_cached 89 99 +10 ... print_common 134 120 -14 vlock_main 415 396 -19 logger_main 410 387 -23 crontab_main 642 609 -33 bb_getpwuid 42 - -42 bb_getgrgid 42 - -42 bb_getug 80 - -80 ------------------------------------------------------------------------------ (add/remove: 6/3 grow/shrink: 9/11 up/down: 187/-296) Total: -109 bytes
* top: optional SMP support by Vineet Gupta (vineetg76 AT gmail.com)Denis Vlasenko2008-09-251-7/+26
|
* libbb: make xrealloc_vector zero out the realloc'ed tailDenis Vlasenko2008-08-041-4/+4
| | | | | | | | | | | | | | function old new delta xrealloc_vector_helper 51 76 +25 man_main 712 705 -7 act 250 234 -16 create_list 91 70 -21 getopt_main 695 664 -31 load_dep_bb 281 248 -33 fileAction 744 709 -35 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/6 up/down: 25/-143) Total: -118 bytes
* libbb: [x]fopen_for_{read,write} introduced and used.Denis Vlasenko2008-07-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (by Valdimir) function old new delta config_open2 - 41 +41 config_read 507 542 +35 find_pair 169 187 +18 fopen_for_write - 14 +14 fopen_for_read - 14 +14 find_main 406 418 +12 xfopen_for_write - 10 +10 xfopen_for_read - 10 +10 popstring 134 140 +6 parse_inittab 396 401 +5 next_token 923 928 +5 pack_gzip 1659 1661 +2 bb__parsespent 117 119 +2 fallbackSort 1719 1717 -2 evalvar 1376 1374 -2 qrealloc 36 33 -3 ... ... ... ... singlemount 4579 4569 -10 process_stdin 443 433 -10 patch_main 1111 1101 -10 ifupdown_main 2175 2165 -10 file_action_grep 90 80 -10 uuidcache_init 649 637 -12 hush_main 797 785 -12 read_config 230 217 -13 dpkg_main 3835 3820 -15 read_line_input 3134 3110 -24 sysctl_main 232 203 -29 config_open 40 10 -30 WARN_BAD_LINE 44 - -44 login_main 1714 1575 -139 ------------------------------------------------------------------------------ (add/remove: 5/1 grow/shrink: 8/74 up/down: 174/-737) Total: -563 bytes
* pidof/killall: allow find_pid_by_name to find runningDenis Vlasenko2008-07-171-9/+8
| | | | | | processes started as scripts_with_name_longer_than_15_bytes.sh closes bug 4054 (and is generally neat)
* libbb: introduce and use xrealloc_vectorDenis Vlasenko2008-07-081-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta xrealloc_vector_helper - 51 +51 create_list 84 99 +15 getopt_main 690 695 +5 passwd_main 1049 1053 +4 get_cached 85 89 +4 msh_main 1377 1380 +3 add_match 42 41 -1 read_lines 720 718 -2 grave 1068 1066 -2 fill_match_lines 143 141 -2 add_to_dirlist 67 65 -2 add_input_file 49 47 -2 act 252 250 -2 fsck_main 2252 2246 -6 man_main 765 757 -8 bb_internal_initgroups 228 220 -8 cut_main 1052 1041 -11 add_edge_to_node 55 43 -12 dpkg_main 3851 3835 -16 ifupdown_main 2202 2178 -24 sort_main 838 812 -26 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 5/15 up/down: 82/-124) Total: -42 bytes
* *: introduce and use FAST_FUNC: regparm on i386, otherwise no-onDenis Vlasenko2008-06-271-9/+9
| | | | | | | text data bss dec hex filename 808035 611 6868 815514 c719a busybox_old 804472 611 6868 811951 c63af busybox_unstripped
* libbb: fix wrong sscanf count check (affects pidof etc)Denis Vlasenko2008-04-251-1/+1
|
* *: add -Wunused-parameter; fix resulting breakageDenis Vlasenko2008-03-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* ps: add conditional support for -o [e]timeDenis Vlasenko2008-01-051-2/+5
|
* trivial typo fixDenis Vlasenko2007-09-291-1/+1
|
* pgrep,pkill: new applets by Loic Grenie <loic.grenie@gmail.com>Denis Vlasenko2007-09-291-1/+10
|
* remove if() which is always trueDenis Vlasenko2007-09-291-2/+1
|
* more "if (p) free(p)" fixes; fix a typo in commentDenis Vlasenko2007-09-281-12/+6
|
* top: TOPMEM feature - 's(how sizes)' command. +2.5k when enabled,Denis Vlasenko2007-09-081-0/+73
| | | | | | +80 bytes when disabled (mainly because of text wrapping fixes in display_process_list).
* ps: fix RSS parsing (rss field in /proc/PID/stat is in pages, not bytes)Denis Vlasenko2007-08-261-4/+15
|
* bb_getpwuid, bb_getgrgid: change order of arguments to more intuitive one;Denis Vlasenko2007-07-271-2/+3
| | | | | comment thoroughly when they die and when they dont.
* stray trailing tabs removedDenis Vlasenko2007-07-191-2/+2
|
* remove accumulated stray trailing whitespaceDenis Vlasenko2007-07-171-1/+1
|
* top,ps: improve /proc/PID/cmdinfo reading codeDenis Vlasenko2007-06-301-1/+34
| | | | | | | | | | | | | | | | | | | | | | | | 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
* killall, pidof: use argv0 for process matching tooDenis Vlasenko2007-06-301-15/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* procps: shrink /proc scanning code a bitDenis Vlasenko2007-06-301-16/+22
| | | | | | | | | | | | | 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
* remove extra ')'Denis Vlasenko2007-06-211-1/+1
|
* top,ps: 'stringify' tty only when needed. -60 bytes.Denis Vlasenko2007-06-191-18/+6
|
* top: speedup if tty info is not requestedDenis Vlasenko2007-06-191-1/+3
|
* top,ps: reduce CPU usage in decimal conversion (optional)Denis Vlasenko2007-06-191-2/+53
| | | | | | | text data bss dec hex filename 734651 3040 14416 752107 b79eb busybox_old 734751 3040 14416 752207 b7a4f busybox_unstripped
* top: add config option and code for global CPU % displayDenis Vlasenko2007-06-101-2/+9
|