Advertisement
planzelle

Count number of connections to server via tcp

Sep 1st, 2015
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.12 KB | None | 0 0
  1. netstat -n | awk '{if ($1=="tcp"){split($5,line,":");arr[line[1]]+=1;}}END{for (x in arr) {print x "=" arr[x] }}' | sort
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement