Tools for logging and plotting Raspberry Pi CPU temperature, intended for use from cron.
The syslog entry has OK or ALERT according as the CPU temperature is
below or above the specified alert temperature; this makes it easier to
grep the syslog and filter logcheck output.
alert_temp: temperature to flag as mentioned abovemail_to: list of e-mail addressesmail_from: e-mail addressaveraging: string used asfreqargument ofpandas.Grouperfor smoothing (averaging) the readings before plotting (can benullto ignore)max_days_ago: ignore log entries older than this (can benullto ignore)
From: dave <[email protected]>
Newsgroups: comp.sys.raspberry-pi
Subject: Re: Is sensord supposed to work on the Pi?
Message-ID: <[email protected]>
if [ "$t1" -lt "$upper" -a "$t1" -gt "$lower" ]
then
t2=`cat /sys/devices/virtual/thermal/thermal_zone0/temp`
if [ "$t2" -lt "$upper" -a "$t2" -gt "$lower" ]
then
tmp=$(($t1+$t2))
tmp=$(($tmp/2000))
echo "t1 = $t1, t2 = $t2, temp = $tmp"
logger -i -p info -t zone0 "zone0 temp $tmp [$t1 $t2 RAW]"
fi
fi