From dc5a8c8f1d9227f4741a57dee92e326302ec062d Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 10 Oct 2021 17:16:50 +0000 Subject: [PATCH] Reduce bash CPU time for high-core-count machines in dropcount.sh --- dropcount.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dropcount.sh b/dropcount.sh index 541dd30..5f15b5e 100755 --- a/dropcount.sh +++ b/dropcount.sh @@ -17,7 +17,7 @@ fi CNT=0 } MAP_CONTENTS="$(bpftool map show | grep drop_cnt_map | awk '{ print $1 }' | tr -d ':' | while read IF; do - bpftool map dump id "$IF" + bpftool map dump id "$IF" | grep "bytes\|packets\|key" | grep -v '\(bytes\|packets\)": 0\(,\)*$' done)" echo "$MAP_CONTENTS" | { declare -a BYTES -- 2.39.5