mirror of
https://github.com/munin-monitoring/muninlite.git
synced 2025-01-11 23:31:59 +01:00
Plugin if_: do not expose errors from ethtool
ethtool prints the error message "Cannot get device settings: No such device" for VLAN devices. This error message should not be exposed via the munin protocol.
This commit is contained in:
parent
9cca1e479a
commit
44d1c8dc3a
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ config_if() {
|
||||||
echo "up.min 0"
|
echo "up.min 0"
|
||||||
echo "up.negative down"
|
echo "up.negative down"
|
||||||
echo "up.cdef up,8,*"
|
echo "up.cdef up,8,*"
|
||||||
if [ -n "$(which ethtool)" ] && [ -x "$(which ethtool)" ] && ethtool "$INTERFACE" | grep -q Speed; then
|
if [ -n "$(which ethtool)" ] && [ -x "$(which ethtool)" ] && ethtool "$INTERFACE" 2>/dev/null | grep -q Speed; then
|
||||||
MAX=$(($(ethtool "$INTERFACE" | grep Speed | sed -e 's/[[:space:]]\{1,\}/ /g' -e 's/^ //' -e 's/M.*//' | cut -d " " -f 2) * 1000000))
|
MAX=$(($(ethtool "$INTERFACE" | grep Speed | sed -e 's/[[:space:]]\{1,\}/ /g' -e 's/^ //' -e 's/M.*//' | cut -d " " -f 2) * 1000000))
|
||||||
echo "up.max $MAX"
|
echo "up.max $MAX"
|
||||||
echo "down.max $MAX"
|
echo "down.max $MAX"
|
||||||
|
|
Loading…
Reference in a new issue