How to poll for traffic usage every minute or cetain seconds?
SisyphusIsntHappy opened this issue · comments
I see that vnstat can save for traffic usage to disk as frequently as five minutes. Say I'm transferring data a very high speeds, and I live a location prone to blackouts, in this case I'll loose the traffic data if there is a black out just before vnstat polls for traffic usage.
So my question is where in the source code I can tweak so that vnstat can be made to poll at arbitrary intervals?
No need to modify the source code as it's pretty much all configurable in the config file. See the "DAEMON RELATED KEYWORDS" section from https://humdi.net/vnstat/man/vnstat.conf.html or man vnstat.conf
.
SaveInterval
is the primary configuration option for changing how often data is written to disk. PollInterval
in turn sets how often data gets polled and then cached internally.