Bug 26743

Summary: vnstat fails to add interface
Product: Mageia Reporter: james Whitby <jim>
Component: RPM PackagesAssignee: All Packagers <pkg-bugs>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: Low CC: lists.jjorge
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: vnstat-2.4-3.mga8.src.rpm CVE:
Status comment:

Description james Whitby 2020-06-08 19:22:34 CEST
Install vnstat
Remove original interface.
Add new interface.

No info added to db for interface.

From vnstat.conf

# default interface (leave empty for automatic selection)
Interface ""

Appears to not function.

Details:

Remove wifi card, replace with 1G nic.
Setup accounting for new nic.
No info in vnstat for new nic.

from cli:
vnstat shows only old wifi info.

In a vm:

Add second nic. disabled first one, enable second one, setup as usual, no info.
reboot , no change.

From man vnstat.conf

...
      Interface
              Default  interface  used when no other interface is specified
              on the command line. Leave empty for automatic selection. The
              automatic  selection  will prioritize the interface with most
              traffic for outputs doing database queries.  Queries not  us‐
              ing  the  database will first check if the database is avail‐
              able and select the interface with  most  traffic  out  those
              that  are currently visible in the system. If no database can
              be read then the first available interface will be used. (vn‐
              stat and vnstati only)

...
Jani Välimaa 2020-06-08 20:25:10 CEST

Summary: Fails to add interface => vnstat fails to add interface

Comment 1 Lewis Smith 2020-06-08 21:30:35 CEST
Thank you for the report.
This is in the same field as bug 25417 (resolved by version 0.27 of net_monitor); not the same problem, but please look at it. Since this new bug is for Cauldron, you will have the latest updates of everything.

vnstat has no registered maintainer, so assigning to DavidG as the main recent one. CC'ing Zezinho in case he has an opinion.

Assignee: bugsquad => geiger.david68210
CC: (none) => lists.jjorge

Comment 2 José Jorge 2020-06-09 21:14:13 CEST
It appears that this is a limitation of current vnstat : it does not add dynamically the new interfaces if the database already exists.

As workaround, this can be done manually as root :

vnstat --add -i wlp0s29u1u4
systemctl restart vnstat.service 

Then the traffic starts being accounted. Of course, it would be nice if mageia tools did this automagically, so I keep the bug as possible enhancement.

Assignee: geiger.david68210 => lists.jjorge
Severity: normal => enhancement
Priority: Normal => Low

Manuel Hiebel 2021-03-04 22:01:19 CET

Assignee: lists.jjorge => pkg-bugs