linux 查看tcp数量

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

原文地址:https://www.cnblogs.com/z45281625/p/9560963.html