1#!/vendor/bin/sh
2
3if [ $# -eq 1 ]; then
4  interval=$1
5else
6  exit 1
7fi
8
9while true
10do
11  logline="tz:"
12  for f in /sys/class/thermal/thermal*
13  do
14    temp=`cat $f/temp`
15    logline+="|$temp"
16  done
17  logline+=" cdev:"
18  for f in /sys/class/thermal/cooling_device*
19  do
20    cur_state=`cat $f/cur_state`
21    logline+="|$cur_state"
22  done
23  log -p w -t THERMAL_LOG $logline
24  sleep $interval
25done
26