1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Plugin lxc: clarify network bandwidth calculation

This commit is contained in:
Lars Kruse 2019-08-12 00:43:25 +02:00
parent 313d195f3b
commit 914d1c5f25

View file

@ -269,7 +269,8 @@ EOF
fi
bps="U"
if [ -r "/sys/class/net/$device/speed" ]; then
bps=$(($(cat "/sys/class/net/$device/speed") * 1000 * 1000))
megabit_per_second=$(cat "/sys/class/net/$device/speed")
bps=$((megabit_per_second * 1000 * 1000))
fi
cat <<EOF
$(clean_fieldname "net__${n}_down").label $n