View TCP connection statuses on the CentOS Server
Netstat-n | awk '/^ tcp/{++ S [$ NF]} END {for (a in S) print a, S [a]}'
TIME_WAIT 8947
FIN_WAIT1 15
FIN_WAIT2 1
ESTABLISHED 55
SYN_RECV 21
CLOSING 2
LAST_ACK 4
TCP connection status
LISTEN: listens for connection requests from remote TCP ports
SYN-SENT: wait for a matched connection request after sending a connection request again
SYN-RECEIVED: Wait for the other party to confirm the connection request after receiving and sending a connection request
ESTABLISHED: indicates an opened connection.
FIN-WAIT-1: waiting for confirmation of the remote TCP connection interruption request or previous connection interruption request
FIN-WAIT-2: Waiting for connection interruption requests from remote TCP
CLOSE-WAIT: Waiting for connection interruption requests from Local Users
CLOSING: waiting for confirmation of remote TCP connection interruption
LAST-ACK: waiting for confirmation of the original connection interruption request sent to remote TCP
TIME-WAIT: WAIT for enough TIME to confirm that the remote TCP receives the connection interruption request.
CLOSED: No connection status