From: Johannes Truschnigg Date: Thu, 17 Mar 2022 19:09:29 +0000 (+0100) Subject: Fix iface stats check, impl. cake SQM detection X-Git-Url: https://johannes.truschnigg.info/gitweb/?a=commitdiff_plain;h=b493cf260439d7572abba4500f2f3deda96a0067;p=sqm_lagthrottle Fix iface stats check, impl. cake SQM detection --- diff --git a/lagdetect.sh b/lagdetect.sh index bca7ffa..1e0936e 100755 --- a/lagdetect.sh +++ b/lagdetect.sh @@ -158,7 +158,7 @@ done for i in "${IFACE_RX}" "${IFACE_TX}" do - if ip link show "${i}" >/dev/null + if ! ip link show "${i}" >/dev/null then printf 'FATAL: Interface "%s" seems bogus\n' "${i}" exit 1 @@ -166,6 +166,18 @@ do done +# XXX TODO add TX once/if egress SQM mgmt is implemented +for i in "${IFACE_RX}" +do + _qd="$(tc qdisc show dev "${i}" | awk '/^qdisc/{print $2}')" + if ! [ x"${_qd}" = xcake ] + then + printf 'FATAL: Interface "%s" does not seem to have cake SQM set up\n' "${i}" + exit 1 + fi +done + + set -u