<div dir="ltr">Simon;<div><br></div><div>Thanks deeply pal.</div><div><br>So what you and <span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap">Alex van den Bogaerdt is saying is that FIRST does NOT give the first actual 'update' but the actual first available slot, which is 30 days prior to the last update.</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap">And yes, the FIRST value changes in step with each of my actual 'update', so it really gives credence to your explanation.</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap">One questions;</span></div><div><span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap"><br>
</span></div><div><span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap">When I create the RRD, I am forced to give the --start <TIME> as one step BEHIND my actual update.</span></div><div><span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap"><br>
So let's say my data starts at midnight 1st July, I am forced to create a RRD with --start time at 11:45 30th of June.</span></div><div><span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap"><br>
</span></div><div><span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap">data starts -> 1st July 00:00:00 <-- first data entry.</span></div><div><span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap">Step = 15 minutes (900 seconds)</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap">RRD has to be created with --start 11:45 30th of June (one step behind).</span></div><div><span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap"><br>
if I do not create it 1 step behind, I get an error with my updates.</span></div><div><span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap">Why is the above so?</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px;white-space:nowrap">Secondly, Thanks to Alex can den Bogaerdt, I should use the VDEF function and use rrdtool graph without graphing and PRINT to parse the value to a Perl script variable.</span></div>
<div><br></div><div>Deepest Regards<br>Steven Sim</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 1, 2014 at 9:53 PM, Simon Hobson <span dir="ltr"><<a href="mailto:linux@thehobsons.co.uk" target="_blank">linux@thehobsons.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Steven Sim <<a href="mailto:unixandme@outlook.com">unixandme@outlook.com</a>> wrote:<br>
<br>
> BUT when I use rrdtool first <rrd database> in an attempt to get the time of the first entry, I get a Unix time stamp which is one entire month EARLIER than the first entry in the file.<br>
><br>
> And each time I do update, rrdtool first <rrd_database> returns a DIFFERENT number.<br>
<br>
With each update, does the FIRST value update to be one month (or 30 days) before the timestamp of the update ?<br>
<br>
If so then I think I know what's happening. When you create teh RRD file, it is created in it's entirety - in your case with buckets for 2880 consolidated values. These exist regardless of what updates you do or do not do, and the timespan of them is determined by your step and consolidation values.<br>
What I suspect is happening, and what I alluded to earlier, is that even though you haven't done any updates for those historical buckets, they are still there - and FIRST is merely reporting the timestamp of the oldest bucket. Since you are setting the start time of the RRD when you create it, then the timestamp of the oldest bucket will be 30 days prior to that. As you perform updates, you overwrite the oldest buckets and the value of FIRST will advance to be 30 days prior to the last update.<br>
<br>
Internally to RRD, there is no storage for whether a bucket actually had any updates - only for it's value after applying the consolidation rules specified. Thus there is no way to know if the oldest bucket ever had an update if it's value is NaN - you don't know if it was created with NaN and has never been overwritten, or if it was updated but the calculated value was NaN. You would have to search back through the database to find the oldest bucket with an actual value and infer that this bucket was *probably* the one with the oldest data.<br>
<br>
_______________________________________________<br>
rrd-users mailing list<br>
<a href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</a><br>
<a href="https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users" target="_blank">https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users</a><br>
<br>
</blockquote></div><br></div></div>