Net device byte statistics

From: Fredrik Tolf (fredrik@dolda2000.cjb.net)
Date: Thu Jul 24 2003 - 18:56:46 EST


I have set up a network statistics gathering script, which is based on the
byte statistics from /proc/net/dev, but it has always been reporting too
little.
Yesterday, I discovered that the cause was that these statistics are defined
as unsigned longs in include/linux/netdevice.h. Surely, this must be strange?
They overflow at least once a day for me.
On the other hand, I cannot imagine that noone would have thought of it. What
is the reason for this? Is there another interface that I should use instead
of /proc/net/dev to gather byte statistics for interfaces?
Shouldn't they be changed to unsigned long longs in any case?

Fredrik Tolf

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jul 31 2003 - 22:00:24 EST