View TCP connection statuses on the CentOS server

Source: Internet
Author: User
Tags centos server
Netstat-n | awk & #39;/^ tcp/{++ S [$ NF]} END {for (ainS) printa, S [a]} & #39; TIME_WAIT8947FIN_WAIT115FIN_WAIT21ESTABLISHED55SYN_R

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.