You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
394 B
26 lines
394 B
1 year ago
|
#!/vendor/bin/sh
|
||
|
|
||
|
if [ $# -eq 1 ]; then
|
||
|
interval=$1
|
||
|
else
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
while true
|
||
|
do
|
||
|
logline="tz:"
|
||
|
for f in /sys/class/thermal/thermal*
|
||
|
do
|
||
|
temp=`cat $f/temp`
|
||
|
logline+="|$temp"
|
||
|
done
|
||
|
logline+=" cdev:"
|
||
|
for f in /sys/class/thermal/cooling_device*
|
||
|
do
|
||
|
cur_state=`cat $f/cur_state`
|
||
|
logline+="|$cur_state"
|
||
|
done
|
||
|
log -p w -t THERMAL_LOG $logline
|
||
|
sleep $interval
|
||
|
done
|