统计当前连接本机的每个远程主机IP的连接数,并按从大到小排序
[root@Centos7 ~]# netstat -nt | grep "tcp"|tr -s " " ":"|cut -d: -f6 |sort -nr|uniq -c
1 192.168.12.113
1 192.168.12.110
1 1.28.58.37
或
netstat -antpl|grep ESTABLISHED|awk '{print $5}'|awk -F : '{print $1}'|grep -v 127.0.0.1 |sort -n |uniq -c |sort -nr