vergoh / vnstat

vnStat - a network traffic monitor for Linux and BSD

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Separate IPv6 statistics

mdavids opened this issue · comments

Would it be possible to add a feature that shows the amount of IPv6-traffic, as compared to IPv4?

It's not in /proc/net/dev, but maybe in dev_snmp6? (at least in Linux)

I'm fully aware this can be considerable chunk of work, if possible at all. So I understand if it is undoable. Just wanted to let you know there's an interest in it.

As far as I've understood, /proc/net/dev has both IPv4 and IPv6 traffic in the values. As a result, for making such feature useful, at least I'd want to also have IPv4 only statistics available (quickly searching https://bugzilla.redhat.com/show_bug.cgi?id=293051 is closed with CANTFIX but that's for RHEL5) for comparison instead of having to myself subtract those from the IPv6 only statistics that dev_snmp6 would provide (the interface1+interface2 feature in vnStat doesn't support a - operator). There's also the question of since when has dev_snmp6 been available and if there some equivalent on the BSD side. I wasn't aware of dev_snmp6 before your request but at least the format doesn't look too complex.

However, I do see your point for having IPv6 only statistics available but you are also right that implementing such feature would require considerable work. The main issue that first comes to mind is the database structure which isn't currently flexible enough to support anything else than interfaces on the local host. Then there's the matter of the user interface itself, how would you query the data (well ok, -4 and -6 are the obvious candidates but that would still not result in a "both a the same time" output).

I have currently some experimentation ongoing which will anyway require touching the database structure so I will keep this and #128 ( + possibly also #154 and #191) in mind when planning the changes.

Much appreciated. I like vnStat because it is lightweight and stable. So don't let my request interfere with that great design principle.