You are not logged in.
Pages: 1
Hello guys, about two weeks later I'll be in university and I was informed that the network access there provided to students has a limitation of up to 3 Gigabytes per month on traffic(is it the word? My English is not that good). If exceeded, you'll have to pay more....
Now I wonder if there's a way that can count my network traffic in time so that I can know how much I've used.
I see that the command "ifconfig" will provide me with a real-time statics, but ifconfig's counter will be reset every reboot. So how can I count up my historical traffic? Can iptraf do that?
Thanks in advance!
Last edited by karbon (2011-01-01 08:33:04)
Offline
http://www.archlinux.org/packages/?sort … =&limit=50
[karol@black ~]$ vnstat -d
eth0 / daily
day rx | tx | total | avg. rate
------------------------+-------------+-------------+---------------
07/28/10 458.86 MiB | 27.64 MiB | 486.50 MiB | 46.13 kbit/s
07/29/10 238.06 MiB | 28.72 MiB | 266.77 MiB | 25.29 kbit/s
07/30/10 2.19 GiB | 109.37 MiB | 2.29 GiB | 222.77 kbit/s
07/31/10 3.36 GiB | 135.34 MiB | 3.50 GiB | 339.39 kbit/s
08/01/10 3.15 GiB | 147.74 MiB | 3.29 GiB | 319.37 kbit/s
08/02/10 7.02 GiB | 264.51 MiB | 7.28 GiB | 706.85 kbit/s
08/03/10 786.35 MiB | 35.34 MiB | 821.69 MiB | 77.91 kbit/s
08/04/10 140.49 MiB | 15.08 MiB | 155.57 MiB | 14.75 kbit/s
08/05/10 653.74 MiB | 72.34 MiB | 726.09 MiB | 68.84 kbit/s
08/06/10 260.99 MiB | 22.96 MiB | 283.95 MiB | 26.92 kbit/s
08/07/10 3.90 GiB | 141.00 MiB | 4.04 GiB | 392.22 kbit/s
08/08/10 5.32 GiB | 160.40 MiB | 5.48 GiB | 532.18 kbit/s
08/09/10 2.16 GiB | 125.59 MiB | 2.28 GiB | 221.71 kbit/s
08/10/10 1.63 GiB | 83.56 MiB | 1.71 GiB | 165.94 kbit/s
08/11/10 5.94 GiB | 0.99 GiB | 6.93 GiB | 672.57 kbit/s
08/12/10 1.46 GiB | 50.79 MiB | 1.51 GiB | 146.96 kbit/s
08/13/10 4.88 GiB | 182.15 MiB | 5.06 GiB | 491.14 kbit/s
08/14/10 363.90 MiB | 25.23 MiB | 389.13 MiB | 36.90 kbit/s
08/15/10 1.29 GiB | 72.01 MiB | 1.36 GiB | 132.33 kbit/s
08/16/10 509.91 MiB | 28.90 MiB | 538.81 MiB | 51.09 kbit/s
08/17/10 1.99 GiB | 89.81 MiB | 2.08 GiB | 201.53 kbit/s
08/18/10 565.18 MiB | 40.43 MiB | 605.61 MiB | 57.42 kbit/s
08/19/10 1.38 GiB | 64.57 MiB | 1.45 GiB | 140.31 kbit/s
08/20/10 657.43 MiB | 31.77 MiB | 689.19 MiB | 65.35 kbit/s
08/21/10 1.38 GiB | 70.89 MiB | 1.45 GiB | 140.55 kbit/s
08/22/10 712.00 MiB | 33.83 MiB | 745.83 MiB | 70.72 kbit/s
08/23/10 96.79 MiB | 14.73 MiB | 111.52 MiB | 10.57 kbit/s
08/24/10 94.99 MiB | 8.91 MiB | 103.90 MiB | 9.85 kbit/s
08/25/10 343.72 MiB | 21.45 MiB | 365.17 MiB | 34.62 kbit/s
08/26/10 692.09 MiB | 23.34 MiB | 715.44 MiB | 478.91 kbit/s
------------------------+-------------+-------------+---------------
estimated 4.79 GiB | 163 MiB | 4.95 GiB |
[karol@black ~]$ vnstat -m
eth0 / monthly
month rx | tx | total | avg. rate
------------------------+-------------+-------------+---------------
Nov '09 9.35 GiB | 918.19 MiB | 10.25 GiB | 33.17 kbit/s
Dec '09 21.29 GiB | 2.01 GiB | 23.30 GiB | 72.96 kbit/s
Jan '10 13.12 GiB | 1.55 GiB | 14.67 GiB | 45.94 kbit/s
Feb '10 66.99 GiB | 4.72 GiB | 71.71 GiB | 248.65 kbit/s
Mar '10 31.77 GiB | 2.68 GiB | 34.45 GiB | 107.89 kbit/s
Apr '10 28.77 GiB | 2.50 GiB | 31.26 GiB | 101.18 kbit/s
May '10 2.94 GiB | 333.79 MiB | 3.27 GiB | 10.23 kbit/s
Sep '10 575.99 MiB | 65.32 MiB | 641.31 MiB | 2.03 kbit/s
May '10 6.38 GiB | 682.79 MiB | 7.05 GiB | 22.08 kbit/s
Jun '10 6.10 GiB | 347.45 MiB | 6.44 GiB | 20.83 kbit/s
Jul '10 41.02 GiB | 1.73 GiB | 42.75 GiB | 133.89 kbit/s
Aug '10 47.25 GiB | 2.77 GiB | 50.02 GiB | 193.16 kbit/s
------------------------+-------------+-------------+---------------
estimated 58.26 GiB | 3.42 GiB | 61.67 GiB |
It will not stop you from downloading, vnstat only provides a means of monitoring how much you send and download.
Offline
Thanks karol, I've installed it and now manning it....Looks like exactly what I want:-)
Offline
I have it as a daemon in rc.conf:
DAEMONS=(syslog-ng dbus hal @acpid @gpm @network @crond @alsa !netfs @atd !preload @vnstat)
Offline
Sorry for the not topic related question but what are the "@" and "!" prior the daemons for?
I am just wondering because i never seen this before...
Offline
http://wiki.archlinux.org/index.php/Beginners'_Guide#DAEMONS_Section
If a script is prefixed with an "at" symbol (@), it shall be executed in the background. It's useful for speeding up boot.
Offline
Pages: 1