Introduced
The number of concurrent connections refers to the ability of a firewall or proxy server to handle its business information flow, is the maximum number of point-to-point connections that a firewall can handle at the same time, reflecting the ability of the firewall device to access and link state tracking for multiple connections, and the size of this parameter directly affects the maximum amount of information that the firewall can support.
Implementation methods
Use the following command to group A view of the various connection states OH:
Netstat-n | awk '/^tcp/{++s[$NF]} end {for (a in S) print A, s[a]} '
Explanation:
Return result Example:
last_ack 5 (number of requests waiting to be processed)
SYN_RECV
established 1597 (normal data transfer status)
FIN_WAIT1 51
Fin_wait2 504
TIME_WAIT 1057 (processing completed, waiting for the end of the number of requests)
status: Description
CLOSED: No connection is active or in progress
LISTEN: The server is waiting to enter the call
Syn_ RECV: A connection request has arrived, waiting for confirmation
syn_sent: Application has started, open a connection
established: Normal data transfer status
fin_wait1: Application says it's done
Fin_ WAIT2: The other side has agreed
to release itmed_wait: Wait for all the groupings
to die CLOSING: Both sides try to close
time_wait: The other side has initialized a release
last_ ACK: Wait for all groups to die
Using the above command, you can view the server's connection state, where established is the number of concurrent connection states displayed. If you don't want to see so many connection states and just want to see the number of concurrent connections, you can simplify the command:
Netstat-nat|grep established|wc-l
1164
The number returned is the current number of concurrent connections.
Summarize
The above is the entire content of this article, I hope the content of this article for everyone's study or work to bring certain help, if you have questions you can message exchange.