mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
Plugin multibandwidth: unify whitespace
This commit is contained in:
parent
5fb2e02eab
commit
ecc6e30d55
1 changed files with 23 additions and 23 deletions
|
@ -77,37 +77,37 @@ max_valid_bps=${max_valid_bps:-15728640}
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
config)
|
config)
|
||||||
echo graph_title MultiBandwidth
|
echo graph_title MultiBandwidth
|
||||||
echo 'graph_vlabel bps'
|
echo 'graph_vlabel bps'
|
||||||
echo 'graph_args --base 1024 -l 0'
|
echo 'graph_args --base 1024 -l 0'
|
||||||
echo 'graph_scale yes'
|
echo 'graph_scale yes'
|
||||||
echo 'graph_category network'
|
echo 'graph_category network'
|
||||||
echo 'graph_info This graph shows the bandwidth between localhost and serveral hosts'
|
echo 'graph_info This graph shows the bandwidth between localhost and serveral hosts'
|
||||||
for host in $hosts; do
|
for host in $hosts; do
|
||||||
fieldname="host_$(clean_fieldname "$host")"
|
fieldname="host_$(clean_fieldname "$host")"
|
||||||
echo "$fieldname.label $host"
|
echo "$fieldname.label $host"
|
||||||
echo "$fieldname.draw LINE2"
|
echo "$fieldname.draw LINE2"
|
||||||
echo "$fieldname.info Bandwidth statistics for $host"
|
echo "$fieldname.info Bandwidth statistics for $host"
|
||||||
done
|
done
|
||||||
exit 0;;
|
exit 0
|
||||||
|
;;
|
||||||
autoconf)
|
autoconf)
|
||||||
if command -v bing >/dev/null 2>&1; then
|
if command -v bing 2>/dev/null; then
|
||||||
echo 'yes'
|
echo 'yes'
|
||||||
exit 0;
|
else
|
||||||
else
|
echo 'no (bing not installed)'
|
||||||
echo 'no (bing not installed)'
|
fi
|
||||||
exit 0;
|
exit 0
|
||||||
fi
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
#Calculating the bandwidth
|
# Calculating the bandwidth
|
||||||
for host in $hosts; do
|
for host in $hosts; do
|
||||||
fieldname="host_$(clean_fieldname "$host")"
|
fieldname="host_$(clean_fieldname "$host")"
|
||||||
|
|
||||||
SPEED=$(timeout 6 bing localhost "$host" -n -c 1 -e "$samples" -s "$small_packet_size" -S "$big_packet_size" 2>/dev/null \
|
SPEED=$(timeout 6 bing localhost "$host" -n -c 1 -e "$samples" -s "$small_packet_size" -S "$big_packet_size" 2>/dev/null \
|
||||||
|grep "estimated link" -A 2 \
|
| grep "estimated link" -A 2 \
|
||||||
| grep bps \
|
| grep bps \
|
||||||
| awk '{print $2}' \
|
| awk '{print $2}' \
|
||||||
| cut -d "b" -f1)
|
| cut -d "b" -f1)
|
||||||
|
|
Loading…
Reference in a new issue