Skip to content

Instantly share code, notes, and snippets.

@josy1024
Created February 1, 2016 10:16
Show Gist options
  • Save josy1024/94808ede8dafa68cd9db to your computer and use it in GitHub Desktop.
Save josy1024/94808ede8dafa68cd9db to your computer and use it in GitHub Desktop.
topclients snipplet command for bash.rc
# list tcpip network conncections for apache (port 80 + https 443)
alias topclients80="netstat -plan | grep :80 | awk {'print $5'} | cut -d: -f 1 | sort | uniq -c | sort -n"
alias topclients443="netstat -plan | grep :443 | awk {'print $5'} | cut -d: -f 1 | sort | uniq -c | sort -n"
# not so pretty, all ip connection...
alias topclients="netstat -plan | awk {'print $5'} | cut -d: -f 1 | sort | uniq -c | sort -n"
# change order with "sort -rn"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment