wondering whether there is any method to monitor wifi and ethernet internet data consumption (up and down separately) and log it. I am trying to calculate daily, weekly and monthly data consumption for Wifi and Ethernet. If possible, per session too.
I see that the System Monitor already display the Sent and Received data. Wondering if any method exists to get data like that and log it. A shell script or Python. I know a bit of Python, thanks.
PS: Using 22.04
vnStat is exactly what you want, as it appears. Luckily, it's already in the official
universe
repositories.You can simply install it with:
... then, statistics will be available later (give it some time) and you can view them with e.g. :
for monthly statistics ... or change
-m
to-h
,-d
or-y
for hourly, daily or yearly statistics respectively and a lot of features as well.