mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-25 18:38:30 +00:00
Moved all Raspberry Pi plugins to a common raspberry-pi directory. Removed absolute path in raspi_temp to make the plugin work on Pidora.
This commit is contained in:
parent
5ca92103e5
commit
2d4549f32a
3 changed files with 1 additions and 1 deletions
|
@ -1,33 +0,0 @@
|
|||
#! /bin/sh
|
||||
# (c) 2013 - LGPL - Steve Schnepp <steve.schnepp@pwkf.org>
|
||||
|
||||
pluginfull="$0" # full name of plugin
|
||||
plugin="${0##*/}" # name of plugin
|
||||
pidfile="$MUNIN_PLUGSTATE/munin.$plugin.pid"
|
||||
cache="$MUNIN_PLUGSTATE/munin.$plugin.value"
|
||||
|
||||
|
||||
if [ ! -r "/sys/class/thermal/thermal_zone0/temp" ]
|
||||
then
|
||||
echo "# Cannot read CPU Temp"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
if [ "$1" = "config" ]
|
||||
then
|
||||
cat <<EOF
|
||||
graph_title CPU Temp
|
||||
graph_category system
|
||||
graph_vlabel C
|
||||
thermal_zone0.label Current CPU Temp
|
||||
EOF
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# values
|
||||
TEMP_MILLI_C=$(cat /sys/class/thermal/thermal_zone0/temp)
|
||||
|
||||
echo thermal_zone0.value $( echo "scale=3; $TEMP_MILLI_C / 1000" | bc )
|
||||
|
||||
exit 0
|
Loading…
Add table
Add a link
Reference in a new issue