Skip to content

Instantly share code, notes, and snippets.

@kminiatures
Last active September 10, 2018 11:51
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save kminiatures/4f314baeb9cf6e0977ea to your computer and use it in GitHub Desktop.
munin temperature plugin. for Raspberry Pi and DS18B20
#!/bin/sh
case $1 in
config)
cat <<'EOM'
graph_title Temperature
graph_vlabel Temperature
temperature.label temperature
EOM
exit 0;;
esac
printf "temperature.value "
TEMP=`cat /sys/bus/w1/devices/*/w1_slave | grep t= | awk '{print $10}' | sed s/t=//`
echo "scale=2; $TEMP / 1000" | bc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment