Munin raspbery temp
Jump to navigation
Jump to search
Į /etc/sudoers po root deklaruotos eilutės, įdedame šią:
nobody ALL=(ALL) NOPASSWD: /opt/vc/bin/vcgencmd
Sudedame scriptą į /etc/munin/plugins/temp
#!/bin/sh
case $1 in
config)
cat <<'EOM'
graph_title Temperature
graph_vlabel temp in C
graph_args --base 1000 -l 0
graph_category Temperature
temp.label Temperature
temp.warning 60
temp.critical 85
EOM
exit 0;;
esac
temp=`sudo /opt/vc/bin/vcgencmd measure_temp | cut -d"=" -f 2 | cut -d"'" -f 1`
echo "temp.value "$temp""
Patikriname ar veikia:
munin-run temp