[rrd-users] RRD::update failing on first update every time?

Jo Rhett jrhett at netconsonance.com
Tue Aug 10 20:47:49 CEST 2010


Attached is your replication script.   The subroutines are almost unmodified from our source code (renamed hash tags and removed use of local tied debug handler).   The main script just creates 1 hour work of random junk data, finds the last updated timestamp (just like our code) and runs update on the values newer.

You can run it a few times and it runs fine, but will eventually do this:

$ ./show-problem.pl 
getLatestRRDTimestamp( test.rrd ) found timestamp 1281465000
Insert into test.rrd values 1281465028, 1537758033.6, 1067887523.33333
ERROR while updating test.rrd: illegal attempt to update using time 1281465028 when last update time is 1281465200 (minimum one second step)
Insert into test.rrd values 1281465328, 1537758393.6, 1067887773.33333
Insert into test.rrd values 1281465628, 1537758753.6, 1067888023.33333

Interesting is that running it quickly again and again never hits it.  Running it randomly every 10-15 minutes and you'll see the problem fairly quickly.

On Aug 10, 2010, at 8:18 AM, A Darren Dunham wrote:
> Can you recreate this situation with a simple 'rrdcreate' and
> 'rrdupdate' lines that are runnable by others?
> 
> On Mon, Aug 09, 2010 at 07:47:55PM -0700, Jo Rhett wrote:
>> I have a statistical data source giving me numbers that are exactly 300 seconds apart, with multiple intervals at once.  (ie data in 5 minute windows delivered hourly, etc)
>> 
>> Data which is exactly 300 seconds apart should make RRD happy, but RRD is always rejecting the very first update.   Why?
>> 
>>       RRD filename is /rrd/vlan-0.0/queue-1.rrd
>>        getLatestRRDTimestamp( /rrd/vlan-0.0/queue-1.rrd ):
>>                rrd start = 1281393300, step = 300
>> 		(steps through data to find the last defined value)
>>        Exiting getLatestRRDTimestamp( /rrd/vlan-0.0/queue-1.rrd ) with timestamp 1281406200
>>        insert into /rrd/vlan-0.0/queue-1.rrd values 1281406473, 3420012071625, 3420012071625
>> ERROR while updating /rrd/vlan-0.0/queue-1.rrd: illegal attempt to update using time 1281406473 when last update time is 1281406473 (minimum one second step)
>>        insert into /rrd/vlan-0.0/queue-1.rrd values 1281406773, 3420061076791, 3420061076791
>>        insert into /rrd/vlan-0.0/queue-1.rrd values 1281407073, 3420108690075, 3420108690075
>>        insert into /rrd/vlan-0.0/queue-1.rrd values 1281407373, 3420860926634, 3420860926634
>> 
>> Why is it failing on the first update every time?
>> And no, I'm not doing an update at any other time, there's only one
>> place in the code where update() is called, and it outputs the debug
>> message you see here...

-- 
Jo Rhett
Net Consonance : consonant endings by net philanthropy, open source and other randomness



More information about the rrd-users mailing list