Created
July 4, 2012 16:34
-
-
Save mrmanc/3048201 to your computer and use it in GitHub Desktop.
summary of outbound connections netstat
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
netstat -n -A inet | grep -v "127\.0\.0\.1" | egrep -v "\w\s*\w\s*\w\s*[0-9.]*:(80|8080)" | awk '/tcp/ {statuses[$6]++; hosts[$5]++} END{for (status in statuses) {print status,statuses[status]}; for (host in hosts) {if(hosts[host] > max_per_host_port) {max_per_host_port = hosts[host]}}; print "max_per_host",max_per_host_port}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment