Netlink Bandwidth Monitor not updating data

I have been using luci-app-nlbwmon package but it doesn't seem to be monitoring any data.


same data since initial.

configuration

Your Commit Interval at which the temporary in-memory database is committed to the persistent database directory is set at 12 Hours. What does ls -l /mnt/sda1/nlbwmon return?

root@OpenWrt:~# ls -l /mnt/sda1/nlbwmon
-rwxrwxrwx    1 root     root          1149 Jul  8 12:27 20220701.db.gz

should I choose a shorter interval?

That depends. Personally, 12 Hours works just fine for me.

The data from last commit time resides in /tmp so any reboot and it's lost. Select the dropdown level you're comfortable with.

From what I see, it's keeping your persistent data.

You can confirm by running an Export - Group by IP and importing to any spreadsheet. Give it a day and repeat and compare the counters based on each IP.


current stats no rx bytes except for the router itself :man_facepalming:

Screenshot from 2022-07-08 12-41-19

Assuming you use default 192.168.1.0/24, you have a wonky subnet in your config. No telling what it could do. Remove the 192.168. .0/24. Check again after your next Commit DB.

no, the ISP router is on 192.168.18.1, so OpenWrt is also in 192.168.18.xx

so 192.168.0.0/16 covers that range, but what range does 192.168. .0/24 represent.

I thought I had to add another 192.168.18.0/24 range.

You seem to have mixed lan and wan together in the interface settings.

there is no WAN as such, Ethernet cable is connected to LAN1, while 2.4Ghz radio serves as a client to Huwaei inverter which has IP 192.168.200.1.
Following is the topology, but change 192.168.1.1 to 192.168.18.1 etc.

Current configuration and still the same result.



I think the issue is here, data not being registered at the interface.

Post output of uci export nlbwmon

uci export nlbwmon
package nlbwmon

config nlbwmon
        option netlink_buffer_size '524288'
        option database_generations '10'
        option database_interval '1'
        option database_limit '10000'
        option protocol_database '/usr/share/nlbwmon/protocols'
        option database_directory '/mnt/sda1/nlbwmon'
        list local_network '192.168.0.0/16'
        list local_network '172.16.0.0/12'
        list local_network '10.0.0.0/8'
        list local_network 'lan'
        option commit_interval '12h'
        option refresh_interval '5m'

Looks fine. Try stopping and starting the service.

/etc/init.d/nlbwmon stop
/etc/init.d/nlbwmon start



same result. I played 4K videos on youtube between the two posts still no data being listed.

Based on the gui images, the utility is running ok.

Do you get any return from logread -e nlbwmon?

The client utility nlbw pulls stats from the currently running runtime socket.

You appear to be wanting to see Layer7 stats. What do you get running the following:

nlbw -c show -g ip,layer7    # group by layer7 by ip
nlbw -c show -g layer7       # just layer7
nlbw -c show -g ip           # just ip

Similar results, https doesn't cross ~110-180MB mark.

root@OpenWrt:~# nlbw -c show -g layer7       # just layer7
    Layer7      Conn.   > Downld. ( > Pkts. )      Upload (   Pkts. )
     HTTPS    23.86 K    41.98 MB ( 268.75 K)   110.23 MB ( 294.20 K)
      HTTP        33      3.75 MB (   2.69 K)    72.18 KB (   1.36 K)
     other    69.81 K   380.71 KB (   5.92 K)    22.29 MB ( 176.43 K)
      IGMP     9.34 K         0 B (       0 )   194.76 KB (   6.07 K)
       DNS        39          0 B (       0 )     3.39 KB (      56 )
      QUIC         4          0 B (       0 )       608 B (       8 )
   NetBIOS       334          0 B (       0 )   165.67 KB (   2.12 K)
      mDNS    30.78 K         0 B (       0 )    59.30 MB ( 181.88 K)


following is my network configuration.

root@OpenWrt:~# cat /etc/config/network

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'xxxxx:xxxx:xxxx::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0.1'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.18.24'
        option gateway '192.168.18.1'
        list dns '192.168.18.1'

config device
        option name 'eth0.2'
        option macaddr 'xx:xx:xx:xx:xx:xx'

config interface 'wan'
        option device 'eth0.2'
        option proto 'dhcp'
        option type 'bridge'

config interface 'wan6'
        option device 'eth0.2'
        option proto 'dhcpv6'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '1 2 3 4 0t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '5 0t'

config interface 'wwan'
        option proto 'dhcp'

config interface 'wlan'
        option proto 'dhcp'
        option defaultroute '0'

Nlbwmon uses the local subnets to identify upstream traffic. Traffic with both source and destination address in one of the local subnets is not counted. Only traffic with either a non-local source or a non-local destination is considered.

Since you have defined 192.168.0.0/16 as local subnet which matches both the 192.168.18.0/24 upstream and the 192.168.200.0/24 downstream, all traffic is considered local and not counted.

If the intention is to count traffic in the downstream 192.168.200.0/24 range, you should change local subnet 192.168.0.0/16 in the nlbwmon config into 192.168.200.0/24 to exclude the upstream 192.168.18.0/24 range.

1 Like