On Sat, 07 Feb 2015, Stephen R Guglielmo wrote: > I'm running Debian Jessie AMD64. I'm using RRDTool to create graphs of > my network activity. Do the byte counters in the `ifconfig` output > overflow? I imagine they have to at some point. What's the value at > which they overflow? Is it 2^64 bytes?
Yes, they do. SNMP-like counters 101: You *must* *always* handle counter wrap-around, and sudden counter resets. In practice, you also need a saturation filter coupled to a spurious peak supressor for when your "sudden reset" or counter warp-around detection logic fails, or system time jumps. And depending on how you get to the counters, you also need some persistence and reordering detection logic (e.g. when doing it over SNMP), but I don't think you will have to bother with this. > Also, is there a "better" way to access this information instead of > parsing the `ifconfig` output? Maybe somewhere in /proc? In Linux, you should never use ifconfig for anything... in this case, I guess you should take a look on the sources for "ethtool" command to find out how to proper interface to the kernel to get the full interface counters. But you will likely find something interesting in sysfs as well (not /proc). -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20150208131320.ga2...@khazad-dum.debian.net