1. 服务器网络重大故障 : 处于 LAST_ACK 状态的socket太多了,且都是连接到同一个端口,导致服务无法使用。
最后经过几个小时的折腾,服务稳定下来了。
netstat -na |awk '{print $6}'| sort |uniq -c |sort -nr
4635 ESTABLISHED
3043 LAST_ACK
1001 TIME_WAIT
428 FIN_WAIT2
183 FIN_WAIT1
60 SYN_RECV
50 CONNECTED
23 CLOSING
15 LISTEN
8 STREAM
2. history|tac |head -100|sed 's/ /@/'|awk -F@ '{print $2}'
3. history|tac |sed 's/ /@/'|awk -F@ '{print $2}'|sort|uniq -c|sort -n -k1 -r|grep -v kill
9 netstat -na |awk '{print $6}'| sort |uniq -c |sort -nr
6 redis-server /etc/redis/redis-18520.conf
4 vi /etc/redis/redis-18520.conf
3 netstat -ano|wc -l
3 cat /etc/sysctl.conf
2 telnet 172.17.0.1 6379
2 sysctl -w net.ipv4.tcp_retries2=5
2 redisc -h 172.17.0.2 info
2 netstat -an | awk '/^tcp/ {++s[$NF]} END {for(a in s) print a,s[a]}'
2 echo "net.ipv4.tcp_synack_retries = 1" >>/etc/sysctl.conf
1 watch -n 1 "df -i;df"
1 watch -d -n 1 netstat -ntlp
1 watch -d -n 1 'df; ls -Alt -F /root/.ssh/'
1 vi /etc/sysctl.conf
1 telnet 172.17.0.1 3306
1 /sbin/sysctl -p
1 nohup redis-server /etc/redis/redis_18520.conf &
1 nginx -t -c /etc/nginx/sites-available/default
1 ll /etc/ntp.conf
1 ll /etc/nginx/startssl_trust_chain.crt
1 echo "net.ipv4.tcp_tw_reuse = 1" >>/etc/sysctl.conf
1 echo "net.ipv4.tcp_tw_recycle = 1" >>/etc/sysctl.conf
1 echo "net.ipv4.tcp_max_syn_backlog = 4096" >>/etc/sysctl.conf
1 echo "25" >/proc/sys/net/ipv4/tcp_keepalive_intvl
1 echo "15" >/proc/sys/net/ipv4/tcp_keepalive_intvl
1 cat >> /etc/sysctl.conf