Linux – ifconfig maximum value of RX/TX bytes

ifconfiglinux

I have a server with over a year uptime which shows 9 TIB outgoing traffic.
I was wondering how accurate this number really is?

It's running linux 2.6.32 kernel.

What I would also like to know that what is the upper limit for the RX and TX data and when that's reached what will happen? Will the counter start over from 0?:)

After 1000 TIB will ifconfig actually say 1 ZIB (Zetta)?

Best Answer

From the source code

(interface.h)

struct user_net_device_stats {
unsigned long long rx_packets;      /* total packets received       */
unsigned long long tx_packets;      /* total packets transmitted    */
unsigned long long rx_bytes;        /* total bytes received         */
unsigned long long tx_bytes;        /* total bytes transmitted      */
...

So the value is unsigned long long and therefore guaranteed to be at least 64bits in length as per the C99 specification.

Looking at the source again (interface.c) I can't see that it prints any suffixes so I guess it will go to the maximum value of unsigned long long and then roll over to 0.

Related Topic