]> johannes.truschnigg.info Git - sqm_lagthrottle/commitdiff
Fix iface stats check, impl. cake SQM detection
authorJohannes Truschnigg <johannes@truschnigg.info>
Thu, 17 Mar 2022 19:09:29 +0000 (20:09 +0100)
committerJohannes Truschnigg <johannes@truschnigg.info>
Thu, 17 Mar 2022 19:09:29 +0000 (20:09 +0100)
lagdetect.sh

index bca7ffabf3bc631184249b1fff47a2f1a699be7c..1e0936ef09532a7eb3cc2ede702a0167ae9c4ee0 100755 (executable)
@@ -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