Skip to content

Instantly share code, notes, and snippets.

@liujingyu
liujingyu / abc.sh
Created May 13, 2015 02:20
TCP连接状态详解及TIME_WAIT过多的解决方法
查看当前系统下所有连接状态的数:
[root@vps ~]#netstat -n|awk '/^tcp/{++S[$NF]}END{for (key in S) print key,S[key]}'
TIME_WAIT 286
FIN_WAIT1 5
FIN_WAIT2 6
ESTABLISHED 269
SYN_RECV 5
CLOSING 1