We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tcp
cat /proc/sys/net/core/somaxconn
cat /proc/sys/net/ipv4/tcp_max_syn_backlog
ss -lt
ss -s
netstat -s
系统收到 syn 请求,先放到 syn recv queue;收到client第二次 ack时,从 syn recv queue取出来,放入 established queue。
syn
syn recv queue
ack
established queue
查看服务器上各个socket连接数: cat /proc/net/sockstat
cat /proc/net/sockstat
查看服务器tcp各个状态连接数: ss -ant | awk 'NR>1 {++s[$1]} END {for(k in s) print k,s[k]}'
ss -ant | awk 'NR>1 {++s[$1]} END {for(k in s) print k,s[k]}'
查看服务器tcp的各个状态连接数: netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
查看tcp的本机可用端口范围:cat /proc/sys/net/ipv4/ip_local_port_range
cat /proc/sys/net/ipv4/ip_local_port_range
查看 tcp udp 已占用的端口数:netstat -an | grep -e tcp -e udp | wc -l
netstat -an | grep -e tcp -e udp | wc -l
/proc/sys/net/ipv4/tcp_timestamps - 控制timestamp选项开启/关闭
/proc/sys/net/ipv4/tcp_tw_recycle - 减少timewait socket释放的超时时间
/proc/sys/net/ipv4/tcp_abort_on_overflow 当 accept queue 满时,是否立即返回 RST 包给client
The text was updated successfully, but these errors were encountered:
参考资料:
Sorry, something went wrong.
linux上跟踪某个process的内部系统调用时间: strace -s128 -ttt -p process_id -c
strace -s128 -ttt -p process_id -c
被CentOS自带的防火墙坑了,导致node.js请求后端一直超时。原因见这篇:
CentOS
nf_conntrack: table full, dropping packet
No branches or pull requests
tcp
的 established queue 大小:cat /proc/sys/net/core/somaxconn
tcp
的 syn recv queue 大小:cat /proc/sys/net/ipv4/tcp_max_syn_backlog
ss -lt
ss -s
netstat -s
系统收到
syn
请求,先放到syn recv queue
;收到client第二次ack
时,从syn recv queue
取出来,放入established queue
。查看服务器上各个socket连接数:
cat /proc/net/sockstat
查看服务器tcp各个状态连接数:
ss -ant | awk 'NR>1 {++s[$1]} END {for(k in s) print k,s[k]}'
查看服务器tcp的各个状态连接数:
netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
查看tcp的本机可用端口范围:
cat /proc/sys/net/ipv4/ip_local_port_range
查看 tcp udp 已占用的端口数:
netstat -an | grep -e tcp -e udp | wc -l
/proc/sys/net/ipv4/tcp_timestamps - 控制timestamp选项开启/关闭
/proc/sys/net/ipv4/tcp_tw_recycle - 减少timewait socket释放的超时时间
/proc/sys/net/ipv4/tcp_abort_on_overflow 当 accept queue 满时,是否立即返回 RST 包给client
The text was updated successfully, but these errors were encountered: