Skip to content

Instantly share code, notes, and snippets.

@bveliqi
Created August 15, 2014 08:39
Show Gist options
  • Save bveliqi/f28fc1c89a25485058c8 to your computer and use it in GitHub Desktop.
Save bveliqi/f28fc1c89a25485058c8 to your computer and use it in GitHub Desktop.
List and count number of connections to other machines
lsof -i4 | grep -i ipv4 | grep -o -- '->.*' | sort | uniq -c | sort -g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment