The plugin of munin is always timed out

Posted by haoX on Server Fault See other posts from Server Fault or by haoX
Published on 2012-09-27T16:05:17Z Indexed on 2012/09/30 21:39 UTC
Read the original article Hit count: 233

Filed under:
|
|
|

I want to use munin to make a graph of ttyACM0 in Linux, but munin can not create the graph. I found some information in "munin-node.log". it shows that "Service 'temperature' timed out". So I changed timeout to 60 or 120 in /munin/plugin-conf.d/munin-node, but it does not work. It's also timed out.

Here is part of my code:

    if [ "$1" = "config" ]; then
            echo 'graph_title Temperature of board'
            echo 'graph_args --base 1000 -l 0'
            echo 'graph_vlabel temperature(°C)'
            echo 'graph_category temperature'
            echo 'graph_scale no'
            echo 'graph_info This graph shows the temperature of board'

    for i in 1 2 3 4 5; do
                    case $i in
                            1)
                            TYPE="Under PCB"
                            ;;
                            2)
                            TYPE="HDD"
                            ;;
                            3)
                            TYPE="PHY"
                            ;;
                            4)
                            TYPE="CPU"
                            ;;
                            5)
                            TYPE="Ambience"
                            ;;
                    esac
                    name=$(clean_name $TYPE)
                    if [ "$TYPE" != "NA" ]; then
                            echo "temp_$name.label $TYPE";
                    fi
            done
            exit 0
fi

            for i in 1 2 3 4 5; do
                    case $i in
                            1)
                            TYPE="Under PCB"
                            VALUE=$(head -1 /dev/ttyACM0 | awk '{print $1}')
                            ;;
                            2)
                            TYPE="HDD"
                            VALUE=$(head -1 /dev/ttyACM0 | awk '{print $2}')
                            ;;
                            3)
                            TYPE="PHY"
                            VALUE=$(head -1 /dev/ttyACM0 | awk '{print $3}')
                            ;;
                            4)
                            TYPE="CPU"
                            VALUE=$(head -1 /dev/ttyACM0 | awk '{print $4}')
                            ;;
                            5)
                            TYPE="Ambience"
                            VALUE=$(head -1 /dev/ttyACM0 | awk '{print $5}')
                            ;;
                    esac

                    name=$(clean_name $TYPE)
                    if [ "$TYPE" != "NA" ]; then
                            echo "temp_$name.value $VALUE"
                    fi

© Server Fault or respective owner

Related posts about linux

Related posts about shell