I remembered seeing a similar question a few months back, but can't
seem to find it in the archives.

I'm trying to graph just the changes between each 5 minute sample over
a 24 (well 23) hour period.

Say we have the follow as the datapoints within the rrd.:
---------------------------------------------------------
inp: 10 12 10 15 20 25 20 10   

I would like to graph:
----------------------
0 +2 -2 +5 +5 +5 -5 -10

It seems i've tried a 100 ways to get this to work but it always seems
to graph the datapoint referencing the delta between the current and
the first know data point on the graph.  Now the above set is make up
for ease of illustration, but I've attached a graph so you can get an
idea of how it's plotting.

rrdtool graph test.png -a PNG -h 400 -w 600                     \
        --alt-y-grid                                            \
        -s -1day                                                \
        -e -1hour                                               \
        DEF:usage=test.rrd:inp:MAX                              \
        CDEF:value=PREV,UN,usage,PREV,IF                        \
        CDEF:change=usage,value,-                               \
        "LINE1:change#0000FF:Change\n"                          \
        "LINE1:usage#FF00FF:Usage\n"                            \
        "GPRINT:change:LAST:Last change  %9.2lf  "              \
        "GPRINT:change:AVERAGE:Average change  %9.2lf  "        \
        "GPRINT:change:MAX:Max change  %9.2lf  \\\\c"           \
        "GPRINT:usage:LAST:Last usage   %9.2lf  "               \
        "GPRINT:usage:AVERAGE:Average usage   %9.2lf  "         \
        "GPRINT:usage:MAX:Max usage   %9.2lf  \\\\c"


Any help is appreciated,
Cliff Daniel



-- Attached file removed by Listar and put at URL below --
-- Type: image/png
-- Size: 11k (11883 bytes)
-- URL : http://www.ee.ethz.ch/~slist/pantomime/test.png


--
Unsubscribe mailto:[EMAIL PROTECTED]
Help        mailto:[EMAIL PROTECTED]
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

Reply via email to