Skip to content

Instantly share code, notes, and snippets.

@jarvys
Created December 11, 2014 09:56
Show Gist options
  • Save jarvys/019810c274ae380b4259 to your computer and use it in GitHub Desktop.
Save jarvys/019810c274ae380b4259 to your computer and use it in GitHub Desktop.
get tcp connections
netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment