root / plugins / other / fbdimm_temp @ 02af22a2
Historique | Voir | Annoter | Télécharger (1,01 ko)
| 1 |
#!/bin/sh |
|---|---|
| 2 |
# |
| 3 |
# Plugin to graph temperatures based on i5k_amb-isa-0000 FB-DIMM sensor |
| 4 |
# |
| 5 |
# Parameters: |
| 6 |
# |
| 7 |
# |
| 8 |
# |
| 9 |
#%# family=auto |
| 10 |
#%# capabilities=autoconf |
| 11 |
|
| 12 |
SENSORS="/usr/bin/sensors" |
| 13 |
|
| 14 |
if [ "$1" = "autoconf" ]; then |
| 15 |
# testing if the i5k FB-DIMM sensors are working. (0->working) |
| 16 |
RETVAL=`$SENSORS -A i5k_amb-isa-0000|grep -q DIMM; echo $?` |
| 17 |
if [ $RETVAL = 0 ]; then |
| 18 |
echo yes |
| 19 |
exit 0 |
| 20 |
else |
| 21 |
echo "no (i5k FB-DIMM sensors not working.)" |
| 22 |
exit 1 |
| 23 |
fi |
| 24 |
fi |
| 25 |
|
| 26 |
if [ "$1" = "config" ]; then |
| 27 |
echo 'graph_title FB-DIMM temperature' |
| 28 |
echo 'graph_args --base 1000 -l 0' |
| 29 |
echo 'graph_vlabel temp in °C' |
| 30 |
echo 'graph_category sensors' |
| 31 |
echo 'graph_info This graph shows FB-DIMM temperatures based on reports generated by intel 5000 series chipsets.' |
| 32 |
echo fbdimmtemp.info FB-DIMM temperature. |
| 33 |
$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}'
|
| 34 |
exit 0 |
| 35 |
fi |
| 36 |
|
| 37 |
$SENSORS -A i5k_amb-isa-0000|grep DIMM|tr -d ":+"|awk -F "." '{print $2}'|awk '{print "ch"$1"dimm"$3".value "$4}'
|
