Reply
Thread Tools
christye's Avatar
Posts: 60 | Thanked: 9 times | Joined on Apr 2010 @ Swindon, UK
#1
Hi guys,


Has anyone managed to get the: Time in CPU state scripts working from here:
http://wiki.maemo.org/Overclocking#A...ArbitRabbit.29

I find that they just give me syntax errors.

Any help would be very welcome =]

Been tinkering around with some power saving things, one of which were dbus scripts to underclock CPU whilst phone is locked, but I like to check that things are working, so the Time in CPU state would be useful. Unless anyone can think of another way I can check this?

Thanks all,
Chris
 
SpeedEvil's Avatar
Posts: 70 | Thanked: 410 times | Joined on Sep 2009 @ Fife, Scotland.
#2
Originally Posted by christye View Post
Hi guys,
<snip>

Been tinkering around with some power saving things, one of which were dbus scripts to underclock CPU whilst phone is locked, but I like to check that things are working, so the Time in CPU state would be useful. Unless anyone can think of another way I can check this?

Thanks all,
Chris
Powertop is good for this.
http://talk.maemo.org/showthread.php?p=491333

I can't be bothered reading other peoples scripts at this time of night.

while true ;do sleep 10;cat /sys/devices/system/cpu/cpu0/cpuidle/state*/time;done|awk 'BEGIN{print "C1\tC2\tC3\tC4"}NR%4==1&&NR>8{print l[0]-o[0]"\t"l[1]-o[1]"\t"l[2]-o[2]"\t"l[3]-o[3]}{k=(NR-1)%4;o[k]=l[k];l[k]=int($0/1000)}'

is a simple script to print states every 10s.
It outputs milliseconds in each state.
It stalls for twice the update period at the beginning, for the obvious reason.
 

The Following User Says Thank You to SpeedEvil For This Useful Post:
christye's Avatar
Posts: 60 | Thanked: 9 times | Joined on Apr 2010 @ Swindon, UK
#3
Originally Posted by SpeedEvil View Post
Powertop is good for this.
http://talk.maemo.org/showthread.php?p=491333

I can't be bothered reading other peoples scripts at this time of night.

while true ;do sleep 10;cat /sys/devices/system/cpu/cpu0/cpuidle/state*/time;done|awk 'BEGIN{print "C1\tC2\tC3\tC4"}NR%4==1&&NR>8{print l[0]-o[0]"\t"l[1]-o[1]"\t"l[2]-o[2]"\t"l[3]-o[3]}{k=(NR-1)%4;o[k]=l[k];l[k]=int($0/1000)}'

is a simple script to print states every 10s.
It outputs milliseconds in each state.
It stalls for twice the update period at the beginning, for the obvious reason.

Of course powertop does this... I'm an idiot for not thinking of myself =p

Thanks for the reminder!
 
Posts: 8 | Thanked: 7 times | Joined on Jul 2010
#4
Hi this is my first post, I've recently got myself a N900 and been playing around with it since then

I thought this would be the best thread to ask this...
What are the times in cpu states do people get with their phones idle?
Idle: I mean when it is not being used, an in lying there with screen off.

Here is mine using powertop

Code:
Sample interval was 30m 30s 21057us

C#      | Ratio  | Avg/dura | Frequency | Ratio
--------+--------+----------+-----------+--------+
     C0 |  98.4% |          |   600 MHz |   2.7% |
     C1 |   0.0% |    0.2ms |   550 MHz |   0.0% |
     C2 |   0.0% |    4.6ms |   500 MHz |   0.0% |
     C3 |   0.0% |  160.5ms |   250 MHz |  97.3% |
     C4 |   1.6% | 1150.0ms |
No matter what radios I turn off and what services I stop from event.d, i always get no more that 2% in C4 and always 0% in C1-C3. I still manage 1 and half days battery with moderate use of wifi
and no 3g used ever.
 
Posts: 1,258 | Thanked: 672 times | Joined on Mar 2009
#5
xchat (30+ channels) over wifi, a periodid (5s) script running, foreca weather widget. openvpn.

C0: 3.4%
600 MHz 23.9%
550 MHz 00.0%
500 MHz 03.8%
250 MHz 72.3%
C1: 0.1% 0.4ms
C2: 3.4% 7.4ms
C3: 18.3% 124.9ms
C4: 74.8% 1020.8ms


usbhost 100% OFF
sgx 100% OFF
per 91% OFF
dss 100% OFF
cam 100% OFF
core 74% OFF
neon: 74% OFF
mpu: 74% OFF
iva2: 100% OFF
 

The Following User Says Thank You to shadowjk For This Useful Post:
Posts: 1,751 | Thanked: 844 times | Joined on Feb 2010 @ Sweden
#6
I guess my freqs are not showing cause my oc-kernel.

Code:
C#      | Ratio  | Avg/dura | Frequency | Ratio
--------+--------+----------+-----------+--------+
     C0 |   0.8% |          |  1150 MHz |   nan% |
     C1 |   0.0% |    0.2ms | 
     C2 |   0.7% |    3.8ms | 
     C3 |   7.8% |  213.2ms | 
     C4 |  90.6% | 1943.3ms |
Code:
Total wakeups   452,  15.1/s | IRQ  328,  10.9/s | Timers  124,   4.1/s
HW wakeups       78,   2.6/s |     Real gp_timers expired   84,   2.8/s

Last edited by AlMehdi; 2010-07-18 at 20:48.
 

The Following User Says Thank You to AlMehdi For This Useful Post:
Posts: 8 | Thanked: 7 times | Joined on Jul 2010
#7
thanks guys for responding...

any suggestions on how i can get better than 2 % on C4?

looking at your posts, mine definetely looks Wrong!!

please help, do you think I need to reflash? i,d still like to find out the root cause.
 
Posts: 8 | Thanked: 7 times | Joined on Jul 2010
#8
Ok i did a few more runs over SSH
And i just don't get it, whats up with C0 at 98.4% !!!

I am really curious now...


Top says 0.3% cpu

Code:
Mem: 240128K used, 5412K free, 0K shrd, 37892K buff, 57716K cached
CPU:  0.3% usr  2.3% sys  0.0% nice 97.0% idle  0.0% io  0.0% irq  0.1% softirq
Load average: 0.06 0.04 0.24
  PID  PPID USER     STAT   RSS %MEM %CPU COMMAND
 1704  1644 root     R      744  0.3  1.1 top 
 1640   673 root     S     1984  0.8  0.9 sshd: root@pts/0     
   10     2 root     SW       0  0.0  0.7 [omap2_mcspi]
 1682   980 user     S    18996  7.7  0.0 /usr/bin/modest                                                            
 1539  1217 user     S    17404  7.0  0.0 /usr/sbin/browserd -s 1539 -n RTComMessagingServer 
 1091   980 user     S    13804  5.6  0.0 /usr/bin/hildon-status-menu                                                
 1567   980 user     S    13356  5.4  0.0 /usr/bin/image-viewer                                                      
 1582  1217 user     S    11608  4.7  0.0 /usr/sbin/browserd -s 1582 -n browserui 
 1101   980 user     S    11360  4.6  0.0 /usr/bin/hildon-desktop                                                    
 1573   980 user     S    11212  4.5  0.0 /usr/bin/Calendar                                                          
 1563   980 user     S    11176  4.5  0.0 /usr/bin/browser                                                           
  829   668 root     S <  10420  4.2  0.0 /usr/bin/Xorg -logfile /tmp/Xorg.0.log -logverbose 1 -nolisten tcp -noreset -s 0 -core 
 1099   980 user     S     9676  3.9  0.0 /usr/bin/hildon-home                                                       
  668     1 root     S <   9552  3.8  0.0 /sbin/dsme -p /usr/lib/dsme/libstartup.so 
  990   668 user     S     9464  3.8  0.0 /usr/bin/systemui 
 1533   980 user     S     9308  3.7  0.0 /usr/bin/rtcom-messaging-ui                                                
 1524   980 user     S     8364  3.3  0.0 /usr/bin/osso-addressbook                                                  
 1528   980 user     S     8260  3.3  0.0 /usr/bin/rtcom-call-ui                                                     
 1094   980 user     S     7948  3.2  0.0 /usr/bin/camera-ui                                                         
 1601     1 user     S     7596  3.0  0.0 /usr/sbin/as-daemon -D 
  752     1 root     S     6904  2.8  0.0 /usr/sbin/ohmd --no-daemon 
 1174     1 user     S     6680  2.7  0.0 /usr/bin/intellisyncd -u 29999 
 1120     1 user     S     5584  2.2  0.0 /usr/lib/evolution-data-server/e-addressbook-factory 
 1134     1 user     S     5384  2.1  0.0 /usr/lib/tracker/trackerd 
 1172  1148 user     S     5340  2.1  0.0 /opt/BatteryGraph/bin/BatteryGraphd 
 1139   980 user     S     4780  1.9  0.0 /usr/bin/osso-connectivity-ui-conndlgs                                     
 1138   668 user     S     4612  1.8  0.0 /usr/bin/hildon-input-method 
 1217   668 user     S     4528  1.8  0.0 /usr/sbin/browserd -d 
  760     1 pulse    S <   4036  1.6  0.0 /usr/bin/pulseaudio --system --high-priority
Code:
C#      | Ratio  | Avg/dura | Frequency | Ratio
--------+--------+----------+-----------+--------+
     C0 |  98.4% |          |   600 MHz |   1.1% |
     C1 |   0.0% |    1.0ms |   550 MHz |   0.0% |
     C2 |   0.2% |   16.6ms |   500 MHz |   7.8% |
     C3 |   0.4% |  146.5ms |   250 MHz |  91.0% |
     C4 |   1.0% |  763.3ms |
Code:
IRQ#    | Activity   | Type           | Name
--------+------------+----------------+---------------------------
     12 |        262 |           INTC | DMA
     56 |        125 |           INTC | i2c_omap
     37 |         82 |           INTC | gp
     11 |         67 |           INTC | prcm
     57 |         23 |           INTC | i2c_omap
    202 |         15 |           GPIO | wl1251
     67 |          6 |           INTC | ssi_p1_mpu_irq0
    311 |          4 |           GPIO | ssi_p1_cawake_gpio
     71 |          2 |           INTC | ssi_gdd
Code:
Power domain activity breakdown
Domain  | % of time spent in states
--------+---------+---------+---------+---------+----------
usbhost |OFF: 100%|RET:   0%|INA:   0%| ON:   0%| now:(OFF)
    sgx |OFF: 100%|RET:   0%|INA:   0%| ON:   0%| now:(OFF)
    per |OFF:  98%|RET:   0%|INA:   0%| ON:   0%| now:(ON)
    dss |OFF: 100%|RET:   0%|INA:   0%| ON:   0%| now:(OFF)
    cam |OFF: 100%|RET:   0%|INA:   0%| ON:   0%| now:(OFF)
   core |OFF:  91%|RET:   7%|INA:   0%| ON:   0%| now:(ON)
   neon |OFF:  91%|RET:   7%|INA:   0%| ON:   0%| now:(ON)
    mpu |OFF:  91%|RET:   7%|INA:   0%| ON:   0%| now:(ON)
   iva2 |OFF: 100%|RET:   0%|INA:   0%| ON:   0%| now:(OFF)
Code:
Total wakeups   729,  24.3/s | IRQ  586,  19.5/s | Timers  143,   4.8/s
HW wakeups       67,   2.2/s |     Real gp_timers expired   82,   2.7/s
 
Posts: 1,258 | Thanked: 672 times | Joined on Mar 2009
#9
Well that seems odd. 1% C4, but 91% OFF?
 
Posts: 8 | Thanked: 7 times | Joined on Jul 2010
#10
yeah, and there is nothing there in 'top' as well, either something prevents the cpu from sleeping or my powertop binary is broken! My limited knowledge cannot give me another reason
 
Reply


 
Forum Jump


All times are GMT. The time now is 09:47.