Nat忽然报错printk: xxxx messages suppressed dst cache overflow
无法ssh ping
解决办法
先重启
增大 /proc/sys/net/ipv4/route/max_size 大小
通过这个可以看到dst cache的大小
cat /proc/slabinfo |grep ip_dst_ca
附其他相关命令:
查看目前 ip_conntrack buffer 使用状况
指令: grep conn /proc/slabinfo
结果实例: ip_conntrack 3024 4090 384 409 409 1 (各值说明如下)
ip_conntrack the cache name
3024 the number of currently active objects
4090 the total number of available objects
384 the size of each object in bytes
409 the number of pages with at least one active object
409 the total number of allocated pages
1 the number of pages per slab are given
man slabinfo 可查询详细说明.
查出目前 ip_conntrack 记录最多的前五名 IP
指令: cat /proc/net/ip_conntrack | cut -d ' ' -f 10 | cut -d '=' -f 2 | sort | uniq -c | sort -nr | head -n 5
结果实例:
2816 192.168.1.100
14 163.30.85.129
6 220.132.142.175
6 127.0.0.1
4 218.187.5.223
由此可知, 192.168.1.100 占用了绝大多数的 buffer, 推断这个 IP 的 User 可能使用了 P2P 软件.