2

I have a metered internet connection that resets on the 17th of each month.

I'm using vnstat to monitor my bandwith. I just installed it from the repo. I'd like it to show me how much I have used from the 17th on but I can't get it to work.

This is what I'm doing:

vnstat -b 2024-04-17 -e today

or

vnstat -b 2024-04-17 -e 2024-04-22

but the output is identical to vnstat without options.

I'm just a simple user, not a super user. Thank you for your time.

  • Which distro and version of Linux are you using? – user68186 Apr 22 '24 at 20:54
  • An alternative to using --begin and --end would be to use the MonthRotate configuration file option to make vnStat track months starting from the 17th instead of the default 1st. That way the -m / --months output would match your metering period. Note that changing that configuration option doesn't result in past data getting recalculated. That daemon also needs to be restarted if that configuration option is changed. – Teemu Toivola Apr 30 '24 at 21:46

1 Answers1

1

Simply add the list type you want before the begin and end dates (the command you typed omitted the --days)

vnstat --days -b 2024-04-01 -e 2024-04-02

enp4s0 / daily

      day        rx      |     tx      |    total    |   avg. rate
 ------------------------+-------------+-------------+---------------
 04/01/2024     3.08 GiB |    1.18 GiB |    4.26 GiB |  423.14 kbit/s
 04/02/2024    10.26 MiB |    6.83 MiB |   17.09 MiB |    1.66 kbit/s
 ------------------------+-------------+-------------+---------------
  sum of 2      3.09 GiB |    1.19 GiB |    4.27 GiB |