learning-kubernetes icon indicating copy to clipboard operation
learning-kubernetes copied to clipboard

网络调试

Open imroc opened this issue 4 years ago • 0 comments

https://imroc.cc/k8s/ref/shell/debug-network/

查看监听队列 $ ss -lnt State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 129 128 *:80 : 查看网络计数器 $ netstat -az ... TcpExtListenOverflows 12178939 0.0 TcpExtListenDrops 12247395 0.0 ... netstat -s | grep -E 'drop|overflow' 查看 conntrack $ conntrack -S cpu=0 found=770 invalid=3856 ignore=42570125 insert=0 insert_failed=0 drop=0 early_drop=0 error=0 search_restart=746284 cpu=1 found=784 invalid=3647 ignore=41988392 insert=0 insert_failed=0 drop=0 early_drop=0 error=0 search_restart=718963 cpu=2 found=25588 invalid=71264 ignore=243330690 insert=0 insert_failed=0 drop=0 early_drop=0 error=0 search_restart=2319295 cpu=3 found=25706 invalid=70168 ignore=242616824 insert=0 insert_failed=0 drop=0 early_drop=0 error=18 search_restart=2320376 若有 insert_failed,表示存在 conntrack 插入失败,会导致丢包。 查看连接数 当前各种状态的 TCP 连接数:

imroc avatar May 21 '21 04:05 imroc