查询linux服务器有哪些IP在连接

centos 7

netstat -nat|grep ":80"|awk '{print $5}' |awk -F: '{print $1}' | sort| uniq -c|sort -n

这里写图片描述

centos 6

netstat -nat|grep ":80"|awk '{print $5}' |awk -F: '{print $4}'| sort| uniq -c|sort -n

这里写图片描述

个人微信公众号:
这里写图片描述

作者:jiankunking 出处:http://blog.csdn.net/jiankunking

猜你喜欢

转载自blog.csdn.net/xunzaosiyecao/article/details/80803353