1
0
mirror of https://github.com/cmur2/munin-pcsensor.git synced 2024-12-22 12:54:27 +01:00

added support for TEMPer2, with 2 sensors

This commit is contained in:
quamis 2016-06-07 11:12:27 +03:00
parent e70d6b59fd
commit 263206a792

View File

@ -13,19 +13,32 @@ if [ "${1}" = "config" ]; then
echo "graph_scale no" echo "graph_scale no"
echo "graph_vlabel Celsius" echo "graph_vlabel Celsius"
echo "graph_category sensors" echo "graph_category sensors"
echo "graph_info This graph shows the temperature reported by the first attached TEMPer USB Thermometer" echo "graph_info This graph shows the temperature reported by the first attached TEMPer2 USB Thermometer"
echo "temp.label temperatue" echo "temp1.label temperature1"
echo "temp.type GAUGE" echo "temp1.type GAUGE"
echo "temp2.label temperature2"
echo "temp2.type GAUGE"
else else
TEMP=`${PCSENSOR} -cm` TEMP1=`${PCSENSOR} -cm | head -n 1 | tail -n 1`
if [[ $? != 0 ]]; then if [[ $? != 0 ]]; then
sleep 2 sleep 2
TEMP=`${PCSENSOR} -cm` TEMP1=`${PCSENSOR} -cm | head -n 1 | tail -n 1`
if [[ $? != 0 ]]; then if [[ $? != 0 ]]; then
sleep 6 sleep 6
TEMP=`${PCSENSOR} -cm` TEMP1=`${PCSENSOR} -cm | head -n 1 | tail -n 1`
fi fi
fi fi
echo "temp.value $TEMP" echo "temp1.value $TEMP1"
TEMP2=`${PCSENSOR} -cm | head -n 2 | tail -n 1`
if [[ $? != 0 ]]; then
sleep 2
TEMP2=`${PCSENSOR} -cm | head -n 2 | tail -n 1`
if [[ $? != 0 ]]; then
sleep 6
TEMP2=`${PCSENSOR} -cm | head -n 2 | tail -n 1`
fi
fi
echo "temp2.value $TEMP2"
fi fi