[root@instance-y1rzrlqu-2 ~]# netstat -n |awk '/^tcp/{++S[$NF]}END{for(a in S) print a,S[a]}'
CLOSE_WAIT 3
ESTABLISHED 91
FIN_WAIT1 1
FIN_WAIT2 48
TIME_WAIT 45
对于tcp三次握手的理解可以参考:
https://blog.csdn.net/lengxiao1993/article/details/82771768
https://www.cnblogs.com/cenglinjinran/p/8482412.html