Skip to content

Instantly share code, notes, and snippets.

@xiocode
Created November 12, 2013 07:45
Show Gist options
  • Save xiocode/7427113 to your computer and use it in GitHub Desktop.
Save xiocode/7427113 to your computer and use it in GitHub Desktop.
有用的网站
http://huoding.com/2012/01/19/142 关于timewait的解决方案
@xiocode
Copy link
Author

xiocode commented Dec 30, 2013

netstat -an | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'

@xiocode
Copy link
Author

xiocode commented Dec 30, 2013

vi /etc/sysctl.conf
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_max_tw_buckets = 10000

/sbin/sysctl -p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment