aboutsummaryrefslogtreecommitdiff
path: root/procps (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'busybox' into mergeRon Yorston2026-01-221-0/+581
|\
| * vmstat: fix I/O, int and ctxt rates: need to be divided by secondsDenys Vlasenko2026-01-201-5/+8
| | | | | | | | | | | | | | function old new delta vmstat_main 657 708 +51 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * vmstat: fixes for >4TB memory and long sampling intervalsDenys Vlasenko2026-01-201-39/+75
| | | | | | | | | | | | | | | | | | | | | | function old new delta load_row 661 1061 +400 vmstat_main 561 657 +96 .rodata 106716 106746 +30 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 526/0) Total: 526 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * vmstat: fix "vmstat N 0" to act compatibly (do not print infinitely)Denys Vlasenko2026-01-191-5/+12
| | | | | | | | | | | | | | function old new delta vmstat_main 559 561 +2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * vmstat: smarter handling of header re-printingDenys Vlasenko2026-01-191-23/+30
| | | | | | | | | | | | | | | | | | | | function old new delta vmstat_main 230 559 +329 print_row 340 - -340 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/0 up/down: 329/-340) Total: -11 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * vmstat: show shorter, human-readable accumulating counts if they grow largeDenys Vlasenko2026-01-181-13/+29
| | | | | | | | | | | | | | | | | | | | function old new delta print_row 247 340 +93 .rodata 106717 106716 -1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 93/-1) Total: 92 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * vmstat: reduce the chances of misaligned columnsDenys Vlasenko2026-01-181-8/+26
| | | | | | | | | | | | | | function old new delta print_row 215 247 +32 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * vmstat: code shrinkDenys Vlasenko2026-01-181-28/+39
| | | | | | | | | | | | | | | | | | | | | | function old new delta load_row 667 661 -6 next_col 105 59 -46 coldescs 239 146 -93 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-145) Total: -145 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * procps: new applet: vmstatDavid Leonard2026-01-181-0/+483
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a compact vmstat applet that matches the default behaviour of procps's vmstat. function old new delta load_row - 667 +667 .rodata 106441 106717 +276 coldescs - 239 +239 vmstat_main - 230 +230 print_row - 215 +215 next_col - 105 +105 find_col - 78 +78 packed_usage 35828 35868 +40 applet_names 2849 2856 +7 applet_main 1640 1644 +4 applet_install_loc 205 206 +1 ------------------------------------------------------------------------------ (add/remove: 7/0 grow/shrink: 5/0 up/down: 1862/0) Total: 1862 bytes Signed-off-by: David Leonard <d+busybox@adaptive-enterprises.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2025-11-111-4/+4
|\|
| * pgrep/pkill: fix -x to also match comm fieldDenys Vlasenko2025-11-081-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | When running `pgrep -x example` against a process `/bin/example --arg`, BusyBox fails to match, while GNU pgrep succeeds. The reason is that the comparison is done only against the full argv[0] rather than comm. This patch changes pgrep -x to also try /proc/[pid]/comm for exact matching. function old new delta pgrep_main 681 670 -11 Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2025-09-062-17/+36
|\|
| * top,pmap: speed up /smaps parsingDenys Vlasenko2025-08-061-11/+26
| | | | | | | | | | | | | | | | | | | | | | function old new delta procps_read_smaps 515 529 +14 procps_get_maps 685 665 -20 .rodata 105847 105820 -27 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 14/-47) Total: -33 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: make read_cmdline() replace chars 1..31 with '?', not spaceDenys Vlasenko2025-08-061-6/+10
| | | | | | | | | | | | Space was too inconspicuous on output Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2025-08-152-163/+314
|\|
| * top: simplify command line readingDenys Vlasenko2025-08-061-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta cmdline_to_line_buf_and_print - 48 +48 read_cmdline 326 327 +1 display_topmem_process_list 523 505 -18 display_process_list 1186 1161 -25 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/2 up/down: 49/-43) Total: 6 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * top: disentangle printing logicDenys Vlasenko2025-08-061-83/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta print_line_buf - 78 +78 print_line_bold - 50 +50 top_main 1043 1091 +48 handle_input 708 714 +6 do_stats 186 192 +6 .rodata 115543 115526 -17 display_topmem_process_list 748 523 -225 display_process_list 1432 1186 -246 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 3/3 up/down: 188/-488) Total: -300 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * top: consistently NOT use the last column of the displayDenys Vlasenko2025-08-051-56/+51
| | | | | | | | | | | | | | | | | | | | | | function old new delta .rodata 115537 115543 +6 top_main 1047 1043 -4 display_process_list 1459 1432 -27 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 6/-31) Total: -25 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * pmap: increase max handled command line length to 4kDenys Vlasenko2025-08-051-5/+7
| | | | | | | | | | | | | | | | | | | | function old new delta procps_get_maps 181 779 +598 read_smaps 563 - -563 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/0 up/down: 598/-563) Total: 35 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * top,pmap: do not use common code for reading /proc/PID/smapsDenys Vlasenko2025-08-052-20/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic is in fact quite far from common. While at it, stop accounting "---p" mappings as mapped (e.g. VSZ in top). Nothing is mapped there (why would kernel waste RAM to map pages which can't be accessed?). function old new delta read_smaps - 562 +562 read_cmdline 315 326 +11 print_smaprec 97 101 +4 procps_scan 1219 1211 -8 .rodata 115541 115533 -8 skip_whitespace_if_prefixed_with 25 - -25 procps_read_smaps 864 577 -287 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 2/3 up/down: 577/-328) Total: 249 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * top: improve response time to keyboard inputDenys Vlasenko2025-08-051-14/+27
| | | | | | | | | | | | | | | | | | | | function old new delta handle_input 674 708 +34 top_main 1019 1047 +28 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 62/0) Total: 62 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * top: reduce flicker: redraw screen with "clear to EOL" commands, not one ↵Denys Vlasenko2025-08-051-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | "clear screen" function old new delta display_topmem_process_list 680 748 +68 display_process_list 1403 1459 +56 .rodata 115512 115541 +29 top_main 1014 1019 +5 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/0 up/down: 158/0) Total: 158 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * top: make uppercase 'S' walk topmem in opposite directionDenys Vlasenko2025-08-051-1/+8
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * top: show RSS instead of VSF, virtual mapped size is often meaninglessDenys Vlasenko2025-08-051-15/+15
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * top: fix display of very large VSZDenys Vlasenko2025-08-051-2/+15
| | | | | | | | | | | | | | | | | | | | function old new delta display_process_list 1366 1403 +37 handle_input 628 636 +8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 45/0) Total: 45 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * top: do not rescan processes on second 's'Denys Vlasenko2025-08-051-1/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2024-07-141-19/+6
|\|
| * powertop: code shrinkDenys Vlasenko2024-07-131-19/+6
| | | | | | | | | | | | | | function old new delta print_intel_cstates 477 475 -2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | free: bloat reductionRon Yorston2024-04-181-1/+1
| | | | | | | | | | | | | | Allow the compiler to inline parse_meminfo() so it can spot some optimisations. Saves 208-240 bytes.
* | Merge branch 'busybox' into mergeFRP-5236-g7dff7f376Ron Yorston2023-12-051-13/+28
|\|
| * top: improve large PID display in memory ('s') modeDenys Vlasenko2023-11-231-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | Display VSZ[RW] fields in more compact form if PID is wider. function old new delta display_topmem_process_list 564 614 +50 ulltoa5_and_space - 14 +14 ulltoa6_and_space 14 - -14 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 1/0 up/down: 64/-14) Total: 50 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | ps: increase length of 'comm' fieldRon Yorston2023-08-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Linux the command name associated with a process (as can be obtained from '/proc/<PID>/comm') is truncated to 16 characters. Thus upstream BusyBox only allows 16 characters for the 'comm' field in 'ps'. There's no need for such a constraint in busybox-w32. Moreover, the command name is used for the full command line ('args' field) in most cases. This field is allowed to be rather long in 'ps' so it's not expected to be truncated. Still, to avoid diverging too much from upstream it's best to have some measure of truncation. Increase the allowed length of the command name to 32 characters. Adds 16 bytes. (GitHub issue #358)
* | Merge branch 'busybox' into mergeRon Yorston2023-07-1318-22/+22
|\|
| * Update applet size estimatesDenys Vlasenko2023-07-1018-21/+21
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: code shrink: introduce and use [_]exit_FAILURE()Denys Vlasenko2023-06-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta exit_FAILURE - 7 +7 _exit_FAILURE - 7 +7 run 198 199 +1 restore_state_and_exit 114 115 +1 xbsd_write_bootstrap 399 397 -2 vfork_compressor 209 207 -2 sig_handler 12 10 -2 serial_ctl 154 152 -2 parse_args 1169 1167 -2 onintr 21 19 -2 make_new_session 493 491 -2 login_main 988 986 -2 gotsig 35 33 -2 do_iplink 1315 1313 -2 addgroup_main 397 395 -2 inetd_main 1911 1908 -3 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 2/12 up/down: 16/-25) Total: -9 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | pgrep,pkill: remove non-functional optionsRon Yorston2023-06-221-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to limitations of the process scanning code on Windows some features of pgrep and pkill don't work properly: - display/matching of the full command line (-a/-f) - killing the oldest or newest process (-o/-n) - matching session id (-s) To avoid disappointment or error support for these features has been removed. Saves 408-464 bytes.
* | Merge branch 'busybox' into mergeRon Yorston2023-05-231-0/+18
|\|
| * nmeter: improve %T fractionals displayDenys Vlasenko2023-05-071-0/+18
| | | | | | | | | | | | | | function old new delta nmeter_main 751 786 +35 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | win32: export xappendword()Ron Yorston2023-04-231-0/+7
| | | | | | | | | | | | | | Export the function xappendword() from make. Use it in drop and watch. Saves 8-80 bytes, an unusually large disparity.
* | Merge branch 'busybox' into mergeRon Yorston2023-04-092-10/+17
|\|
| * ash: sleep builtin with no arguments should not exitDenys Vlasenko2023-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | function old new delta sleep_main 116 143 +27 .rodata 105245 105268 +23 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 50/0) Total: 50 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * top: stop using div() from libc, compilers now do it betterDenys Vlasenko2023-02-131-9/+16
| | | | | | | | | | | | | | | | | | | | function old new delta div 23 - -23 display_process_list 1237 1178 -59 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 0/1 up/down: 0/-82) Total: -82 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2023-02-131-3/+6
|\|
| * nmeter: increase maximum /proc file size (needed for large machines)Denys Vlasenko2023-01-241-3/+6
| | | | | | | | | | | | | | function old new delta get_file 185 201 +16 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2023-01-051-4/+11
|\|
| * Remove "select PLATFORM_LINUX"Denys Vlasenko2022-11-292-2/+0
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Fix non-Linux buildsSamuel Thibault2022-11-292-0/+2
| | | | | | | | | | | | | | | | | | | | | | Various tools are Linuxish and should thus only attempted to build on Linux only. Some features are also Linux-only. Also, libresolv is used on all GNU platforms, notably GNU/Hurd and GNU/kfreeBSD. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * pkill: add -e to display the name and PID of the process being killedLouis Sautier2022-10-141-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | This mimics the behaviour of pkill -e / --echo from procps. function old new delta .rodata 105179 105200 +21 packed_usage 34523 34516 -7 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 21/-7) Total: 14 bytes Signed-off-by: Louis Sautier <sautier.louis@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2022-10-121-2/+2
|\|
| * *: style fixDenys Vlasenko2022-08-301-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>