luci-app-nbwmon(Netlink Bandwidth Monitor) losing data after reboot

Good evening, I'm having problem with the nbwmon it is configured to write to the router memory the cade 24 hours, however even after the 24 hours if I restart the router the usage data is lost. Does anyone ever go through this know how to fix it?

Those data is usually written into /tmp. Tmp is linked to RAM. So it is lost after a reboot.

You can overcome this "issue" if you use an external drive (usb-stick, usb-hdd, usb-sdd). This requires an usb port on your router.

https://openwrt.org/docs/guide-user/storage/usb-drives

Then you could set your database directory to sth. like:

uci del nlbwmon.database_directory
uci set nlbwmon.database_directory='/mnt/sda1/nlbwmon'

Maybe add a cron job writing data "away" in another file from time to time.

EDIT: You could probably setup a log server also and write the data to this server. But that is IMO overkill for private usage.

2 Likes