vergoh / vnstat

vnStat - a network traffic monitor for Linux and BSD
GNU General Public License v2.0
1.36k stars 120 forks source link

Interface disabled if renamed. #188

Closed esselfe closed 3 years ago

esselfe commented 3 years ago

I returned to the old network interface naming scheme using the net.ifnames=0 kernel parameters, so the interface went from ens3 to eth0.

Now when I run 'vnstat' it shows "ens3 [disabled] since 2021-02-14" and data has not been collected since 2 days... I had to delete /var/lib/vnstat/vnstat.db and restart the service so eth0 is correctly set and collected.

A reboot didn't fix this either.

vergoh commented 3 years ago

vnStat doesn't have the ability of tracking interfaces being renamed on the kernel level. If that happens then you can use vnstat --rename to rename the existing interface in the database or vnstat --add when it's a new interface. No need to delete the database.

esselfe commented 3 years ago

Great, thanks.