Jeffrey’s Blog

netstat -an中stat含义

LISTEN:侦听来自远方的TCP端口的连接请求
SYN-SENT:再发送连接请求后等待匹配的连接请求
SYN-RECEIVED:再收到和发送一个连接请求后等待对方对连接请求的确认
ESTABLISHED:代表一个打开的连接
FIN-WAIT-1:等待远程TCP连接中断请求,或先前的连接中断请求的确认
FIN-WAIT-2:从远程TCP等待连接中断请求
CLOSE-WAIT:等待从本地用户发来的连接中断请求
CLOSING:等待远程TCP对连接中断的确认
LAST-ACK:等待原来的发向远程TCP的连接中断请求的确认
TIME-WAIT:等待足够的时间以确保远程TCP接收到连接中断请求的确认
CLOSED:没有任何连接状态

其实可以man netstat , 看其中的stat部分解释
State
       The  state of the socket. Since there are no states in raw mode and usually no states used in UDP, this column may be left
       blank. Normally this can be one of several values:
       ESTABLISHED
              The socket has an established connection.
       SYN_SENT
              The socket is actively attempting to establish a connection.
       SYN_RECV
              A connection request has been received from the network.
       FIN_WAIT1
              The socket is closed, and the connection is shutting down.
       FIN_WAIT2
              Connection is closed, and the socket is waiting for a shutdown from the remote end.
       TIME_WAIT
              The socket is waiting after close to handle packets still in the network.
       CLOSED The socket is not being used.
       CLOSE_WAIT
              The remote end has shut down, waiting for the socket to close.
       LAST_ACK
              The remote end has shut down, and the socket is closed. Waiting for acknowledgement.
       LISTEN The socket is listening for incoming connections.  Such sockets are not included in the output unless  you  specify
              the –listening (-l) or –all (-a) option.
       CLOSING
              Both sockets are shut down but we still don't have all our data sent.
       UNKNOWN
              The state of the socket is unknown.

# Last modified at: October 12th, 2006 02:22pm
给本文打分: 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

转载本站文章请注明, 转载自:  Jeffrey’s Blog [http://blog.zhangjianfeng.com]
本文链接:  http://blog.zhangjianfeng.com/article/410
@ 阅读全文 | 2006/08/23 04:33pm | Category: 系统管理 | 1,666 views   Print This Post  
收藏到网摘: Del.icio.us Google书签 Digg Live Bookmark Technorati Furl Yahoo书签 Facebook 百度搜藏 新浪ViVi 365Key网摘 天极网摘 和讯网摘 博拉网 POCO网摘 添加到饭否 QQ书签 Digbuzz我挖网

1 Comment »

  1. Thank you, I could not have sead it better my self.

    Comment by Cognitive Therapy — Monday, October 9th, 2006 @ 10:04 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

京ICP备06038449号