vergoh / vnstat

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

Interfaces ppp* #222

Closed AnonymousWebHacker closed 2 years ago

AnonymousWebHacker commented 2 years ago

I have a VPS with an interface eth0 and vnstat, it gets its metrics perfectly, but not the ppp virtual interfaces created by a setup-ipsec-vpn https://github.com/hwdsl2/setup-ipsec-vpn .

Is this my mistake or is it not implemented?

AnonymousWebHacker commented 2 years ago

Fixed ifconfig vnstat --add -i ppp0

vergoh commented 2 years ago

The daemon automatically starts monitoring those interfaces that are available during its initial startup. Any interface that gets configured later will by default need to be manually added with the vnstat --add -i command as you did already found. The daemon's default behavior can be changed if started with --noadd or --alwaysadd parameters.

For listing available interfaces vnstat --iflist can also be used. In a similar way vnstat --dbiflist will provide a list of interfaces currently in the database. Both parameters support an additional mode option in case you'd want to use the output in some script in which case the output becomes one interface per line without anything extra.

AnonymousWebHacker commented 2 years ago

Really well explained, thanks for your time