linux服务器查看tcp链接shell

netstat -nt |awk '{++S[$NF]} END {for (a in S ) print a,S[a]}'
原文地址:https://www.cnblogs.com/netsa/p/8086229.html