What do the numbers produced by luci-bwc mean and how is the connection tracking list produced?

Specifically, https://github.com/openwrt/luci/blob/master/modules/luci-mod-status/src/luci-bwc.c#L742

I note that this is what's returned by ubus in response to getRealtimeStats or getConntrackList but I'm having a bit of trouble following how a list of IP addresses and bandwidth statistics is built from this (see Unminified JavaScript/sourcemaps/stepping through frontend code, I could also learn via stepping through scripts on my device)

The line 742 that you referenced, prints the CPU load (1 min, 5 min, 15 min), not connection stats. Connections are printed at 701-712

The connection tracking list is generated in 538-567 by reading the netfilter connection list, which name is defined on line 445-446.
Those status files in /proc/net are actually system data from the connection handling in Linux. You can cat those /proc files manually, too.

1 Like

Whoops! I wonder why I can't see IP addresses on the frontend coming back from ubus then.

Thanks for the pointer. I wonder if I'd be better off poking these directly rather than trying to extend Luci (although that's probably another post topic)

Where did the reference to ubus materialize ????
To my knowledge, it has no role (and the source code shows no ubus calls).
Luci-bwc pretty crudely/old-fashioned way scrapes the info from kernel debug/status files and radios from libiwinfo.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.