[rrd-users] updating rrd

Belarbia Anthony anthony.belarbia at atosorigin.com
Mon Jul 26 11:46:11 MEST 2004


Hello,
 

I'm making stats on my volum's backup, my problem is the update.

 

I have a file who's created at the end of backup, it fill up with :
beginning hour, end and volum.

I use a perl script to obtain the values, and I want to update this RRD with
this script :

 

sub update_rrd {

            my ($debut,$fin,$size,$host)=@_;

            my ($file,$time);

            $time = time;

            $file = $main::datadir."$host/".$main::backup_graph.".rrd";

            if ( ! -e $file ) {

                        my @args =($file, '-b', $time-28800, '-s', 600,

                        "DS:size:GAUGE:1:0:U",

                        "RRA:AVERAGE:0.1:1:144",

                        "RRA:AVERAGE:0.1:7:144",

                        "RRA:AVERAGE:0.1:30:144",

                        "RRA:AVERAGE:0.1:90:144",

                        "RRA:AVERAGE:0.1:365:144");

            RRDs::create (@args);

            my $ERR=RRDs::error;

            die "ERROR while updating $file : $ERR\n" if $ERR;

            }

            RRDs::update ($file,"$debut:$size");

            RRDs::update ($file,"$fin:0");

            my $ERR=RRDs::error;

            die "ERROR while updating $file : $ERR\n" if $ERR;

}

 

I have this message when I use the script : 

ERROR while updating gbackup.rrd : illegal attempt to update using time
1090822313 when last update time is 1090822313 (minimum one second step)

 

Thank you in advance for your help, and sorry if my English is not good.

 

Anthony

 

 



--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list