You are not logged in.

#1 2014-05-28 13:07:01

gvenkat1994
Member
Registered: 2014-04-13
Posts: 34

Data counter application

Is there any package(or script) that can keep track of how much internet data is downloaded over a period of time?

Offline

#2 2014-05-28 14:07:56

gay
Member
Registered: 2012-12-16
Posts: 93

Re: Data counter application

The most generic way would certainly be either using iptables (see here https://openvz.org/Traffic_accounting_with_iptables ) or - simply having a look at the output of ifconfig (though you can't reset the counter there).

But there are also tools designed for network monitoring that can be used for this ( https://www.archlinux.org/packages/?sor … =&flagged= )


We are exactly the people our parents always warned us about.

Offline

#3 2014-05-28 16:12:07

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Data counter application

https://wiki.archlinux.org/index.php/VnStat

$ vnstat -m

 eth0  /  monthly

       month        rx      |     tx      |    total    |   avg. rate
    ------------------------+-------------+-------------+---------------
      Jul '13     88.23 GiB |    8.11 GiB |   96.34 GiB |  301.72 kbit/s
      Aug '13    109.30 GiB |    3.51 GiB |  112.81 GiB |  353.31 kbit/s
      Sep '13     24.55 GiB |    1.56 GiB |   26.11 GiB |   84.49 kbit/s
      Oct '13     57.13 GiB |    2.23 GiB |   59.36 GiB |  185.90 kbit/s
      Nov '13     78.23 GiB |    2.82 GiB |   81.05 GiB |  262.31 kbit/s
      Dec '13    198.34 GiB |    5.43 GiB |  203.77 GiB |  638.19 kbit/s
      Jan '14    115.65 GiB |    3.40 GiB |  119.05 GiB |  372.86 kbit/s
      Feb '14    121.87 GiB |    3.66 GiB |  125.53 GiB |  435.26 kbit/s
      Mar '14    116.77 GiB |    3.59 GiB |  120.36 GiB |  376.97 kbit/s
      Apr '14    160.54 GiB |    4.66 GiB |  165.20 GiB |  534.65 kbit/s
      May '14    237.68 GiB |   17.89 GiB |  255.57 GiB |  894.01 kbit/s
    ------------------------+-------------+-------------+---------------
    estimated    265.47 GiB |   19.98 GiB |  285.45 GiB |
$ vnstat -h
 eth0                                                                     18:07 
  ^                                                           r                 
  |                                                           r                 
  |  r                                               r        r                 
  |  r                                               r        r                 
  |  r                                               r        r                 
  |  r                                               r        r                 
  |  r                                               r        r                 
  |  r                                               r        r                 
  |  r                                               r     r  r                 
  |  r  r  r  r  r                                   r     r  r     r  r        
 -+---------------------------------------------------------------------------> 
  |  19 20 21 22 23 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18    
                                                                                
 h  rx (KiB)   tx (KiB)      h  rx (KiB)   tx (KiB)      h  rx (KiB)   tx (KiB) 
19    2561996     109059    03          8          0    11    2455078      40985
20     522047      18777    04          8          0    12      27187       2428
21     307163      19524    05          7          0    13     675847      11262
22     303614      21140    06          8          0    14    2981682      76526
23     321655      29018    07          8          0    15      56720     122069
00        117        153    08          8          0    16     561239     170750
01          8          0    09          7          0    17     466943     105395
02          8          2    10      77819      20709    18       1126        204

Last edited by karol (2014-05-28 16:16:04)

Offline

Board footer

Powered by FluxBB