Viewed the number of connections and the current number of connections
Netstat-ant | grep $IP: 80 | Wc-l
netstat-ant | grep $ip: | grep EST | wc-l
View IP access times
Netstat-nat|grep ":" |awk ' {print $} ' |awk-f: ' {print $} ' | Sort| Uniq-c|sort-n
Linux command:
Netstat-n | awk '/^tcp/{++s[$NF]} end {to (a in S) print A, S[a]} '
Watch ' netstat-n | awk '/^tcp/{++s[\ $NF]} end {to (a in S) print A, S[a]} ' "
Back to the column page: http://www.bianceng.cnhttp://www.bianceng.cn/Servers/web/
Return sample results:
Last_ack 5
SYN_RECV 30
Established 1597
Fin_wait1 51
Fin_wait2 504
Time_wait 1057
Description
SYN_RECV indicates the number of requests waiting to be processed;
Established indicates normal data transfer status;
Time_wait represents the number of requests that have been processed, waiting for the timeout to end;
FIN_WAIT1 indicates that the server side actively requests the shutdown of the TCP connection;
Fin_wait2 indicates that the client is disconnected;
Last_ack shutting down a TCP connection needs to be shut down in two directions, both by sending the fin to indicate the closure of the single direction data, and when the communication parties send the last fin, the sender is in the Last_ack state at this time, When the sender receives the confirmation of the other party (the ACK of the fin is confirmed), it really shuts down the entire TCP connection;
Author: csdn blog proud Snow star Maple