When, out of curiosity, i wanted to check how much traffic was generated by my Pi i found some very small numbers.
I stumbled upon this a while ago but finaly found the time to investigate and it seems that the RX/TX-Bytes of the eth0 Interface are getting resetted when reaching the 4GiB mark.
I wrote a little script that runs every 60s and saves the output of 'ifconfig eth0 | grep -i "bytes"'.
Code: Select all
#!/bin/bash
datafile=iftest-data.$(date +"%Y-%m-%d.%T").txt
touch ./$datafile
while [ 1 -gt 0 ]; do
datetime=$(date +"%Y-%m-%d.%T")
traffic=`ifconfig eth0 | grep -i "bytes"`
echo $datetime $traffic
echo $datetime $traffic >> ./$datafile
sleep 60
doneCode: Select all
(....)
2012-12-30.11:54:42 RX bytes:2242101595 (2.0 GiB) TX bytes:4281750626 (3.9 GiB)
2012-12-30.11:55:42 RX bytes:2244385696 (2.0 GiB) TX bytes:44203959 (42.1 MiB)
(....)
2012-12-30.12:48:57 RX bytes:4294515432 (3.9 GiB) TX bytes:3412439252 (3.1 GiB)
2012-12-30.12:49:57 RX bytes:1874946 (1.7 MiB) TX bytes:3481206666 (3.2 GiB)
(....)This is from a Rev1 Pi with 256MB RAM running Raspbian and was last updated on Dec.26th (4days ago).
Now.. is ifconfig working as intended, is it a feature or a bug?
Give me a howler if you should need any more information to solve this 'mystery'.
Greetings,
whirpool
