Skip to content

Tools for logging and plotting Raspberry Pi CPU temperature

License

Notifications You must be signed in to change notification settings

adam-funk/pi-temperature

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pi-temperature

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.

Required JSON config file

  • alert_temp: temperature to flag as mentioned above
  • mail_to: list of e-mail addresses
  • mail_from: e-mail address
  • averaging: string used as freq argument of pandas.Grouper for smoothing (averaging) the readings before plotting (can be null to ignore)
  • max_days_ago: ignore log entries older than this (can be null to ignore)

Original idea

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

About

Tools for logging and plotting Raspberry Pi CPU temperature

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages