Why such a huge discrepancy between vnstat and nlbwmon's bandwidth stats


Let's look solely on the wlan0 (2.4 gHz) bandwidth, which is used by only one device, a Satellite laptop.

In nlbwmon's info, the Satellite's total bandwidth is less than 300 MB.
But in vnstat, wlan0's total bandwidth is 1.42 GB.

Can someone kindly help me understand the discrepancy?
Please know that both have the same billing cycle (same cutoff date).

For a bigger image of the above, click here.

For bigger image of above, click here.

Powered by LuCI lede-17.01 branch (git-17.152.82987-7f6fc16) / LEDE Reboot 17.01.2 r3435-65eec8bd5f

Netlink Bandwidth Monitor (nlbwmon) Missing Data
IPv6 and IPv4 Traffic Statistics
Monitoring bandwidth used per user. (Because metered internet.)

nlbwmon only counts traffic entering or leaving the local network, not the traffic within, while vnstat counts the total traffic on the interface even if it terminates within the network. Would that explain the discrepancy?


Mmmh, I just ran a few test and nlbwmon seems to be leaky, in that it does not record all traffic. That might be related to both IPv6 privacy extension addresses (wild guess) and available CPU cycles (performing a flent test while running tcpdump on my lowly wndr3700v2 to capture the test traffic almost completely hid the roughly 1.3GB test volume from nlbwmon, but the router was fully pegged during the test (and the tcpdump load significantly reduced the trhoughput in the test, that wndr3700v2 really is a nice little router, but it is getting long in the tooth, at least wen doing silly things)).

Best Regards


@takimata, thanks for your reply. Yes, I think your answer helps to explain the discrepancy. But nlbwmon's stats still seem strangely low. In other words, I beileve I've used more bandwidth than nlbwmon is saying.

@moeller0, thanks for your reply. so you've given two additional explations.

  1. IPv6 (my nlbwmon doesn't seem to have as much info on ipv6 than ipv4)
  2. CPU cycles -- wow, for nlbwmon to almost completely ignore the 1.3 GB volume is an egregious mistake. Oh boy, I was so hopeful that nlbwmon would be the solution I've been seeking for six months. :crying_cat_face: :cry: :disappointed: I guess I'll have to keep searching.

All I want for Christmas is a reliable way to measure my bandwith usage, as seen in the perspective of the ISP (i.e. ignore local communications, etc.).

@moeller, might I ask you to please notify @jow. And maybe post a new issue on the nlbwmon github.


@greenlaser - sorry for piling on late but have you looked at YAMon (http://usage-monitoring.com)? I started working on YAMon 4+yrs ago because I wanted to validate the numbers in my ISP's bills. In YAMon, there's a feature that allows you to import data from your ISP so you can view the reports side-by-side.