Bytes counter of ifconfig in 7.2 resets?
Arjan van de Ven
arjanv at redhat.com
Mon Apr 29 07:40:00 CDT 2002
Philip Rowlands wrote:
> On Mon, 29 Apr 2002, Hubbard, David wrote:
> > is it normal for the TX/RX bytes
> >counters in the output of ifconfig to reset?
> >I'm running 2.4.9-31 on a brand new system
> >and noticed that both counters will reset
> >to zero at some point just above 4077 Mb.
> >The packet counters don't reset, just the
> >actual bytes counters.
> It looks like they're overflowing, not resetting. I'm guessing the
> values are stored as unsigned 32-bit integers, in which case the maximum
> value which can be stored is 4,294,967,295 (2^32 - 1). This is close to
> the 4077 megabyte figure you gave (4,077,000,000 if you meant mega-,
> 4,275,044,352 if you meant mebi-, which is what ifconfig reports in).
> If this is true, there's not much you can do about it. I'd suggest using
> a newer kernel, but you're using a fairly recent one. I'd suggest filing
> a bug report to Redhat or the linux-kernel list, but I'm willing to bet
> it's already known.
64 bit counters are expensive. It's not worth it doing 64 bit counters
in the networking hotpath; the userspace accounting programs already
how to deal with this overflow anyway....
More information about the Linux-PowerEdge