2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00
contrib-munin/plugins/sensors/fbdimm_temp
2012-02-13 18:24:46 +01:00

38 lines
1.0 KiB
Bash
Executable File

#!/bin/sh
#
# Plugin to graph temperatures based on i5k_amb-isa-0000 FB-DIMM sensor
#
# Parameters:
#
#
#
#%# family=auto
#%# capabilities=autoconf
SENSORS="/usr/bin/sensors"
if [ "$1" = "autoconf" ]; then
# testing if the i5k FB-DIMM sensors are working. (0->working)
RETVAL=`$SENSORS -A i5k_amb-isa-0000|grep -q DIMM; echo $?`
if [ $RETVAL = 0 ]; then
echo yes
exit 0
else
echo "no (i5k FB-DIMM sensors not working.)"
exit 1
fi
fi
if [ "$1" = "config" ]; then
echo 'graph_title FB-DIMM temperature'
echo 'graph_args --base 1000 -l 0'
echo 'graph_vlabel temp in °C'
echo 'graph_category sensors'
echo 'graph_info This graph shows FB-DIMM temperatures based on reports generated by intel 5000 series chipsets.'
echo fbdimmtemp.info FB-DIMM temperature.
$SENSORS -A i5k_amb-isa-0000|grep DIMM|tr -d ":+"|awk -F "." '{print $2}'|awk '{print "ch"$1"dimm"$3".label Channel "$1" DIMM "$3}'
exit 0
fi
$SENSORS -A i5k_amb-isa-0000|grep DIMM|tr -d ":+"|awk -F "." '{print $2}'|awk '{print "ch"$1"dimm"$3".value "$4}'