Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: CPU Usage command< Next Oldest | Next Newest >
dialomar Offline





Group: Members
Posts: 14
Joined: April 2006
Posted: April 19 2006,00:20 QUOTE

Hi everyone,

I am looking for a command to get CPU usage in percentage. normally top command do that but not in DSL distribution.

There is CPU usage in Desktop but I don't know how to get this information. My aim is to get it from command line.

Thanks in advance.
Back to top
Profile PM 
dtf Offline





Group: Members
Posts: 196
Joined: Nov. 2005
Posted: April 19 2006,00:44 QUOTE

Not sure why you say top is not available.

top - 19:43:21 up  1:33,  1 user,  load average: 0.55, 0.19, 0.06
Tasks:  35 total,   2 running,  33 sleeping,   0 stopped,   0 zombie
Cpu(s):   0.3% user,   0.0% system,   0.0% nice,  99.7% idle
Mem:   1033392k total,   580992k used,   452400k free,    12424k buffers
Swap:   979956k total,        0k used,   979956k free,   493496k cached

 PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  Command          
 925 root      15   0 31748  14m 1540 S  0.3  1.4   0:31.57 Xvesa            
   1 root       8   0    72   72   48 S  0.0  0.0   0:04.61 init              
   2 root       9   0     0    0    0 S  0.0  0.0   0:00.02 keventd          
   3 root      18  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd_CPU0    
   4 root       9   0     0    0    0 S  0.0  0.0   0:00.00 kswapd            
   5 root       9   0     0    0    0 S  0.0  0.0   0:00.00 bdflush          
   6 root       9   0     0    0    0 S  0.0  0.0   0:00.02 kupdated          
  12 root       9   0     0    0    0 S  0.0  0.0   0:00.00 khubd            
  17 root       9   0     0    0    0 S  0.0  0.0   0:00.00 knodemgrd_0      
 338 root       9   0   756  752  644 S  0.0  0.1   0:00.00 pump              
 376 root       9   0     0    0    0 S  0.0  0.0   0:00.10 kjournald        
 862 root       9   0  1784 1780 1120 S  0.0  0.2   0:00.07 bash              
 866 root       9   0  1420 1420  980 S  0.0  0.1   0:00.08 cupsd            
 881 dsl        9   0  1776 1772 1112 S  0.0  0.2   0:00.11 bash              
 907 dsl        9   0  1092 1084  940 S  0.0  0.1   0:00.03 startx            
 924 dsl        9   0   648  644  572 S  0.0  0.1   0:00.01 xinit            
 928 dsl        9   0  2060 2056 1496 S  0.0  0.2   0:00.36 fluxbox
Back to top
Profile PM 
dialomar Offline





Group: Members
Posts: 14
Joined: April 2006
Posted: April 19 2006,11:40 QUOTE

Thanks for you reply,

top exist but it doesn't show me the load for the CPU (Total).
Here what top show me :

Mem: 44432K used, 82304K free, 0K shrd, 2084K buff, 23328K cached
Load average: 0.13, 0.14, 0.06    (State: S=sleeping R=running, W=waiting)

PID USER     STATUS   RSS  PPID %CPU %MEM COMMAND
 556 dsl      R        792   549  3.8  0.6 top
 502 root     S       8380   501  1.9  6.6 Xvesa
 535 dsl      S        884     1  0.9  0.6 torsmo
 514 dsl      S       2708     1  0.0  2.1 xtdesk
 506 dsl      S       2548   501  0.0  2.0 fluxbox
 457 root     S       1728     1  0.0  1.3 bash
 473 dsl      S       1716   457  0.0  1.3 bash
 518 dsl      S       1500   506  0.0  1.1 fluxter
 549 dsl      S       1500   547  0.0  1.1 bash
 547 dsl      S       1404     1  0.0  1.1 aterm
 519 dsl      S       1288   506  0.0  1.0 docked.lua
 488 dsl      S       1084   473  0.0  0.8 startx
 536 dsl      S       1024     1  0.0  0.8 dpid
 537 dsl      S        880   536  0.0  0.6 file.dpi
 539 dsl      S        880   537  0.0  0.6 file.dpi
 135 root     S        752     1  0.0  0.5 pump
 522 dsl      S        688   519  0.0  0.5 wmswallow
 501 dsl      S        644   488  0.0  0.5 xinit
   1 root     S         76     0  0.0  0.0 init
Back to top
Profile PM 
anaconda Offline





Group: Members
Posts: 96
Joined: Mar. 2006
Posted: April 19 2006,13:00 QUOTE

CPU total load% is shown in the upper right corner of your desktop.

I dont know how accurate it is, because sometimes it shows CPU usage 141%... eg. more than 100% which is weird..


--------------
___
anaconda
Back to top
Profile PM 
dialomar Offline





Group: Members
Posts: 14
Joined: April 2006
Posted: April 19 2006,13:35 QUOTE

Thanks,

But, there is any way to get cpu load from command line. I want to integrate it to script shell.
Back to top
Profile PM 
5 replies since April 19 2006,00:20 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: CPU Usage command

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code