[rrd-users] Strange issue with large step value
_ JvG _
jj at knowzone.org
Mon May 4 23:14:34 CEST 2015
:)
my bad (make not for self -- do not calculate epoch dates by hand)
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 1420394400:50803
rrdtool update pymeter-weekdata.rrd 1420999200:50959
rrdtool update pymeter-weekdata.rrd 1421604000: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"
<?xml version="1.0" encoding="ISO-8859-1"?>
<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.6617857143e+00</v></row>
<row><t>1421280000</t><v>1.5832142857e+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>
still not the expected numbers...
Please explain how I convert the above example to an hourly database
without recalculating the values
JJ
On Mon, May 4, 2015 at 10:50 PM, Alex van den Bogaerdt <
alex at vandenbogaerdt.nl> wrote:
> I guess the problem may have to do with the fact that your time stamps are
> not a whole multiple of your step size.
>
> Not as a solution, but as a means to investigate the problem: try to
> populate an RRD with a step size of an hour, and plenty of room in a couple
> of RRAs. See if your data makes it into the database and is as expected.
>
> ----- Original Message ----- From: "_ JvG _" <jj at knowzone.org>
> To: <rrd-users at lists.oetiker.ch>
> Sent: Monday, May 04, 2015 4:24 PM
> Subject: [rrd-users] Strange issue with large step value
>
>
>
> 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
>> rrd-users at lists.oetiker.ch
>> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>>
>>
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>
--
_ JvG _
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.oetiker.ch/pipermail/rrd-users/attachments/20150504/30eb62da/attachment-0001.html>
More information about the rrd-users
mailing list