监控tcp连接情况 netstat -an|awk '/^tcp/ {++s[$NF]} END {for( a in s) {print a,s[a]}}' 转载于:https://www.cnblogs.com/lehao/p/3947219.html