Commit Graph

498 Commits

Author SHA1 Message Date
Denys Vlasenko
dac8e79a19 Move several applets to different install dir:
Moved to [/usr]/sbin:
addgroup, adduser, delgroup, deluser,
arping, chat, ether-wake, fdformat, ifplugd,
ip, ipaddr, iplink, iproute, iprule, iptunnel,
killall5, readahead, rtcwake, tftpd, add-shell, remove-shell, powertop.

Moved to /bin for /usr/bin: kbd_mode.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-20 20:24:57 +02:00
Michael Tokarev
ac42e3de90 ps: use separate get_uptime() and make it work on non-linux too
Create get_uptime() function in procps/ps.c, and use it rather than
relying on linux-specific sysinfo() inline.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-13 02:52:28 +02:00
Denys Vlasenko
14850308e9 killall5: don't do STOP/CONT dance if the signal we send is SIGSTOP or SIGCONT
function                                             old     new   delta
kill_main                                            913     942     +29

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-03 08:16:05 +02:00
Sven Oliver Moll
1c12b67705 lsof: new applet
text    data     bss     dec     hex filename
    221       0       0     221      dd lsof.o

Signed-off-by: Sven Oliver Moll <busybox@svol.li>
Signed-off-by: souf <souf_oued@yahoo.fr>
Signed-off-by: Tito Ragusa <farmatito@tiscali.it>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-01 16:23:23 +02:00
Denys Vlasenko
0687a5b496 libbb: make xchroot do a chdir("/") after chroot
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-08 00:28:24 +01:00
Alexey Fomenko
6a93212b54 kill: fix segfault in arguments parsing
Signed-off-by: Alexey Fomenko <ext-alexey.fomenko@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-22 11:38:57 +01:00
Denys Vlasenko
3b1603410a nmeter: fix block i/o count on newer Linux kernels
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-01 23:34:46 +01:00
Cristian Ionescu-Idbohrn
85b1f292c9 ps: fix for !FEATURE_PS_LONG build
Signed-off-by: Cristian Ionescu-Idbohrn <cii@axis.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-29 11:02:00 +02:00
Flemming Madsen
b64bd16459 ps: with -l, show STIME too
Signed-off-by: Flemming Madsen <busybox@themadsens.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-27 15:31:25 +02:00
Denys Vlasenko
8d9ac30572 ps: add support for -l for !DESKTOP
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-26 02:56:08 +02:00
Denys Vlasenko
d184a728cf rename archive.h to bb_archive.h. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-22 12:45:14 +02:00
Denys Vlasenko
16714245f9 add INIT_G()'s. No code changes.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-21 01:59:15 +02:00
Denys Vlasenko
5845a06c9e uptime: more compatible output
was: 12:59:35 up  1:57, 4 users,  load average: 0.11, 0.20, 0.53
is:  12:59:37 up  1:57,  4 users,  load average: 0.11, 0.20, 0.53

While at it, switched code to unsigned division.

Based on patch by Pere Orga <gotrunks@gmail.com>.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-10 13:00:04 +02:00
Pere Orga
d91b13806f uptime: add config flag to allow displaying the number of users currently logged on
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-09 04:09:17 +02:00
Denys Vlasenko
67905e2d7c *: work around sysinfo.h versus linux/*.h problems
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-07-26 13:42:12 +02:00
Denys Vlasenko
12ac6287ee procps: remove PSSCAN_STAT define, users were using it incorrectly
Also contains small cleanups ps.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-18 15:49:47 +02:00
Wade Berrier
000ae5cefe pkill/pgrep: support extended regular expressions
Done by enabling the REG_EXTENDED and REG_NOSUB regex flags,
which also increases compatibility with the procps versions.

Signed-off-by: Wade Berrier <wade_berrier@appsig.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-10 06:01:30 +02:00
Denys Vlasenko
d7efa06b83 fix breakage caused by 'remove "Options:" string from help texts' commit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-05 15:07:31 +02:00
Denys Vlasenko
66426760be *: remove "Options:" string from help texts
function                                             old     new   delta
packed_usage                                       28706   28623     -83

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-05 03:58:28 +02:00
Maksym Kryzhanovskyy
9f7780250c iostat: code shrink
function                                             old     new   delta
iostat_main                                         2048    2400    +352
is_partition                                          48       -     -48
print_stats_dev_struct                               350       -    -350

Signed-off-by: Maksym Kryzhanovskyy <xmaks@email.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-05 03:37:14 +02:00
Denys Vlasenko
217a7f4bf9 fuser: fix inverted access() check. Closes 3799.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-29 02:03:38 +02:00
Denys Vlasenko
abb0952e63 nmeter: trim help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-26 09:00:23 +02:00
Maksym Kryzhanovskyy
eeed2306fc fuser: code shrink
function                                             old     new   delta
scan_proc_net_or_maps                                  -     427    +427
scan_recursive                                         -     380    +380
search_dev_inode                                      74      71      -3
add_pid                                               39       -     -39
scan_link                                             46       -     -46
scan_dir_links                                        76       -     -76
scan_pid_maps                                        222       -    -222
fuser_main                                           871     297    -574
------------------------------------------------------------------------------
(add/remove: 2/4 grow/shrink: 0/2 up/down: 807/-960)         Total: -153 bytes

Signed-off-by: Maksym Kryzhanovskyy <xmaks@email.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-23 03:39:48 +02:00
Denys Vlasenko
24b71fd894 top: display sort indicator in memory display
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-18 12:11:19 +02:00
Denys Vlasenko
eafc558f94 top: better indicator of selected field in mem view
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-14 01:32:09 +02:00
Denys Vlasenko
60a9414cad fix "variable 'foo' set but not used" warnings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-13 20:57:01 +02:00
Maksym Kryzhanovskyy
29c54aa9f9 iostat: code shrink ~0.5k
Signed-off-by: Maksym Kryzhanovskyy <xmaks@email.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-07 04:37:22 +02:00
Denys Vlasenko
c3f8db99bf preparatory patch
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-07 04:36:46 +02:00
Denys Vlasenko
4d6059eedc top: another scripting improvement
function                                             old     new   delta
handle_input                                         492     493      +1

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-06 20:47:54 +02:00
Denys Vlasenko
7d9a1d25e5 top: make it possible to feed commands via pipe
function                                             old     new   delta
handle_input                                           -     492    +492
mult_lvl_cmp                                          38      49     +11
packed_usage                                       28247   28257     +10
top_main                                            1345     928    -417
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/1 up/down: 513/-417)           Total: 96 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-06 20:34:04 +02:00
Marek Polacek
2a6d5988b4 mpstat.c: remove unused line
Signed-off-by: Marek Polacek <mpolacek@redhat.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-30 22:09:01 +02:00
Pere Orga
5bc8c005a8 move remaining help text from include/usage.src.h
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-11 03:29:49 +02:00
Denys Vlasenko
a9e5c43b8b pstree: fix "warning: 'handle_thread' defined but not used"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-27 16:15:02 +02:00
Pere Orga
cf8b55c40b pwdx: new applet
function                                             old     new   delta
pwdx_main                                              -     197    +197
packed_usage                                       28237   28261     +24
applet_names                                        2391    2396      +5
applet_main                                         1392    1396      +4
applet_nameofs                                       696     698      +2
applet_install_loc                                   174     175      +1
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 5/0 up/down: 233/0)             Total: 233 bytes

Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-12 18:13:15 +01:00
Pere Orga
9283d7c5c2 kill: fix infinite loop when passed PIDs are not valid numbers
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-07 17:00:25 +01:00
Denys Vlasenko
e3b1a1fd28 Replace "depends on PLATFORM_LINUX" with "select PLATFORM_LINUX"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-26 22:24:08 +01:00
Denys Vlasenko
b12553faa8 ash: fix ash-signals/signal8 testcase failure
function                                             old     new   delta
killcmd                                              109     224    +115
kill_main                                            882     910     +28
changepath                                           194     195      +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 144/0)             Total: 144 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-21 03:22:20 +01:00
Denys Vlasenko
b7c9fb27cb whitespace fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-03 00:05:48 +01:00
Denys Vlasenko
099e528919 ps: implement -o stat
function                                             old     new   delta
func_stat                                              -      24     +24
out_spec                                             300     320     +20

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-02 00:59:35 +01:00
Denys Vlasenko
9aa599dc9d top: replace %MEM with %VSZ in header text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-25 12:48:47 +01:00
Denys Vlasenko
444ff284c4 top: document a debugging script
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-25 01:57:31 +01:00
Denys Vlasenko
b9f2d9f7d9 mass removal of underscores from _BB_DIR_foo and _BB_SUID_foo
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-18 13:58:01 +01:00
Denys Vlasenko
e8d0a1450a remove a few aliasing warnings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-16 11:21:15 +01:00
Denys Vlasenko
068444629f top: add keyboard commands to --help
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-01-13 16:07:51 +01:00
Denys Vlasenko
a6041860f8 nmeter: deprecate %NNNd specified, use -d MSEC instead
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-12-13 15:17:22 +01:00
Lauri Kasanen
da6fb7e331 procps/Config.src: Add pstree to FEATURE_THREADS deps. Slight text edit
Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-12-13 14:45:08 +01:00
Denys Vlasenko
86aa803047 pstree: use stdin for screen size detection
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-12-06 12:54:24 +01:00
Denys Vlasenko
2161bd701a pstree: another tiny shrink
function                                             old     new   delta
pstree_main                                          327     324      -3

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-05 19:36:58 +01:00
Denys Vlasenko
c32e626988 pstree: tiny shrink
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-05 16:05:03 +01:00
Lauri Kasanen
e48e6f85bf pstree: fix width logic. +30 bytes
Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-05 15:55:06 +01:00