Network connections
Top connections
You can use this one-liner to get a list of the top 10 ip addresses connected to your server.
netstat -ant | grep -i establ | grep ":80" | awk -F" " '{print $5}' | cut -d':' -f 1 | sort -n | uniq -c | sort -nr | head -n10
Conections per status
Using this one you can get all your connections, grouped by connections status (established/listen/...)
netstat -ant | tr -s " " | cut -d ' ' -f 6 | sort | uniq -c | grep -vE '(Fore|estab)' | sort -nr
Written by jesus
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Networking
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#