aboutsummaryrefslogtreecommitdiff
path: root/libbb/procps.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'busybox' into mergeRon Yorston2021-01-141-31/+20
|\
| * libbb/procps: smaller global data for username/groupname cacheDenys Vlasenko2020-12-301-28/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta get_cached 101 133 +32 cache_user_group - 4 +4 get_cached_username 17 14 -3 username 8 - -8 groupname 8 - -8 clear_username_cache 65 47 -18 ------------------------------------------------------------------------------ (add/remove: 1/2 grow/shrink: 1/2 up/down: 36/-37) Total: -1 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * randomconfig fixesDenys Vlasenko2020-12-291-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: add and use infrastructure for fixed page size optimizationDenys Vlasenko2020-12-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta procps_scan 1121 1118 -3 getpagesize 6 - -6 rpm_main 1037 1027 -10 rpm2cpio_main 120 110 -10 ptok 38 21 -17 time_main 1282 1261 -21 mkswap_main 317 278 -39 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 0/6 up/down: 0/-106) Total: -106 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2020-07-091-2/+10
|\|
| * procps: code shrinkMartin Lewis2020-06-291-2/+10
| | | | | | | | | | | | | | | | | | | | | | function old new delta skip_whitespace_if_prefixed_with - 17 +17 procps_read_smaps 911 854 -57 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/1 up/down: 17/-57) Total: -40 bytes Signed-off-by: Martin Lewis <martin.lewis.x84@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2019-01-101-4/+4
|\|
| * pmap: make 32-bit version work better on 64-bit kernelsDenys Vlasenko2018-12-311-4/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2017-11-031-1/+0
|\|
| * whitespace and comment format fixes, no code changesDenys Vlasenko2017-10-051-1/+0
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2017-02-081-10/+14
|\|
| * ps: avoid -o stat to contain spaces. Closes 9631Denys Vlasenko2017-02-021-10/+14
| | | | | | | | | | | | | | function old new delta procps_scan 1227 1236 +9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | 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>