Stephen R Guglielmo wrote:
> I'm running Debian Jessie AMD64. I'm using RRDTool to create graphs of
> my network activity.
Fun!
> Do the byte counters in the `ifconfig` output overflow?
Yes. Eventually.
> I imagine they have to at some point. What's the value at which they
> overflow? Is it 2^64 bytes?
I imagine it depends upon whether you have a 32-bit or 64-bit system.
> Also, is there a "better" way to access this information instead of
> parsing the `ifconfig` output? Maybe somewhere in /proc?
Most programs that monitor bandwidth parse /proc/net/dev directly for
those counters.
$ cat /proc/net/dev
Inter-| Receive | Transmit
face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
lo: 4091 49 0 0 0 0 0 0 4091 49 0 0 0 0 0 0
eth2: 4052835736 5139828 0 0 0 0 0 0 1869580385 4166842 0 0 0 0 0 0
eth1: 3123249892 22681508 0 0 0 0 0 0 33892075524 32382195 0 0 0 0 0 0
wlan0: 0 0 0 0 0 0 0 0 576 6 0 0 0 0 0 0
eth0: 33656882297 37671184 576080 0 0 0 0 0 3163248578 21804028 0 0 0 1952712 0 0
tun0: 3614860243 4491723 0 0 0 0 0 0 783124936 3435305 0 0 0 0 0 0
mon.wlan0: 10501916673 54844796 0 0 0 0 0 0 0 0 0 0 0 0 0 0
For documentation on this see the proc(5) man page.
man proc
And also:
https://www.kernel.org/doc/Documentation/filesystems/proc.txt
Bob
Attachment:
signature.asc
Description: Digital signature