netstat -ant|awk ‘/^tcp/{++state[$NF]};END{for(key in state)print key,state[key]}‘
统计tcp链接状态
原文:https://www.cnblogs.com/lalalaxixixi/p/10809447.html