I am toying around with bandwidth indicators, LEDs and somesuch. In this process, I need to get the current bandwidth on an interface.
I expected to use rpc/ubus to get such statistics (current rx/tx bytes, for example). And my first instinct was to look into how the already existing software does gets those. However, when I looked into what LuCI does to display the realtime bandwidth, I found that it employs a tiny daemon (luci-bwc) that in turn simply looks into /sys/class/net/(interface)/statistics
and aggregates the data.
So my question is: Is this still the current "standard" to get plain interface statistics or is there a better, ubus way?