Hello Selfhosters!!,
I am using Raspberry Pi to selfhost many things and looking for ways to track my data usage (what is the total transfer over period of months). So that I can choose right plan for my broadband connection.
Appreciate your help.
You must log in or # to comment.
You can track it with iptables.
https://www.linux.com/training-tutorials/bandwidth-monitoring-iptables/
I just have a cron job that runs “ifconfig | logger” once a week. When I want to know how much data has been sent or received, I subtract the RX bytes or TX bytes from the appropriately timestamped entries and divide by the time difference. Easy-peasy.