# Network traffic measurement



## balanga (Apr 28, 2018)

Is there any way to tell you much data has passed through a particular network interface?


----------



## tobik@ (Apr 28, 2018)

`systat -ifstat -match $interface`

`netstat -I $interface` if you need something non-interactive.


----------



## ShelLuser (Apr 28, 2018)

tobik@ solution above is definitely the better one, but an alternative extra could be to check your firewall statistics.

For example; if you only want to check how much data has been used by your webserver and you have a rule which allows HTTP traffic to come in then you could check the statistics for that rule. For example: `pfctl -v -s rules` (if you're using PF of course).


----------

