ListenOverflows and other parameters about netstat


three-way handshake



root@b5dbe93bcb04:/opt# netstat -s | grep listen
    22438 times the listen queue of a socket overflowed

Tcp_v4_syn_recv_sock (): after the last step of the three-way handshake is completed, the Accept queue queue (full connection queue, its size is min (/proc/sys/net/core/somaxconn, backlog)) is increased by 1 when it exceeds the upper limit.


root@b5dbe93bcb04:/opt# netstat -s | grep LISTEN
    49148 SYNs to LISTEN sockets dropped

Tcp_v4_syn_recv_sock (): Any reason, including Accept queue overrun, creating a new connection, inheritance port failure, etc., plus 1. Includes ListenOverflows, that is, when ListenOverflows occurs, it will also increase by 1; In addition, when there is not enough memory to allocate socket-related data structures for new connections, 1 will be added, of course, 1 will be added in other exceptional cases.


  • Tcp_done (): if a connection is ended in SYN_SENT/SYN_RECV state, add 1

  • Tcp_check_req (): If there is RST|SYN flag in the input packet in the last phase of passive three-way handshake, add 1

1. When trying to establish a connection with a non-existent windows sockets, the connection fails, and TcpAttemptFails will add 1 at the same time

2. When the passive connection (SYN_SEND) waits for the ack response signal from the three-way handshake to time out or for other erroneous responses, the connection will fail and the value of TcpAttemptFails will be increased by 1 at the same time.


The client initiates active open through connect, tcp_connect (), and adds 1 when sending SYN.


The server must be ready to accept foreign connections. Usually the socket,bind and listen functions are called to complete. We call it passive open. Passive three-way handshake is completed, plus 1.


Tcp_set_state () adds and subtracts one according to whether ESTABLISHED is a new/old state.


Tcp_set_state (), the new state is TCP_CLOSE, if the old state is established/TCP _ close _ wait, add 1.