Monday, May 27, 2013

Monitoring the RPi's temp

Following is a simple Munin plugin that will monitor the temperature on your Raspberry Pi. Assumption is that you have Munin installed on the RPi.







#!/bin/sh

case $1 in
config)
cat <<'EOM'
graph_title RPi Temperature
graph_vlabel temp
temp.label C
EOM
exit 0;;
esac

echo -n "temp.value "
/opt/vc/bin/vcgencmd measure_temp|cut -d'=' -f2|cut -d\' -f1


Save the above as a file called "pitemp". You'll also want to edit /etc/munin/plugin-conf.d/munin-node and add the following entry:







[pitemp]
user root

Above will show up in the system's "Other" category. You can alter this by adding a line to the script. See Munin's "How to Write Plugins" page for more detail.

No comments:

Post a Comment