Commit Graph

486 Commits

Author SHA1 Message Date
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
Lauri Kasanen
6578f2cf5b pstree: new applet. +1664 bytes
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>
2010-12-05 05:22:29 +01:00
Maksym Kryzhanovskyy
0ebafcc5b1 powertop: code shrink
function                                             old     new   delta
process_timer_stats                                  490     449     -41

Signed-off-by: Maksym Kryzhanovskyy <xmaks@email.cz>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-11-06 01:56:19 +01:00
Denys Vlasenko
dea28e1e55 powertop: fix last line detection in process_timer_stats()
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-04 23:30:11 +01:00
Denys Vlasenko
dcb163aa8e powertop: replace erroneous \n with \0; make numberic conversion more robust
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-04 23:22:40 +01:00
Maksym Kryzhanovskyy
6052c2b0be powertop: code shrink
function                                             old     new   delta
read_cstate_counts                                   355     360      +5
print_intel_cstates                                  494     499      +5
process_timer_stats                                  554     480     -74
process_irq_counts                                   765     530    -235
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/2 up/down: 10/-309)          Total: -299 bytes

Signed-off-by: Maksym Kryzhanovskyy <xmaks@email.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-04 08:41:57 +01:00
Denys Vlasenko
833d4e7f84 rename archival/libunarchive -> archival/libarchive; move bz/ into it
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-03 02:38:31 +01:00
Denys Vlasenko
f29a1c5656 powertop: build fix for !386 compiles
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-29 16:25:18 +02:00
Denys Vlasenko
fb132e4737 whitespace cleanup
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-29 11:46:52 +02:00
Denys Vlasenko
e4dcba1c10 *: whitespace fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 18:57:19 +02:00
Marek Polacek
3c99d59b5d top: Use _exit() instead of exit() in sighandler
Signed-off-by: Marek Polacek <mmpolacek@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-27 02:25:16 +02:00
Denys Vlasenko
4fa07bd8fa whitespace fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-27 00:04:50 +02:00
Denys Vlasenko
a43e969574 powertop: simplified C-state display code
function                                             old     new   delta
.rodata                                           145530  145514     -16
powertop_main                                       1510    1403    -107

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-26 13:03:31 +02:00