1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 14:16:00 +00:00

Plugin multibandwidth: unify whitespace

This commit is contained in:
Lars Kruse 2018-07-11 20:36:49 +02:00
parent 5fb2e02eab
commit ecc6e30d55

View file

@ -89,25 +89,25 @@ case $1 in
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)'
exit 0;
fi fi
exit 0
;;
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)