Skip to content

Instantly share code, notes, and snippets.

@kacinskas
Created December 11, 2012 14:14
Show Gist options
  • Save kacinskas/4258862 to your computer and use it in GitHub Desktop.
Save kacinskas/4258862 to your computer and use it in GitHub Desktop.
LINUX: count connections to machine
Count all: netstat -an | wc -l
Filter by port: netstat -an | grep :80 | wc -l
Group by status: netstat -ant | awk '{print $6}' | sort | uniq -c | sort -n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment