There's an easier way if the only ppp device used on your system is the 3G one.
Install and use vnstat.
It will give you a breakdown of usage per hour, day, week or month.
It can also show you the throughput.
Usage :
Code:
user@kubuntu:~$ vnstat -q
Database updated: Sun Jan 13 06:10:01 2008
ppp0
received: 381.73 MB (87.2%)
transmitted: 56.04 MB (12.8%)
total: 437.78 MB
rx | tx | total
-----------------------+------------+-----------
yesterday 83.85 MB | 13.77 MB | 97.62 MB
today 3.13 MB | 1.07 MB | 4.21 MB
-----------------------+------------+-----------
estimated 11 MB | 3 MB | 14 M
Usage per month :
Code:
user@kubuntu:~$ vnstat -q -m
ppp0
month rx | tx | total
------------------------+---------------+---------------
Dec '07 205.96 MB | 28.81 MB | 234.77 MB
Jan '08 176.13 MB | 27.35 MB | 203.49 MB
------------------------+---------------+---------------
estimated 445 MB | 68 MB | 513 MB
Usage per day :
Code:
user@kubuntu:~$ vnstat -q -d
ppp0
day rx | tx | total
------------------------+-------------+--------------
15.12. 22.65 MB | 3.20 MB | 25.85 MB
17.12. 3.37 MB | 0.90 MB | 4.28 MB
18.12. 1.50 MB | 0.11 MB | 1.62 MB
19.12. 4.34 MB | 0.54 MB | 4.88 MB
21.12. 28.24 MB | 2.63 MB | 30.88 MB
22.12. 26.76 MB | 3.96 MB | 30.72 MB
24.12. 29.51 MB | 2.82 MB | 32.33 MB
25.12. 1.37 MB | 0.11 MB | 1.48 MB
26.12. 35.97 MB | 4.35 MB | 40.32 MB
27.12. 3.82 MB | 0.61 MB | 4.44 MB
28.12. 14.20 MB | 1.92 MB | 16.12 MB
29.12. 15.84 MB | 4.43 MB | 20.28 MB
30.12. 7.81 MB | 1.21 MB | 9.02 MB
31.12. 10.52 MB | 1.95 MB | 12.48 MB
01.01. 7.64 MB | 1.56 MB | 9.20 MB
03.01. 4.08 MB | 1.27 MB | 5.36 MB
04.01. 1.09 MB | 0.28 MB | 1.37 MB
05.01. 6.22 MB | 1.69 MB | 7.92 MB
07.01. 8.67 MB | 1.26 MB | 9.94 MB
08.01. 16.28 MB | 1.62 MB | 17.90 MB
09.01. 6.27 MB | 0.60 MB | 6.87 MB
10.01. 11.64 MB | 1.07 MB | 12.72 MB
11.01. 26.84 MB | 2.98 MB | 29.83 MB
12.01. 83.85 MB | 13.77 MB | 97.62 MB
13.01. 3.48 MB | 1.18 MB | 4.67 MB
------------------------+-------------+--------------
estimated 11 MB | 3 MB | 14 MB
Then there is also a PHP frontend for it.
http://www.sqweek.com/sqweek/files/scrot1.png
http://www.sqweek.com/sqweek/files/scrot2.png
http://humdi.net/vnstat/
Bookmarks