Created
January 25, 2023 17:15
-
-
Save blizzz/21b17007f50b734bef115d73f22e19e3 to your computer and use it in GitHub Desktop.
track nf_conntrack_count and output new high values
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
CTT_HIGH=0 | |
while : | |
do | |
CTT=$(cat /proc/sys/net/netfilter/nf_conntrack_count) | |
if (( ${CTT} > ${CTT_HIGH} )); then | |
echo $CTT | |
CTT_HIGH=${CTT} | |
fi | |
sleep 3 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment