Modify collectd/RRDtool to display bps instead of B/s

I installed RRDtool feeded by collectd (on 22.03.3). I notice the network graphs are presented in Bytes/s and Packets/s as gathered from the tracked interfaces, but when talking about bandwidth people usually talks about Mbps more than KB/s.

I read a @dlang comment on an old thread:

I've read some collectd and RRDtool docs, and I've noticed there is the Target option to scale (let's say to multiply x8) a measurement, so we could use that feature to get bps. Then we may also need to modify the Y axis label as well.

The thing is I haven't found a confirmation on whether we can do those changes for OpenWrt by means of some configuration file(s), or we would need to go through the source code (which I may do in the future, but at the moment I prefer a quick solution).

source code.

Quickest solution is probably to apply a RPN calculation to the data in the LuCI graph config source.

Just like here a value is multiplied by 100 to turn 0.02 to 2 (for %).

Based on that, I modified interface.js adding transform_rpn: "8,*" to var traffic = {...} and modified the legend, title and labels (not using Firefox).

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