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

Update multibandwidth

Correction of a bug with spaces when there was an output of more than 2 digits
This commit is contained in:
Jose Manuel Febrer Cortés 2017-03-14 11:07:50 +01:00 committed by GitHub
parent aa3cd8311c
commit d638d14a41

View file

@ -91,7 +91,7 @@ for host in $hosts; do
#bing output example: host: 4.592Mbps 0.223ms 0.217773us/bit
bing localhost "$host" -n -c 1 -e "$samples" -s "$small_packet_size" -S "$big_packet_size" 2>/dev/null \
| grep -E "bit$" \
| cut -d " " -f3 \
| awk -F" +" '{ print $2}' | cut -c -5 \
| cut -c -5 \
| awk '{a+=$1} END{print a/NR}'
done