Last active
December 26, 2015 03:59
-
-
Save amuraru/7089810 to your computer and use it in GitHub Desktop.
Watch all connections from a load balancer to a pool of servers (check for connection persistence)
This file contains 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
watch -n 0.02 "ss -nn state established '( sport >= :8081 and sport <= :8088 )' src `ifconfig | grep inet | sed 's/\s\+/:/g' |cut -f4 -d':' | head -1` dst 10.15.204.0/24 | sed 's/\s\+/ /g' | cut -f 3-6 -d' ' | sort -t ':' -k3 -n" | |
watch -n 2 "ss -nn state established '( sport = :80 )' src `ifconfig | grep inet | sed 's/\s\+/:/g' |cut -f4 -d':' | head -1` | sed 's/\s\+/ /g' | cut -f 3-6 -d' ' | sort -t ':' -k3 -n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment