Skip to contentSkip to conversation

SNMP OutOctets counter semantics

DISCUSSION Mattias Rönnblom 1 participant 1 message Apr 18, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

after having a look at the SNMP counters (exposed in /proc/net/snmp among other places), I have a question on the meaning of the "OutOctets" counter. I'm looking at 2.6.33.

According to include/linux/snmp.h IPSTATS_MIB_OUTPKTS is "OutRequests". The same file refers to "draft-ietf-ipv6-rfc2011-update-10.txt", which I believe is what became RFC 4293. According to both of those standard documents, "OutRequest" counts IP packets coming from upper (sub-)layers (a transport layer, ICMP etc) into the IP layer.

This corresponds well with how this counter is actually incremented in the code, as far as I can tell.

In 2.6.31, a corresponding byte counter "OutOctets" was introduced, which in the Linux kernel counted the same packets as "OutRequest", but was a byte counter.

In RFC 4293 (and its draft) there is indeed a OutOctets, but this is a byte counter for packets _leaving_ the IP layer into the link layer. This counter in the standard corresponds to the "OutTransmits" packet counter, which is not implemented in the Linux kernel.

My question is: is this simply a bug, or does the kernel draw its counter semantics from some other standard?

Best regards,
Mattias