Chinaunix

标题: 使用netstat -an看到很多TIME_WAIT状态 [打印本页]

作者: 三剑    时间: 2008-09-23 11:51
标题: 使用netstat -an看到很多TIME_WAIT状态
使用netstat -an看到很多TIME_WAIT状态,导致客户打无法正常访问该服务器,请问是否可以修改Linux 下的TIME_WAIT时间,谢谢!

[ 本帖最后由 三剑 于 2008-9-23 17:53 编辑 ]
作者: 无声无息    时间: 2008-09-23 14:09
什么机器?

不是TIME_WAIT和CLOSE_WAIT的state吗?

怎么有WAIT-LIST状态?

例如修改TIME_WAIT
/sbin/sysctl -w net.ipv4.vs.timeout_timewait=60
套接口将保持TIME_WAIT状态不超过60秒.

看看tcp状态机吧
作者: MYSQLER    时间: 2008-09-23 15:42
LZ跑的什么服务?感觉应该是和服务本身有关
作者: 无声无息    时间: 2008-09-23 15:51
netstat还可看到服务层面?

他的state就是下面这些:
   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鈥檛 have all our data sent.

       UNKNOWN
              The state of the socket is unknown.
作者: MYSQLER    时间: 2008-09-23 16:21
当然可以看到了。比如你看apache的连接数不也可以用netstat ??
作者: lovegqin    时间: 2008-09-23 17:12
提示: 作者被禁止或删除 内容自动屏蔽
作者: 三剑    时间: 2008-09-23 17:42
我用的是RedHat AS3 update9 运行domino 6.5.6版本,每过几天客户端就无法访问,提示not responding,使用netstat -an全部都是:

tcp        0      0 192.168.1.2:1352          207.46.120.105:443          TIME_WAIT   
tcp        0      0 192.168.1.2:1352              65.54.171.48:80             TIME_WAIT   
tcp        0      1 192.168.1.2:1352             202.144.75.78:80            FIN_WAIT1   
tcp        0      0 192.168.1.2:1352                10.16.11.248:4257           TIME_WAIT   

不知道能否修改一下所有session的TIME-WAIT的等待时间,谢谢!
作者: 三剑    时间: 2008-09-25 11:50
那位知道linux系统是否可以设置对TIME_WAIT的时间,谢谢!
作者: 无声无息    时间: 2008-09-25 12:17
标题: 回复 #8 三剑 的帖子
2楼不是说了吗?

没看?
作者: 无声无息    时间: 2008-09-25 12:18
lz真强啊

重新编辑了帖子都不说一声

人家看回复都不不知道在说什么的?




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2