[rrd-developers] Re: API for reading RRD metadata

Tiago Pedroso tfp at novis.pt
Thu Oct 4 18:10:41 MEST 2001


On Thu, Oct 04, 2001 at 05:39:58PM +0200, Tobias Oetiker wrote:
>
> Today Tiago Pedroso wrote:
>
>
> > wouldn't it be great to have things like this:
> >
> > my $rrd = RRD->new->( filename => "my.rrd" );
> >
> > my $info = $rrd->info();
> >
> > foreach my $elem (keys %{$info->{ds}} { print "dsname = $elem\n";
> > print "dst = ".$info->{ds}{$elem}{type}."\n"; print "hb =
> > ".$info->{ds}{$elem}{minimal_heartbeat}."\n"; print "min =
> > ".$info->{ds}{$elem}{min}."\n"; print "max =
> > ".$info->{ds}{$elem}{max}."\n"; }
> >
> > Am I being to demanding ? Well at least rddtool ships with a
> > perl API
>
> Hi Tiago,
>
> not at all, but designing such an second level API in perl is much
> simpler and IMHO the right thing todo as opposed to create such an API
> in XS ... so if you wrote a second level API which not make it
> available to others to enjoy ...

well i don't master XS to comment on that... but imagine if DBI instead
of returning an array of arrays on a query, returned an array of strings
which you would have to parse later to extract the info from each row ?
it wouldn't be nice ... :)

As for the second level API... it isn't finished yet... have only
implemented the functions i needed... but don't mind to share my current
version if anyone is interested.

regards
--
Tiago Pedroso - <tfp at novis.pt> <http://www.novis.pt>
Novis Telecom - Carrier - Network Management Solutions 
Rua Henrique Pousão, 432 - 2 Piso - 4461-901 Snra da Hora
tel: 22 0114897

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



More information about the rrd-developers mailing list