Strange issue with large step value

_ JvG _ <[email protected]>
Newsgroups gmane.comp.db.rrdtool.user
Message-ID <CAD7b+tKgrYrWaXMjkeR77i99yWtqw_tfjG6kBiiwRtAsmghmuA@mail.gmail.com>
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

--

_______________________________________________
rrd-users mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.