From f89bc7c833a5a24cc8576d4f4c3f76cde9b8b57b Mon Sep 17 00:00:00 2001 From: Johannes Truschnigg Date: Sat, 12 Mar 2022 14:12:38 +0100 Subject: [PATCH] Implement bw increase hint --- __lagdetect.awk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/__lagdetect.awk b/__lagdetect.awk index f83c748..664cdbb 100644 --- a/__lagdetect.awk +++ b/__lagdetect.awk @@ -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" -- 2.39.5