[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    whatisup applet
From:       "vova doukhanine" <vova12 () gmail ! com>
Date:       2006-07-26 21:51:54
Message-ID: b221fbf60607261451w45548f60mbc308d5956312064 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,

I have a small busybox applet called "whatisup". It's a kind of high level
"procfs" based profiler (/proc/interrupts /proc/stat and /proc/cpuinfo);
it's
something between "time" and "top", plus counting interrupts and context
switches.
It can be run with and without arguments.
If you run it without arguments (type only the command name) - it waits
until Ctrl/C and
uses its own lifetime for benchmarking.
If argument added after the command name (argument will be a command to
run),
in that case it uses the command?s lifetime for benchmarking.
Please have a look at the samples and give me your opinion
if this is what can be useful for the project?
Patch to the trunk/busybox attached.

Cheers,
Vlad.

[root@localhost busybox]# ./busybox whatisup
#0 MHz=1993.721 bogomips=3991.750 Intel(R) Celeron(R) CPU 2.00GHz
Interrupts: Average pace(per sec.)
Sum: 13395 313.700
0: 10672 249.930 XT-PIC timer
11: 2568 60.141 XT-PIC yenta, uhci_hcd:usb1, uhci_hcd:usb2, uhci_hcd:usb3,
14: 126 2.951 XT-PIC ide0
15: 29 0.679 XT-PIC ide1
Context switches:
8988 210.492
Time: Ticks Sec.
user: 256 2.560 5.995%
nice: 0 0.000 0.000%
system: 15 0.150 0.351%
idle: 3994 39.940 93.536%
iowait: 0 0.000 0.000%
irq: 5 0.050 0.117%
softirq: 0 0.000 0.000%
steal: 0 0.000 0.000%
Total: 4270 42.700
Busy: 276 2.760 6.464% (Total - idle - iowait)
[root@localhost busybox]# ./busybox whatisup ls

...

#0 MHz=1993.721 bogomips=3991.750 Intel(R) Celeron(R) CPU 2.00GHz
Interrupts: Average pace(per sec.)
Sum: 38 475.000
0: 20 250.000 XT-PIC timer
7: 4 50.000 XT-PIC Intel 82801DB-ICH4, Intel 82801DB-ICH4 Modem
11: 8 100.000 XT-PIC yenta, uhci_hcd:usb1, uhci_hcd:usb2, uhci_hcd:usb3,
15: 6 75.000 XT-PIC ide1
Context switches:
172 2150.000
Time: Ticks Sec.
user: 3 0.030 37.500%
nice: 0 0.000 0.000%
system: 1 0.010 12.500%
idle: 0 0.000 0.000%
iowait: 4 0.040 50.000%
irq: 0 0.000 0.000%
softirq: 0 0.000 0.000%
steal: 0 0.000 0.000%
Total: 8 0.080
Busy: 4 0.040 50.000% (Total - idle - iowait)

[root@localhost busybox]# ./busybox whatisup sleep 10
#0 MHz=1993.721 bogomips=3991.750 Intel(R) Celeron(R) CPU 2.00GHz
Interrupts: Average pace(per sec.)
Sum: 3194 316.865
0: 2521 250.099 XT-PIC timer
11: 628 62.302 XT-PIC yenta, uhci_hcd:usb1, uhci_hcd:usb2, uhci_hcd:usb3,
14: 30 2.976 XT-PIC ide0
15: 15 1.488 XT-PIC ide1
Context switches:
2298 227.976
Time: Ticks Sec.
user: 62 0.620 6.151%
nice: 0 0.000 0.000%
system: 5 0.050 0.496%
idle: 933 9.330 92.560%
iowait: 8 0.080 0.794%
irq: 0 0.000 0.000%
softirq: 0 0.000 0.000%
steal: 0 0.000 0.000%
Total: 1008 10.080
Busy: 67 0.670 6.647% (Total - idle - iowait)
[root@localhost busybox]# ./busybox whatisup ls -la

...

total 260914
#0 MHz=1993.721 bogomips=3991.750 Intel(R) Celeron(R) CPU 2.00GHz
Interrupts: Average pace(per sec.)
Sum: 61 321.053
0: 46 242.105 XT-PIC timer
11: 15 78.947 XT-PIC yenta, uhci_hcd:usb1, uhci_hcd:usb2, uhci_hcd:usb3,
Context switches:
739 3889.474
Time: Ticks Sec.
user: 15 0.150 78.947%
nice: 0 0.000 0.000%
system: 4 0.040 21.053%
idle: 0 0.000 0.000%
iowait: 0 0.000 0.000%
irq: 0 0.000 0.000%
softirq: 0 0.000 0.000%
steal: 0 0.000 0.000%
Total: 19 0.190
Busy: 19 0.190 100.000% (Total - idle - iowait)

[Attachment #5 (text/html)]

Hi,<br><br>I have a small busybox applet called  &quot;whatisup&quot;. It's&nbsp;a \
kind&nbsp;of&nbsp;high level<br>&quot;procfs&quot; based profiler (/proc/interrupts \
/proc/stat and /proc/cpuinfo); it's    <br>something between &quot;time&quot; and \
&quot;top&quot;, plus counting interrupts and context switches. <br>It can be run \
with and without arguments.<br>If you run it without arguments (type only the command \
name) - it waits until Ctrl/C and <br>uses its own lifetime for benchmarking.<br>If \
argument added after the command name (argument will be a command to run), <br>in \
that case it uses the command?s lifetime for benchmarking.<br>Please have a look at \
the samples  and give me your opinion <br>if this is what can be useful for the \
project?<br>Patch to the trunk/busybox attached.<br> \
<br>Cheers,<br>Vlad.<br><br>[root@localhost busybox]# ./busybox whatisup<br>#0 \
MHz=1993.721 bogomips=3991.750 Intel(R) Celeron(R) CPU 2.00GHz<br>Interrupts: Average \
pace(per sec.)<br>Sum: 13395 313.700<br>0: 10672 249.930  XT-PIC timer<br>11: 2568 \
60.141 XT-PIC yenta, uhci_hcd:usb1, uhci_hcd:usb2, uhci_hcd:usb3, <br>14: 126 2.951 \
XT-PIC ide0<br>15: 29 0.679 XT-PIC ide1<br>Context switches:<br>8988 210.492<br>Time: \
Ticks Sec.<br>user: 256 2.560  5.995%<br>nice: 0 0.000 0.000%<br>system: 15 0.150 \
0.351%<br>idle: 3994 39.940 93.536%<br>iowait: 0 0.000 0.000%<br>irq: 5 0.050 \
0.117%<br>softirq: 0 0.000 0.000%<br>steal: 0 0.000 0.000%<br>Total: 4270 \
42.700<br>Busy: 276  2.760 6.464% (Total - idle - iowait)<br>[root@localhost \
busybox]# ./busybox whatisup ls<br><br>...<br><br>#0 MHz=1993.721 bogomips=3991.750 \
Intel(R) Celeron(R) CPU 2.00GHz<br>Interrupts: Average pace(per sec.)<br>Sum: 38  \
475.000<br>0: 20 250.000 XT-PIC timer<br>7: 4 50.000 XT-PIC Intel 82801DB-ICH4, Intel \
82801DB-ICH4 Modem<br>11: 8 100.000 XT-PIC yenta, uhci_hcd:usb1, uhci_hcd:usb2, \
uhci_hcd:usb3, <br>15: 6 75.000 XT-PIC ide1<br>Context switches: <br>172 \
2150.000<br>Time: Ticks Sec.<br>user: 3 0.030 37.500%<br>nice: 0 0.000 \
0.000%<br>system: 1 0.010 12.500%<br>idle: 0 0.000 0.000%<br>iowait: 4 0.040 \
50.000%<br>irq: 0 0.000 0.000%<br>softirq: 0 0.000 0.000%<br>steal: 0  0.000 \
0.000%<br>Total: 8 0.080<br>Busy: 4 0.040 50.000% (Total - idle - iowait) \
<br><br>[root@localhost busybox]# ./busybox whatisup sleep 10<br>#0 MHz=1993.721 \
bogomips=3991.750 Intel(R) Celeron(R) CPU 2.00GHz<br>Interrupts: Average pace(per \
sec.) <br>Sum: 3194 316.865<br>0: 2521 250.099 XT-PIC timer<br>11: 628 62.302 XT-PIC \
yenta, uhci_hcd:usb1, uhci_hcd:usb2, uhci_hcd:usb3, <br>14: 30 2.976 XT-PIC \
ide0<br>15: 15 1.488 XT-PIC ide1<br>Context switches:<br>2298 227.976 <br>Time: Ticks \
Sec.<br>user: 62 0.620 6.151%<br>nice: 0 0.000 0.000%<br>system: 5 0.050 \
0.496%<br>idle: 933 9.330 92.560%<br>iowait: 8 0.080 0.794%<br>irq: 0 0.000 \
0.000%<br>softirq: 0 0.000 0.000%<br>steal: 0 0.000 0.000% <br>Total: 1008 \
10.080<br>Busy: 67 0.670 6.647% (Total - idle - iowait)<br>[root@localhost busybox]# \
./busybox whatisup ls -la <br><br>...<br><br>total 260914<br>#0 MHz=1993.721 \
bogomips=3991.750 Intel(R) Celeron(R) CPU 2.00GHz <br>Interrupts: Average pace(per \
sec.)<br>Sum: 61 321.053<br>0: 46 242.105 XT-PIC timer<br>11: 15 78.947 XT-PIC yenta, \
uhci_hcd:usb1, uhci_hcd:usb2, uhci_hcd:usb3, <br>Context switches:<br>739 \
3889.474<br>Time: Ticks Sec. <br>user: 15 0.150 78.947%<br>nice: 0 0.000 \
0.000%<br>system: 4 0.040 21.053%<br>idle: 0 0.000 0.000%<br>iowait: 0 0.000 \
0.000%<br>irq: 0 0.000 0.000%<br>softirq: 0 0.000 0.000%<br>steal: 0 0.000 \
0.000%<br>Total: 19 0.190 <br>Busy: 19 0.190 100.000% (Total - idle - iowait)<br><br>


["whatisup.diff" (application/octet-stream)]

_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic