opnsense / ports

OPNsense ports on top of FreeBSD
https://opnsense.org/
Other
157 stars 115 forks source link

Update vnstat package to latest #70

Closed wuffers closed 5 years ago

wuffers commented 5 years ago

The vnstat package in opnsense is 1.15, which is over 3 years old. Currently vnstat is at 1.21.

I've now lost my vnstat database twice due to a power reboot. It looks like I'll have to do a manual cron job to save my stats periodically (would love to use Borg but haven't researched how to add ports to opnsense). The reboot would make all my interface databases and their backups 0 bytes in /var/lib/vnstat. I have to delete them manually and restart the service to reinitialize it.

vnstat 1.20 introduced a sqlite database, which would most likely be much better for this type of issue. Would also love to have vnstati available (to show graphs would be another feature request though, for the plugin). It might require some changes to the plugin though, as weekly output is no longer available.

https://humdi.net/vnstat/CHANGES

vergoh commented 5 years ago

Just a quick clarification: the current version is 2.2, the versioning was changed from 1.x to 2.x with the introduction of the sqlite database. 1.18 is the last version from the 1.x series.

From database usage point of view everything was rewritten. The 1.x series had the full database always in memory and overwrote the database file on every file update. In the 2.x series only new data is kept in memory (buffered for the configured duration) and sqlite handles incrementing the necessary counters in the database during database file updates. That in turn makes it possible to freely configure the data retention durations without data loss.

fichtner commented 5 years ago

FreeBSD ports only has 2.0, which is what we will update in 19.1.x, but it hasn't been high up on our priority list particularly because the change could be incompatible or non-trivial for the current integration. I'm not saying it is as that remains to be seen when the works is carried out.

fichtner commented 5 years ago

2.2 is available and we're testing so I'm closing this although the ETA is still a few weeks away.