sophocha
|
2011-11-19
, 18:18
|
Posts: 559 |
Thanked: 166 times |
Joined on Jan 2010
@ Cyprus
|
#41
|
|
2011-11-20
, 10:10
|
|
Posts: 249 |
Thanked: 345 times |
Joined on Aug 2010
@ Italy
|
#42
|
|
2011-11-24
, 16:12
|
|
Posts: 249 |
Thanked: 345 times |
Joined on Aug 2010
@ Italy
|
#43
|
The Following User Says Thank You to m750 For This Useful Post: | ||
|
2012-07-16
, 21:00
|
|
Posts: 4,118 |
Thanked: 8,901 times |
Joined on Aug 2010
@ Ruhrgebiet, Germany
|
#45
|
~ $ diff /opt/savecpu/savecpu.py.ori /opt/savecpu/savecpu.py --- /opt/savecpu/savecpu.py.ori +++ /opt/savecpu/savecpu.py @@ -187,23 +187,26 @@ time.sleep(0.1) #temperatura = os.popen('cat /sys/class/power_supply/bq27200-0/temp').read() - temperatura = os.popen('cat /sys/devices/platform/omap34xx_temp/temp1_input').read() + ###temperatura = os.popen('cat /sys/devices/platform/omap34xx_temp/temp1_input').read() + temperatura = os.popen('echo $(sudo i2cget -y 2 0x55 0x06 w) | awk \'{ printf ($1*0.25-273)*100 }\'').read() # kernel v47 - #print temperatura + print temperatura #temperatura=temperatura.strip() #print temperatura #if len(temperatura) == 3 : # temperatura = int(temperatura) / 10 - temperatura = int(temperatura) + 7 + ###temperatura = int(temperatura) + 7 + temperatura = (int(temperatura) + 50) / 100 temperatura=str(temperatura) - #print temperatura + print temperatura - check = os.popen('ps -ef | grep /opt/savecpu/savecpu.sh | awk \'/start/ {print $7}\'').read() + ###check = os.popen('ps -ef | grep /opt/savecpu/savecpu.sh | awk \'/start/ {print $7}\'').read() + check = os.popen('ps -ef | grep /opt/savecpu/savecpu.sh | awk \'/start/ {print $8}\'').read() check=check.strip() #print check
~ $ diff /opt/savecpu/savecpu.sh.ori /opt/savecpu/savecpu.sh --- /opt/savecpu/savecpu.sh.ori +++ /opt/savecpu/savecpu.sh @@ -49,7 +49,7 @@ # imposta il valore, espresso in secondi, tra una verifica e l'altra #intervallo=10 -# imposta intensit� LED, sconsiglio di superare il valore 20 +# imposta intensità LED, sconsiglio di superare il valore 20 ledi=18 #imposta colore LED: $verde o $rosso o $blu @@ -79,13 +79,15 @@ while [ $start == 1 ] do - #echo "riduci �: " $riduci - #echo "led �: " $accendi_led + #echo "riduci è: " $riduci + #echo "led è: " $accendi_led #echo $minima #echo $massima #temperatura=`cat /sys/class/power_supply/bq27200-0/temp` - temperatura=`cat /sys/devices/platform/omap34xx_temp/temp1_input | awk '{ sub(/-/,""); print $1+7}'` - #echo "temp: " $temperatura + ###temperatura=`cat /sys/devices/platform/omap34xx_temp/temp1_input | awk '{ sub(/-/,""); print $1+7}'` + temperatura=`echo $(i2cget -y 2 0x55 0x06 w) | awk '{ printf ($1*0.25-273)*100 }'` + temperatura=`expr \( $temperatura + 50 \) \/ 100` + echo "temp: " $temperatura # v47 # lunghezza=${#temperatura} @@ -109,7 +111,7 @@ massima=$(/usr/sbin/kernel-config show | grep 'max.' | tr '\n' ' ' | awk '{print $3}') if [ 650 -le $massima ] then - /usr/sbin/kernel-config limits 250 600 + /usr/sbin/kernel-config limits - 600 dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:"savecpu: temp. >= "$temperatura_max" degrees centigrade - downgrade overclock" uint32:0 string:"OK" echo "RIDUCO" fi @@ -149,7 +151,7 @@ then echo "RIPRISTINO" /usr/sbin/kernel-config limits $minima $massima - #echo "riduci �: " $riduci + #echo "riduci è: " $riduci riduci=0 #echo "SPENGO LED" accendi_led=0
The Following User Says Thank You to peterleinchen For This Useful Post: | ||
|
2012-07-17
, 16:23
|
|
Posts: 249 |
Thanked: 345 times |
Joined on Aug 2010
@ Italy
|
#46
|
|
2012-07-17
, 22:05
|
|
Posts: 4,118 |
Thanked: 8,901 times |
Joined on Aug 2010
@ Ruhrgebiet, Germany
|
#47
|
|
2012-07-19
, 16:48
|
|
Posts: 249 |
Thanked: 345 times |
Joined on Aug 2010
@ Italy
|
#48
|
check = os.popen('ps -ef | grep /opt/savecpu/savecpu.sh | awk \'/start/ {print $8}\'').read()
|
2012-07-19
, 18:52
|
|
Posts: 209 |
Thanked: 156 times |
Joined on Jun 2012
|
#49
|
|
2012-07-19
, 19:56
|
|
Posts: 4,118 |
Thanked: 8,901 times |
Joined on Aug 2010
@ Ruhrgebiet, Germany
|
#50
|
The Following 2 Users Say Thank You to peterleinchen For This Useful Post: | ||