Ethernet counters?

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Thu Feb 24 17:14:50 UTC 2005


On Sat, Feb 19, 2005 at 07:44:24AM -0500, Scott Allen wrote:
> <http://www.zelow.no/floppyfw/>
> 
> All I wanted was a router; no firewall, no packet filtering. I 
> compiled a kernel using the 2.4.29 "vanilla" sources from 
> kernel.org.  I removed everything from the kernel config that I 
> didn't feel was necessary, including netfilter and all things related.
> 
> OK, so it works fine as a router, as intended, but I've noticed that 
> the "RX packets" and "TX packets" counters shown from an ifconfig 
> command are now always zero. There definitely are packets going in 
> and out of both ethernet interfaces.  The counters do work with the 
> original floppyfw kernel.
> 
> So, my question is, what handles these counters and what do I have to 
> enable in the kernel to make them work again?  I wouldn't think that 
> this is a netfilter function, but I could be wrong.

Well from a quick look, it appears that the rx_bytes and tx_bytes values
in the network device structure is managed by every single network
device driver, so really the only way the bytes aren't counted is if the
driver doesn't ever see them, or the driver is broken in it's handling
of the stats.

Remember that seeing the light flash does NOT mean the chip is passing
data to the driver, only that the network has traffic.  The chip often
filters stuff not intended for it to save the cpu from having to bother
processing the packet.

Lennart Sorensen
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list