Net device byte statistics

From: Fredrik Tolf (
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
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
More majordomo info at
Please read the FAQ at

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