projects
/
flowspec-xdp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
81e2215
)
Reduce bash CPU time for high-core-count machines in dropcount.sh
author
Matt Corallo
<git@bluematt.me>
Sun, 10 Oct 2021 17:16:50 +0000
(17:16 +0000)
committer
Matt Corallo
<git@bluematt.me>
Sun, 10 Oct 2021 17:17:06 +0000
(17:17 +0000)
dropcount.sh
patch
|
blob
|
history
diff --git
a/dropcount.sh
b/dropcount.sh
index 541dd30529e090c6c9fbfc7ef6b1c9c09d85cb94..5f15b5e6ab087f7e6cea34a2a686934aa0d7388f 100755
(executable)
--- 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
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
done)"
echo "$MAP_CONTENTS" | {
declare -a BYTES