munin-monitoring / muninlite

MuninLite is a standalone shell script implementing the Munin protocol and containing a few basic plugins out of the box.
GNU General Public License v2.0
18 stars 8 forks source link

munin-node crashes when interface speed is unknown #3

Closed relet closed 4 years ago

relet commented 4 years ago

This calculation MAX=$(($(ethtool $1 | grep Speed | sed -e 's/[[:space:]]\{1,\}/ /g' -e 's/^ //' -e 's/M.*//' | cut -d\ -f2) * 1000000)) breaks if

# ethtool eth0
Settings for eth0:
... Speed: Unknown!

can be amended by amending the if clause if ethtool $1 | grep -q Speed | grep -v Unknown; then

sumpfralle commented 4 years ago

Thank you for your bug report!

I just fixed this bug based on your suggestion.