[rrd-users] How to graph slow changing counters

Thorsten Erdmann thorsten at trektech.de
Sun Mar 29 16:28:30 CEST 2020



I want to graph the data of my energy meter. But it is measuring only in
1kWh raster. So with normal power usage I have every 2..4 hours a step of
1kWh. The meter displays it's data as kWh, so it gives e.g 600 for the
absolute counter value of 600kWh.

I sample the absolute energy every 5 minutes. So I took this as step and
600s as heartbeat.


What I get is short peaks with a height which is displayed as 330u over a
period of 24h. With longer periods like a week the values get smaller and
smaller and there are weird stepping curves. So how can I measure/graph such
low resolution measures in a senseful way?


This is how I defined the data:


                ret = rrdtool.create(rrdname + '.rrd', '--step', '300',
'--start', str(starttime),








And this is how I graph them


    ret = rrdtool.graph(rrdname + '24h.png', '--start', 'end-24h', '--end',

        '--upper-limit', '650', '--lower-limit', '600', '--rigid',
'--right-axis', '0.00001:-0.006',

        'DEF:gauge=./' + rrdname + '.rrd:Gauge:AVERAGE',

        'DEF:counter=./' + rrdname + '.rrd:Counter:AVERAGE',





The gauge line looks good, but the counter line looks weird.





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.oetiker.ch/pipermail/rrd-users/attachments/20200329/5bc16f68/attachment.html>

More information about the rrd-users mailing list