mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
Use UNIX line breaks
This commit is contained in:
parent
614b043a32
commit
b8d75e80e8
@ -1,42 +1,42 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
|
|
||||||
PATH=/bin:/usr/bin
|
PATH=/bin:/usr/bin
|
||||||
|
|
||||||
if [ "$1" = "autoconf" ]; then
|
if [ "$1" = "autoconf" ]; then
|
||||||
echo yes
|
echo yes
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DAEMONS=`sockstat | awk '{print substr($0, 1, 8)}' | sort | uniq`
|
DAEMONS=`sockstat | awk '{print substr($0, 1, 8)}' | sort | uniq`
|
||||||
|
|
||||||
if [ "$1" = "config" ]; then
|
if [ "$1" = "config" ]; then
|
||||||
echo 'graph_title Connections'
|
echo 'graph_title Connections'
|
||||||
echo 'graph_vlabel Connections'
|
echo 'graph_vlabel Connections'
|
||||||
echo 'graph_noscale true'
|
echo 'graph_noscale true'
|
||||||
echo 'graph_category network'
|
echo 'graph_category network'
|
||||||
echo 'graph_info This graph shows connections load.'
|
echo 'graph_info This graph shows connections load.'
|
||||||
|
|
||||||
for D in $DAEMONS
|
for D in $DAEMONS
|
||||||
do
|
do
|
||||||
echo "_$D.label $D"
|
echo "_$D.label $D"
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "_TOTAL.label TOTAL"
|
echo "_TOTAL.label TOTAL"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
VALUES=`sockstat | awk '{print substr($0, 1, 8)}' | sort | uniq -c`
|
VALUES=`sockstat | awk '{print substr($0, 1, 8)}' | sort | uniq -c`
|
||||||
NUM=1
|
NUM=1
|
||||||
|
|
||||||
for D in $DAEMONS
|
for D in $DAEMONS
|
||||||
do
|
do
|
||||||
echo -n "_$D.value "
|
echo -n "_$D.value "
|
||||||
VAL=`echo $VALUES | cut -d ' ' -f $NUM`
|
VAL=`echo $VALUES | cut -d ' ' -f $NUM`
|
||||||
echo $VAL
|
echo $VAL
|
||||||
NUM=$(($NUM + 2))
|
NUM=$(($NUM + 2))
|
||||||
done
|
done
|
||||||
|
|
||||||
echo -n "_TOTAL.value "
|
echo -n "_TOTAL.value "
|
||||||
sockstat | wc -l
|
sockstat | wc -l
|
||||||
|
Loading…
Reference in New Issue
Block a user