aboutsummaryrefslogtreecommitdiff
path: root/libbb/procps.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'busybox' into mergeRon Yorston2015-10-311-3/+5
|\
| * pmap: fix bogus {no such process} comm field textDenys Vlasenko2015-10-241-3/+5
| | | | | | | | | | | | | | | | | | | | | | function old new delta read_cmdline 246 266 +20 procps_get_maps 196 193 -3 packed_usage 30413 30404 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 20/-12) Total: 8 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2015-10-131-3/+1
|\|
| * libbb: introduce kernel-style BUILD_BUG_ON()Denys Vlasenko2015-10-131-3/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2015-08-041-2/+1
|\|
| * libbb: add a function to make a copy of a region of memoryRon Yorston2015-07-191-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a library routine to package the idiom: p = xmalloc(b, n); memcpy(p, b, n); and use it where possible. The example in traceroute used xzalloc but it didn't need to. function old new delta xmemdup - 32 +32 last_main 834 826 -8 make_device 2321 2311 -10 common_traceroute_main 3698 3685 -13 readtoken1 3182 3168 -14 procps_scan 1222 1206 -16 forkchild 655 638 -17 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/6 up/down: 32/-78) Total: -46 bytes Signed-off-by: Ron Yorston <rmy@frippery.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2015-07-141-1/+0
|\|
| * Removes stray empty line from codeManinder Singh2015-07-131-1/+0
| | | | | | | | | | | | | | | | | | This patch removes stray empty line from busybox code reported by script find_stray_empty_lines Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2015-03-141-6/+6
|\| | | | | | | | | | | Conflicts: coreutils/od_bloaty.c libbb/lineedit.c
| * libbb: introduce and use is_prefixed_with()Denys Vlasenko2015-03-121-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta is_prefixed_with - 18 +18 complete_username 78 77 -1 man_main 737 735 -2 fsck_device 429 427 -2 unpack_ar_archive 80 76 -4 strip_unsafe_prefix 105 101 -4 singlemount 1054 1050 -4 rtc_adjtime_is_utc 90 86 -4 resolve_mount_spec 88 84 -4 parse_one_line 1029 1025 -4 parse_conf 1460 1456 -4 may_wakeup 83 79 -4 loadkmap_main 219 215 -4 get_irqs_from_stat 103 99 -4 get_header_cpio 913 909 -4 findfs_main 79 75 -4 fbsplash_main 1230 1226 -4 load_crontab 776 771 -5 expand_vars_to_list 1151 1146 -5 date_main 881 876 -5 skip_dev_pfx 30 24 -6 make_device 2199 2193 -6 complete_cmd_dir_file 773 767 -6 run_applet_and_exit 715 708 -7 uudecode_main 321 313 -8 pwdx_main 197 189 -8 execute 568 560 -8 i2cdetect_main 1186 1176 -10 procps_scan 1242 1230 -12 procps_read_smaps 1017 1005 -12 process_module 746 734 -12 patch_main 1903 1891 -12 nfsmount 3572 3560 -12 stack_machine 126 112 -14 process_timer_stats 449 435 -14 match_fstype 111 97 -14 do_ipaddr 1344 1330 -14 open_list_and_close 359 343 -16 get_header_tar 1795 1779 -16 prepend_new_eth_table 340 323 -17 fsck_main 1811 1794 -17 find_iface_state 56 38 -18 dnsd_main 1321 1303 -18 base_device 179 158 -21 find_keyword 104 82 -22 handle_incoming_and_exit 2785 2762 -23 parse_and_put_prompt 774 746 -28 modinfo 347 317 -30 find_action 204 171 -33 update_passwd 1470 1436 -34 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/49 up/down: 18/-540) Total: -522 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | ps: exclude more unused codeRon Yorston2014-03-231-2/+2
| |
* | Merge branch 'busybox' into mergeRon Yorston2013-02-071-1/+1
|\|
| * whitespace cleanup. no code changesDenys Vlasenko2013-01-141-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2012-10-101-0/+2
|\|
| * top/ps: argv0:"gdm-session-worker [pam/gdm-password]" == comm:"gdm-session-wor"Denys Vlasenko2012-10-021-0/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2012-09-071-1/+1
|\| | | | | | | | | | | Conflicts: include/libbb.h shell/ash.c
| * top: fix "last CPU" parsingDenys Vlasenko2012-09-061-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2012-03-231-7/+9
|\| | | | | | | | | Conflicts: Makefile.flags
| * libbb/procps.c: make fast_strtoul_10() stop on '\n' tooDenys Vlasenko2012-02-281-4/+5
| | | | | | | | | | | | This time for real :) Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/procps.c: make fast_strtoul_10() stop on '\n' tooDenys Vlasenko2012-02-281-1/+2
| | | | | | | | | | | | This is needed for parsing /proc data on linux 2.4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tweak comment, no code changesDenys Vlasenko2012-02-021-3/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit 'c0cae52662ccced9df19f19ec94238d1b1e3bd71' into mergeRon Yorston2012-03-231-15/+19
|\| | | | | | | | | | | Conflicts: Makefile.flags scripts/basic/fixdep.c
| * top: fix CPU% for thread display. Closes 4081Denys 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