http://qs321.pair.com?node_id=863221


in reply to RRDTool::OO not able to create a COMPUTE data source?

Hi Bronto:

I am not sure if i get it right if you are specifying something else than creating a data source (DS) using "RRDTool::OO". If not then my bad but If that is creating a COMPUTE DS then its pretty straight forward . COMPUTE data source is nothing but data source type ABSOLUTE. This is the same way i create a GAUGE data source using RRDTool::OO

#! /usr/bin/perl -w #simple test ABSOLUTE DS use strict; use RRDTool::OO; # creating new rrd object file my $rrd = RRDTool::OO->new( file => "testrrd.rrd" ); # Create a round-robin database $rrd->create( step => 1, # one-second intervals data_source => { name => "mynewDS", type => "ABSOLUTE" }, archive => { rows => 5 });

This would create a new rrd data file testrrd.rrd with DS the specified DS type.

Replies are listed 'Best First'.
Re^2: RRDTool::OO not able to create a COMPUTE data source?
by bronto (Priest) on Oct 05, 2010 at 09:04 UTC
    Hi

    What do you exactly mean when you say that a COMPUTE and an ABSOLUTE are the same thing? From the rrdcreate man page I'd say they aren't:

    I am new to both rrdtool and RRDTool::OO, so if I am missing something obvious please bear with me and tell me ;)

    Ciao!
    --bronto


    In theory, there is no difference between theory and practice. In practice, there is.