Chinaunix首页 | 论坛 | 博客
  • 博客访问: 670727
  • 博文数量: 52
  • 博客积分: 7065
  • 博客等级: 少将
  • 技术积分: 2361
  • 用 户 组: 普通用户
  • 注册时间: 2004-10-03 16:24
文章分类

全部博文(52)

文章存档

2021年(8)

2019年(2)

2018年(14)

2011年(1)

2010年(3)

2009年(4)

2008年(20)

分类: 其他平台

2018-12-03 16:03:21

TCP Keepalive settings Linux

tcp_keepalive_probes - the number of probes that are sent before the client considers the connection broken and notifies the application layer
tcp_keepalive_time - the interval between the last data packet sent and the first keepalive probe
tcp_keepalive_intvl - the interval between subsequent keepalive probes
tcp_retries2 - max number of times a packet is retransmitted before giving up

Operating directory where these parameters are stored  /proc/sys/net/ipv4/
/proc/sys/net/ipv4/tcp_keepalive_time

Values are expressed in seconds. Example tcp_keepalive_time of 7200 would mean 2 hours
In order to retain your value after system restart, these need to be added to /etc/sysctl.conf

The total time before Operating system will give up on a connection is
tcp_keepalive_time + tcp_keepalive_intvl*tcp_keepalive_probes

Reference to tcp keepalive  
阅读(2595) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~