Skip to content

Instantly share code, notes, and snippets.

@blizzz
Created January 25, 2023 17:15
Show Gist options
  • Save blizzz/21b17007f50b734bef115d73f22e19e3 to your computer and use it in GitHub Desktop.
Save blizzz/21b17007f50b734bef115d73f22e19e3 to your computer and use it in GitHub Desktop.
track nf_conntrack_count and output new high values
#!/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