This post was updated 779 days ago and some of the ideas may be out of date.

查看所有IP连接数

netstat -a|grep "ESTABLISHED"|awk -F "[ :]+" '{print $6}'|sort|uniq -c|sort -rn -k1

查看某个端口的IP连接数

netstat -an|grep -i ":80"|grep "ESTABLISHED"|awk -F "[ :]+" '{print $6}'|sort|uniq -c|sort -rn -k1