Page 1 of 1

bwmon log to file

Posted: Mon Jan 22, 2018 2:16 pm
by Indigo
i want to track router daily/monthly/yearly bandwith usage in my homeautomation system

is there a possibility to output bwmon stats to a file?
i want something like average down/upload rate for the last minute and accumulated down/upload volume per day
file should not be appended, values should be overwritten every minute.

Re: bwmon log to file

Posted: Mon Jan 22, 2018 3:52 pm
by Lantis
At the bottom of the bandwidth usage page you can download the data

Re: bwmon log to file

Posted: Tue Jan 23, 2018 2:25 am
by Indigo
actually, i need a file to parse, automatically

Re: bwmon log to file

Posted: Tue Jan 23, 2018 4:08 am
by Lantis
It already logs to files in /tmp and /usr/data, but you won’t be able to parse them easily (they aren’t human readable).

You can try using the bw_get command to get specific information.

Otherwise you’re out of luck without rewriting it yourself.
Other users have automated the download of the CSV file for similar purposes, but I don’t know exactly how they did it.