[rrd-users] Question about time stamp, etc with GAUGE DST
Ryan Kubica
kubicaryan at yahoo.com
Fri Nov 9 04:17:56 CET 2012
RRD is interpolating the value since you aren't inserting on the step-second (1352425140 1352425200 etc...)
Since your insert is part way into the step interval of 1352425140 rrd is splitting the value between the two step intervals.
If you don't want interpolation the easiest way to avoid it is to subtract the modulus of time of 60 from time: time - (time % 60) ... gives you the step interval time to insert with.
ps: you should also ensure that your loop code isn't doing a sleep 60, since you will drift in time with logic like that (that 3 seconds you gained between 121 and 184) ... use a wait counter that's based on: sync_time + 60 and wait until sync_time on each loop, etc.
________________________________
From: Chris Nighswonger <cnighswonger at foundations.edu>
To: rrd-users at lists.oetiker.ch
Sent: Thursday, November 8, 2012 6:25 PM
Subject: [rrd-users] Question about time stamp, etc with GAUGE DST
What is it that I do not understand about the timestamps in the following RRD? Just below it is the actual data as inserted into the RRD via RRDs::update. Below that is the fetch of what the same data looks like in the RRD.
My question is why is the data from time 1352425184 split across two steps? I'm guessing it has to do with the difference between the --start value and when the logging daemon is started. What I am trying to achieve is the data point recorded in a single step. Is this possible?
Kind Regards,
Chris
RRD:
rrdtool create sperrors.rrd --start now --step 60 \
DS:align-err:GAUGE:120:0:100000 \
RRA:AVERAGE:0.5:1:10080 \
RRA:MAX:0.5:1:10080 \
RRA:LAST:0.5:1:1 \
RRA:AVERAGE:0.5:60:1440 \
RRA:MAX:0.5:60:1440 \
RRA:AVERAGE:0.5:720:732 \
RRA:MAX:0.5:720:732
Data being inserted into RRD:
1352424941:0
1352425001:0
1352425061:0
1352425121:0
1352425184:2
1352425244:0
1352425304:0
1352425364:0
Output of "$rrdtool fetch sperrors.rrd AVERAGE --start 1352424941"
align-err
1352424960: 0.0000000000e+00
1352425020: 0.0000000000e+00
1352425080: 0.0000000000e+00
1352425140: 6.3333333333e-01
1352425200: 1.4666666667e+00
1352425260: 0.0000000000e+00
1352425320: 0.0000000000e+00
1352425380: 0.0000000000e+00
1352425440: 0.0000000000e+00
1352425500: 0.0000000000e+00
1352425560: 0.0000000000e+00
_______________________________________________
rrd-users mailing list
rrd-users at lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20121108/5049fa88/attachment.htm
More information about the rrd-users
mailing list