[rrd-users] Strange issue with large step value

_ JvG _ jj at knowzone.org
Mon May 4 16:24:52 CEST 2015


Hi,

I'm trying to import some old data (collected once every week at 19.00 hour
on Sunday)

This is what I did:

rrdtool create pymeter-weekdata.rrd \
    --start 1419184800 \
    --step 604800 \
    DS:qtotal:COUNTER:907200:0:100000 \
    RRA:AVERAGE:0.5:1:53

rrdtool update pymeter-weekdata.rrd 1419789600:50628
rrdtool update pymeter-weekdata.rrd 1420398000:50803
rrdtool update pymeter-weekdata.rrd 1421002800:50959
rrdtool update pymeter-weekdata.rrd 1421607600:51120

rrdtool xport  \
    --start 1419184800 \
    --end 1425236400 \
    --step 604800  \
    DEF:Qtotal=pymeter-weekdata.rrd:qtotal:AVERAGE \
    CDEF:QTot=Qtotal,604800,*,100,/  \
    XPORT:QTot:"Usage\n"

and I get this:

<xport>
  <meta>
    <start>1419465600</start>
    <step>604800</step>
    <end>1419465600</end>
    <rows>11</rows>
    <columns>1</columns>
    <legend>
      <entry>Usage\n</entry>
    </legend>
  </meta>
  <data>
    <row><t>1419465600</t><v>NaN</v></row>
    <row><t>1420070400</t><v>NaN</v></row>
    <row><t>1420675200</t><v>1.6573076923e+00</v></row>
    <row><t>1421280000</t><v>1.5829166667e+00</v></row>
    <row><t>1421884800</t><v>NaN</v></row>
    <row><t>1422489600</t><v>NaN</v></row>
    <row><t>1423094400</t><v>NaN</v></row>
    <row><t>1423699200</t><v>NaN</v></row>
    <row><t>1424304000</t><v>NaN</v></row>
    <row><t>1424908800</t><v>NaN</v></row>
    <row><t>1425513600</t><v>NaN</v></row>
  </data>
</xport>

while I would expect these results:

508.03 - 506.28 = 1,75
509.59 - 508.03 = 1.56
511.20 - 509.59 = 1.61

What did I do wrong or what do I need to correct to get the expected
results?

JJ

--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.oetiker.ch/pipermail/rrd-users/attachments/20150504/09f49826/attachment.html>


More information about the rrd-users mailing list