View Single Post
Posts: 80 | Thanked: 95 times | Joined on Aug 2010
#1
Hi i followed this guide to overclock my N900:and i've got my N900 doing this:
Underclock/Overclock when phone is Locked/Unlocked (by Fecn)
So i did the script:
Code:
#!/bin/sh
 
idlefreq=`awk '{if ($2 > 0) print $1}' /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state | tail -n 1`
tis1=`awk '{sum += $2} END {print sum}' /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state`
tis2=`awk '$1 == "'"$idlefreq"'" {idle = $2} {sum += $2} END {print sum-idle}' /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state`
 
echo -e "
TIME_IN_STATE ANALYSING SCRIPT
By rooted (maemo.org)
Revision 7
wiki.maemo.org/Overclocking
 
 
FREQUENCY\tUSED\t\tWHEN BUSY\n"
awk '
{if ($1 >= 1000000)                 printf ("%.0f MHz\t",$1/1000); else printf ("%.0f MHz\t\t",$1/1000)}
{if ($2 == 0)                       printf "unused";               else printf ("%.1f %\t\t",($2*100)/"'"$tis1"'")}
{if ($2 == 0 || $2/"'"$tis2"'" > 1) printf "\n";                   else printf ("%.1f %\n",($2*100)/"'"$tis2"'")}
' /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
 
echo -e "
Kernel:                  `uname -r`
kernel-power:            `dpkg -l kernel-power | awk '$2 == "kernel-power" {print $3}'`
kernel-power-settings:   `dpkg -l kernel-power-settings | awk '$2 == "kernel-power-settings" {print $3}'`
Uptime:                  `uptime | sed -e 's/.*p *//' -e 's/, l.*//' -e 's/  / /'`
Load:                    `uptime | sed 's/.*e: //'`
Boot reason:             `cat /proc/bootreason`
Temperature:             `cat /sys/class/power_supply/bq27200-0/temp` degrees C\n"
i named this script: overclock-stats
Anyways what i wanna ask you guys is this:
Can i my the script name a terminal command for maemo?
Like this:
I open x-terminal and write: overclock-stats and i get the output instead of doing:
Code:
./home/user/MyDocs/overclock-stats
Can it be made?
I see that stkeys uses this method but i don't know how to manage it!!
Can anyone help me please?
Use chmod?