[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cumulative internet data transfer {up AND down}

On 11/17/2017 11:05 AM, Richard Owlett wrote:
On 11/17/2017 09:15 AM, tomas@tuxteam.de wrote:
Hash: SHA1

On Fri, Nov 17, 2017 at 09:00:05AM -0600, Michael Milliman wrote:
AIR, iptables will do that. It has been a long time since I have looked at
iptables, but I seem to remember that it will keep those kinds of
statistics and it will do it on a per-interface level, all you have to do
is set it up to monitor the interface connected to the internet.

73s de WB5VQX

On Nov 17, 2017 08:52, "Richard Owlett" <rowlett@cloud85.net> wrote:

I'm interested in investigating cumulative data to/from the internet for
selected interval ranging from an hour to a week.

Does something like this work for you?

I don't know.
Using <https://manpages.debian.org/stretch/iproute2/ip.8.en.html> I was not able to parse the given example.
The output shown for the example hints at "Yes".
I'll have to investigate the references under "See Also".

A reference WITHOUT a link referred to "IP Command reference ip-cref.ps".
A search lead to <http://linux-ip.net/gl/ip-cref/> which EXPLICITLY stated "It is not a tutorial or user's guide."
But that's what I need. Where should I look?

After a little looking around, I found this tutorial that on the surface of it seems to be pretty comprehensive. 
AIR, iptables will keep statistics on each rule, and that you can design a rule to handle all traffic going out and another one to handle incomming traffic, by looking at the statistics associated with each rule, you will have the information you need.

  tomas@trotzki:~$ ip -stats -h link show wlan0
  3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
      link/ether 84:3a:4b:20:44:40 brd ff:ff:ff:ff:ff:ff
      RX: bytes  packets  errors  dropped overrun mcast
      4.52M      6.73k    0       0       0       0
      TX: bytes  packets  errors  dropped carrier collsns
      617k       5.32k    0       0       0       0

NOTE: the option -h is the one responsible for the suffixes (k, M).
     Like in "human".

Reply to: