How can I see Linux kernel SNMP counters?

There are many SNMP counters in the kernel that it increments in different situations, and I want to get the current values ​​on my system. I found nstat , but this does not show all counters (even with the -z option). For example, I want to see the value "XfrmInStateSeqError", which increases in net / xfrm / xfrm_input.c:

 if (async && x->repl->check(x, skb, seq)) { XFRM_INC_STATS(net, LINUX_MIB_XFRMINSTATESEQERROR); goto drop_unlock; } 

This system uses Ubuntu 12.04 under the control of the kernel 3.2.0.

+4
source share
1 answer

On my Debian, it just does not compile with the kernel:

 grep XFRM_STATISTICS /lib/modules/3.1.0-1-amd64/build/.config # CONFIG_XFRM_STATISTICS is not set 

hence no / proc / net / xfrm _stat

I think setting CONFIG_XFRM_STATISTICS and recompiling the kernel will do this ...

+4
source

All Articles