Glam Prestige Journal

Bright entertainment trends with youth appeal.

How can i prevent reset byte count in /proc/net/dev when there is higher than 4gb of transfert? The 'bytes' counter in /proc/net/dev wraps after bytes > 2^32.

I understand that there are other methods to check network activity (like iptables), but I need this to work because of a packet called "BWBAR". Installing a 64 bit OS or restarting the machine is not an option.

Thank you

1 Answer

How can i prevent reset byte count in /proc/net/dev

You can not: the size of the variables for the counter only allow a value up to 4GB.

It is the program you use that should already be aware of this and should take care of this: it should poll twice and if the 2nd value is less than the 1st value add 4Gb to the 1st value. Subtracting the two will then show the correct result.

If it does not you should file a bug report against that software.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy