[rrd-users] Is there a setting to smoothen a graph?
lists
lists at ficos.de
Sun Jul 18 17:18:01 CEST 2010
Am 18.07.2010 08:07, schrieb Marc MERLIN:
> Let's take this
> http://graphs.merlins.org/graphs/g.php?action=zoom&local_graph_id=70&rra_id=6&view_type=&graph_start=1279409518&graph_end=1279409978&graph_height=240&graph_width=800&title_font_size=12
>
> as a zoom of
> http://graphs.merlins.org/graphs/g.php?action=zoom&local_graph_id=70&rra_id=6&view_type=&graph_start=1279380998&graph_end=1279438498&graph_height=240&graph_width=800&title_font_size=12
>
> My problem is that I'd like 10 seconds updates to catch transient
> electricity changes, but at a 10 second update rate, during 10 seconds, my
> counter can oscilate between 5 and 6Wh per time slice, causing the ugly
> stair effect.
>
> I have cacti configured to generate the graph with this command:
> /usr/bin/rrdtool graph - \
> --imgformat=PNG \
> --start=-86400 \
> --end=-50 \
> --title="ECM House PV" \
> --base=1000 \
> --height=240 \
> --width=800 \
> --alt-autoscale \
> --vertical-label="Wh" \
> --slope-mode \
> --font TITLE:12: \
> --font AXIS:8: \
> --font LEGEND:10: \
> --font UNIT:8: \
> DEF:a="/var/lib/cacti/rra/houseecm1_25.rrd":PV:AVERAGE \
> CDEF:cdefa=a,3600,* \
> AREA:cdefa#0000FFFF:"Power" \
> GPRINT:cdefa:LAST:" Current\:%8.0lf Wh" \
> GPRINT:cdefa:AVERAGE:"Average\:%8.0lf Wh" \
> GPRINT:cdefa:MIN:"Minimum%8.0lf Wh" \
> GPRINT:cdefa:MAX:"Maximum\:%8.0lf Wh\n"
>
> Are there other settings I can use, or am I out of luck if I don't have
> higher solution counters?
Hi Marc,
try TREND over at least 3 of your steps - you'll still see steps but
they'll be smaller.
Another Trick I'f used before is:
* create another (empty) dummy rrd
+ step size 1s
+ only 1 DS
+ 1 RRA with only 1 row
+ make sure the value of that one element is 0 (not NaN)
* now add that dummy value to your real value
+ CDEF:newval=yourval,dummy,+
+ CDEF:show=newval,30,TREND
+ AREA:show....
No your newval has a 'virtual' resolution of 1s instead of 10s and you
can TREND it nicer (over longer periods)
Be aware that the newly created graph will look nicer by smoothing the
information but it will not tell the truth anymore - reality still has
10s steps if that's your interval ...
hth
- Karl
Now
More information about the rrd-users
mailing list