查看连接数 netstat -n| awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}' 转载于:https://my.oschina.net/zx204721/blog/1509972