aboutsummaryrefslogtreecommitdiff
path: root/procps (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | win32: add uptime to sysinfo(2), enable uptime appletRon Yorston2021-02-191-3/+1
| | | | | | | | | | | | | | | | | | | | Fill the uptime member of the sysinfo structure. With this change we can: - use sysinfo(2) in the 'ps' applet; - enable the 'uptime' applet (though without useful support for load averages).
* | free: implement sysinfo(2) and enable free(1)Ron Yorston2021-02-181-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | This is an experimental implementation of sysinfo(2)/free(1). It uses the WIN32 API GlobalMemoryStatusEx() to obtain information about memory. It seems that the 'total pagefile' value includes total RAM as well as pagefile and 'available pagefile' includes available RAM. So the RAM values are deducted. I've no idea what corresponds to Linux buffers and cache.
* | Merge branch 'busybox' into mergeRon Yorston2021-02-052-2/+2
|\|
| * libbb: introduce and use fputs_stdoutRon Yorston2021-02-032-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta fputs_stdout - 12 +12 zxc_vm_process 7237 7230 -7 yes_main 85 78 -7 write_block 380 373 -7 wrapf 305 298 -7 strings_main 437 430 -7 show_bridge 353 346 -7 rev_main 384 377 -7 put_prompt_custom 58 51 -7 put_cur_glyph_and_inc_cursor 168 161 -7 print_numbered_lines 152 145 -7 print_named_ascii 130 123 -7 print_name 135 128 -7 print_login_issue 386 379 -7 print_ascii 208 201 -7 powertop_main 1249 1242 -7 od_main 1789 1782 -7 logread_main 518 511 -7 head_main 804 797 -7 display_process_list 1319 1312 -7 cut_main 1002 995 -7 bb_dump_dump 1550 1543 -7 bb_ask_noecho 393 386 -7 baseNUM_main 702 695 -7 expand_main 755 745 -10 dumpleases_main 497 487 -10 write1 12 - -12 putcsi 37 23 -14 print_login_prompt 55 41 -14 paste_main 525 511 -14 cat_main 440 426 -14 print_it 245 230 -15 print_addrinfo 1188 1171 -17 print_rule 770 750 -20 print_linkinfo 842 822 -20 httpd_main 791 771 -20 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/34 up/down: 12/-341) Total: -329 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2021-01-146-21/+23
|\|
| * pmap: fix column width, closes 13431Denys Vlasenko2021-01-051-9/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: introduce and use xgettimeofday(), do not truncate 64-bit time_t in ↵Denys Vlasenko2020-12-301-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shells function old new delta xgettimeofday - 11 +11 get_local_var_value 280 281 +1 svlogd_main 1323 1322 -1 change_epoch 67 66 -1 timestamp_and_log 461 458 -3 hwclock_main 301 298 -3 fmt_time_bernstein_25 135 132 -3 step_time 331 326 -5 script_main 1207 1202 -5 machtime 34 28 -6 curtime 61 54 -7 ts_main 423 415 -8 nmeter_main 761 751 -10 gettime1900d 67 46 -21 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/12 up/down: 12/-73) Total: -61 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * help text: replace [OPTIONS] with actual options (if not too long)Denys Vlasenko2020-12-132-2/+2
| | | | | | | | | | | | | | function old new delta packed_usage 33620 33665 +45 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * decrease paddign: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nillyDenys Vlasenko2020-11-302-2/+2
| | | | | | | | | | | | | | | | text data bss dec hex filename 1021988 559 5052 1027599 fae0f busybox_old 1021236 559 5052 1026847 fab1f busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * free: code shrinkDenys Vlasenko2020-11-271-4/+12
| | | | | | | | | | | | | | function old new delta free_main 664 657 -7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2020-11-121-1/+1
|\|
| * avoid using strok - eliminates use of hidden global variableDenys Vlasenko2020-10-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta udhcp_str2optset 616 650 +34 setpriv_main 950 975 +25 switch_root_main 688 706 +18 parse 958 970 +12 getopt_main 622 628 +6 parse_resolvconf 302 306 +4 mpstat_main 1139 1142 +3 static.p 4 - -4 cdcmd 717 702 -15 strtok 148 - -148 ------------------------------------------------------------------------------ (add/remove: 0/3 grow/shrink: 7/1 up/down: 102/-167) Total: -65 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2020-08-233-3/+0
|\|
| * build system: drop PLATFORM_LINUXRon Yorston2020-08-133-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PLATFORM_LINUX is a hidden configuration option which is disabled by default and enabled at over a hundred locations for features that are deemed to be Linux specific. The only effect of PLATFORM_LINUX is to control compilation of libbb/match_fstype.c. This file is only needed by mount and umount. Remove all references to PLATFORM_LINUX and compile match_fstype.c if mount or umount is enabled. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | build system: reinstate PLATFORM_LINUXRon Yorston2020-08-031-0/+1
| | | | | | | | | | | | | | Removing 'select PLATFORM_LINUX' from ps and stat has no material effect: it just causes match_fstype.o to be built needlessly. Remove this difference from upstream.
* | Merge branch 'busybox' into mergeRon Yorston2020-07-093-17/+62
|\|
| * randomconfig fixesDenys Vlasenko2020-06-231-0/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * nmeter: add %T (zero-based timestamp) formatDenys Vlasenko2020-06-101-14/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta collect_tv - 132 +132 collect_monotonic - 61 +61 nmeter_main 754 778 +24 gmtime - 21 +21 init_monotonic - 18 +18 init_functions 44 48 +4 packed_usage 33432 33420 -12 collect_time 125 19 -106 ------------------------------------------------------------------------------ (add/remove: 5/0 grow/shrink: 2/2 up/down: 260/-118) Total: 142 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sysctl: do report EACCES errors on writeDenys Vlasenko2020-06-091-3/+6
| | | | | | | | | | | | | | | | | | | | function old new delta sysctl_act_recursive 165 179 +14 sysctl_act_on_setting 467 471 +4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 18/0) Total: 18 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2020-01-081-5/+0
|\|
| * suppress a few "unused function" warningsDenys Vlasenko2019-10-251-5/+0
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2019-08-167-25/+32
|\|
| * top: do not use previous colleced data wheh "h" toggles threads displayDenys Vlasenko2019-08-111-1/+4
| | | | | | | | | | | | | | | | | | This prevents first update from showing incorrect CPU usage data function old new delta handle_input 620 643 +23 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * nmeter: do not clamp down %Nc to minimum of 10 (think nmeter "%`nproc`c")Denys Vlasenko2019-08-061-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Also, go for unsigned divisions. function old new delta init_cpu 61 73 +12 collect_cpu 444 422 -22 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 12/-22) Total: -10 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: reduce the overhead of single parameter bb_error_msg() callsJames Byrne2019-07-025-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Back in 2007, commit 0c97c9d43707 ("'simple' error message functions by Loic Grenie") introduced bb_simple_perror_msg() to allow for a lower overhead call to bb_perror_msg() when only a string was being printed with no parameters. This saves space for some CPU architectures because it avoids the overhead of a call to a variadic function. However there has never been a simple version of bb_error_msg(), and since 2007 many new calls to bb_perror_msg() have been added that only take a single parameter and so could have been using bb_simple_perror_message(). This changeset introduces 'simple' versions of bb_info_msg(), bb_error_msg(), bb_error_msg_and_die(), bb_herror_msg() and bb_herror_msg_and_die(), and replaces all calls that only take a single parameter, or use something like ("%s", arg), with calls to the corresponding 'simple' version. Since it is likely that single parameter calls to the variadic functions may be accidentally reintroduced in the future a new debugging config option WARN_SIMPLE_MSG has been introduced. This uses some macro magic which will cause any such calls to generate a warning, but this is turned off by default to avoid use of the unpleasant macros in normal circumstances. This is a large changeset due to the number of calls that have been replaced. The only files that contain changes other than simple substitution of function calls are libbb.h, libbb/herror_msg.c, libbb/verror_msg.c and libbb/xfuncs_printf.c. In miscutils/devfsd.c, networking/udhcp/common.h and util-linux/mdev.c additonal macros have been added for logging so that single parameter and multiple parameter logging variants exist. The amount of space saved varies considerably by architecture, and was found to be as follows (for 'defconfig' using GCC 7.4): Arm: -92 bytes MIPS: -52 bytes PPC: -1836 bytes x86_64: -938 bytes Note that for the MIPS architecture only an exception had to be made disabling the 'simple' calls for 'udhcp' (in networking/udhcp/common.h) because it made these files larger on MIPS. Signed-off-by: James Byrne <james.byrne@origamienergy.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * free: include SReclaimable in cached valueLukas Rusak2019-06-251-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed that the 'used' values from busybox free and procps-ng free differed so I looked into why. It turns out that procps-ng uses the "SReclaimable" value as part of the cached value. This was changed in procps-ng commit 05d751c4f076a2f0118b914c5e51cfbb4762ad8e function old new delta free_main 633 653 +20 Signed-off-by: Lukas Rusak <lorusak@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2019-05-271-1/+1
|\|
| * ps: ensure fields are separated by at least one space, closes 11826Denys Vlasenko2019-05-031-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2019-04-171-4/+15
|\|
| * top: provide cmdline argument '-H' to enable thread scanning by defaultThomas De Schampheleire2019-04-041-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular useful when you want to evaluate the threads in batch mode: top -Hbn1 function old new delta top_main 928 941 +13 packed_usage 33317 33319 +2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 15/0) Total: 15 bytes Signed-off-by: Philippe Belet <philippe.belet@nokia.com> Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2019-03-161-5/+12
|\|
| * watch: support fractional -n SECDenys Vlasenko2019-03-121-5/+12
| | | | | | | | | | | | | | function old new delta watch_main 212 232 +20 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2019-03-121-3/+2
|\|
| * top: tweak --helpDenys Vlasenko2019-02-271-3/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2019-02-121-12/+45
|\|
| * sysctl: fix compatibility with procps sysctlAaro Koskinen2019-02-081-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Busybox sysctl is incompatible with procps when '.' appears in directory name, mostly happens with VLANs. busybox syntax (since 2008): net.ipv4.conf.eth0.100.mc_forwarding procps syntax (since 2002): net.ipv4.conf.eth0/100.mc_forwarding (supported by both: net/ipv4/conf/eth0.100/mc_forwarding) Use procps syntax for output; for input, allow both. function old new delta sysctl_dots_to_slashes 86 143 +57 sysctl_act_on_setting 443 453 +10 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 67/0) Total: 67 bytes Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sysctl: do slash/dot conversions only on name, not value partDenys Vlasenko2019-02-081-3/+5
| | | | | | | | | | | | | | function old new delta sysctl_dots_to_slashes 71 86 +15 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sysctl: on EIO ("sysctl net.ipv6.conf.all.stable_secret") set nonzero exitcodeDenys Vlasenko2019-02-081-0/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sysctl: avoid stat() on every item if in -w modeDenys Vlasenko2019-02-081-6/+10
| | | | | | | | | | | | | | function old new delta sysctl_act_recursive 163 167 +4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sysctl: allow setting empty valuesDenys Vlasenko2019-02-081-2/+4
| | | | | | | | | | | | | | function old new delta sysctl_act_on_setting 451 445 -6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2019-01-1016-17/+23
|\|
| * pmap: make 32-bit version work better on 64-bit kernelsDenys Vlasenko2018-12-311-1/+7
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * config: update size informationDenys Vlasenko2018-12-2815-16/+16
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | ps: add support for the args columnRon Yorston2019-01-081-4/+2
| | | | | | | | | | | | | | | | | | Implement read_cmdline() for WIN32 by storing the command line in the same way as the applet name. The applet name is actually used for the comm column which is truncated to COMM_LEN. Using this as the size of the bb_comm array avoids the need to calculate MAX_APPLET_NAME_LEN.
* | ps: add user and group columnsRon Yorston2019-01-081-5/+1
| |
* | Merge branch 'busybox' into mergeRon Yorston2018-11-281-25/+38
|\|
| * free: ensure there is a least one space between numbersDenys Vlasenko2018-11-271-3/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * free: add 'available' memory if provided by the kernelGuillermo Rodriguez2018-10-301-23/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Show estimated available memory if this is provided by the kernel. See [1] for the full story. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773 function old new delta free_main 537 633 +96 parse_cached_kb 85 - -85 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/0 up/down: 96/-85) Total: 11 bytes Signed-off-by: Guillermo Rodriguez <guille.rodriguez@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | ps: bring code marginally more into line with upstreamRon Yorston2018-11-271-3/+3
| |
* | Merge branch 'busybox' into mergeRon Yorston2018-09-103-13/+37
|\|