Linux查看网络连接数

netstat -an|awk '/^tcp/{++S[$NF]}END{for (a in S)print a,S[a]}'

输出结果:

TIME_WAIT 65
ESTABLISHED 99
CLOSING 1
LISTEN 735  
原文地址:https://www.cnblogs.com/lucktomato/p/15115460.html