]> johannes.truschnigg.info Git - sqm_lagthrottle/commitdiff
Implement bw increase hint
authorJohannes Truschnigg <johannes@truschnigg.info>
Sat, 12 Mar 2022 13:12:38 +0000 (14:12 +0100)
committerJohannes Truschnigg <johannes@truschnigg.info>
Sat, 12 Mar 2022 13:12:38 +0000 (14:12 +0100)
__lagdetect.awk

index f83c748d483e7ca171091c22c00e6c94e36d8383..664cdbbf7b5f5adf205f6105dcd8ce32174c1545 100644 (file)
@@ -11,6 +11,7 @@ BEGIN {
     have_baseline[pn]=0
     ping_avgs[pn]=-1
     ping_prev[pn]=-1
+    not_increasing_count[pn]=0
   }
 }
 
@@ -33,8 +34,14 @@ BEGIN {
     thresh_fudged = (FUDGE + (ping_avgs[pn] * THRESHOLD))
     if (last2avg > thresh_fudged ) {
       print "LATENCY ++ " last2avg " " thresh_fudged " prev=" ping_prev[pn] " lat=" lat " host=" pn
+      not_increasing_count[pn]=0
     } else {
       print "LATENCY == " last2avg " " thresh_fudged " prev=" ping_prev[pn] " lat=" lat " host=" pn
+      if (not_increasing_count[pn] > (5 * PINGSLOTS)) {
+        print "CONSIDER BW INCREASE"
+        not_increasing_count[pn]=0
+      }
+      not_increasing_count[pn]++
     }
   } else {
     # print "NODATA"