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

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


Darren, I really appreciate that you are trying to help but skepticism about assertions I make about the code are just a waste of time.  You don't know me well enough to realize I don't write in with stuff like this unless my facts are in order, but you shouldn't start your conversation with me assuming I'm an idiot.

On Aug 10, 2010, at 8:18 AM, A Darren Dunham wrote:
> Unfortunately, you don't show what is actually being run by the system.

15k of source code from my application is going to help you?   And seriously, we're not talking about complicated code.   It's easier to type out an update() call than it was to write the question to me.

> My first guess is that RRD is correct, but there's a bug in your script
> and the first 'rrdupdate' is getting run twice.

That's not possible, since the only place where update is being run is preceded by the debug message you see.

$ grep -B 5 -A 2 update collector.pl 

        $DEBUG = "\t\tinsert into $filename values $data->{'timeRecorded_nomsec'}, " . 
                "$data->{'Ingress_OctetsForwarded'}, " .
                "$data->{'Egress_OctetsForwarded'}\n";

        RRDs::update( $filename, '--template', 'ds0:ds1',
                $data->{'timeRecorded_nomsec'} . ':' . $data->{'Ingress_OctetsForwarded'} . ':' . $data->{'Egress_OctetsForwarded'}
        );

>> 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...
> 
> Maybe you could wrap the update() call to show the command line?

That's exactly what you were looking at.   Same operands, same order.   See code shown above.

The only question you asked which could move this forward was:
> Can you recreate this situation with a simple 'rrdcreate' and
> 'rrdupdate' lines that are runnable by others?

Yes, but building the replication script for this is most probably a waste of time if I'm dealing with a well known 'feature' in RRDtoool.   I've run into them before.

If this really is a new problem (I doubt it) then I'll be happy to produce a replication script.  But first let's start with the obvious.

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



More information about the rrd-users mailing list