其他技术文章 用netstat和awk命令来统计网络连接数 netstat -n | awk ‘/^tcp/ {++state[$NF]} END {for(key in state) print key,”\t”,state[key]}’ 会得到类似下面的结果,具体数字会有所不同: