I've played with rrdtool for a while, and ran it all neatly packaged up in
MRTG and 14all.cgi for a while, but now I want to play a little:

I'm trying to gather 1 day averages.  Based on the documents and faqs I have
read, I should be able to do something like:

[EMAIL PROTECTED] dmcdonald]$  /usr/local/rrdtool/bin/rrdtool fetch
/home/httpd/mrtg/172.16.0.1_fa0_0.rrd AVERAGE -r 86400 -s end-0
                      ds0           ds1

 986589300: 4.6913362181e+04 2.8086596653e+04
 986589600: nan nan
[EMAIL PROTECTED] dmcdonald]$

Except that I get the same number when I do:
[EMAIL PROTECTED] dmcdonald]$  /usr/local/rrdtool/bin/rrdtool fetch
/home/httpd/mrtg/172.16.0.1_fa0_0.rrd AVERAGE -r 300 -s end-0
                      ds0           ds1

 986589300: 4.6913362181e+04 2.8086596653e+04
 986589600: nan nan
[EMAIL PROTECTED] dmcdonald]$

So, either the -r flag doesn't work, or I've misinterpreted what it does....

I also tried to get the information in perl, copying liberally form a script
posted by Steve Rader:
#!/usr/bin/perl -w

use RRDs;

my $file = '/home/http/mrtg/172.16.0.1_fa0_0.rrd';
my $interval = 86400;
my @opts;
push @opts, $file;
push @opts, "AVERAGE";
push @opts, "-r $interval";

my ($start,$step,$names,$data) =
    RRDs::fetch @opts;

print localtime($start);

When I run this, I get "unitialized value" errors on $start, and if I use
debug and try to step into the RRDs::fetch  line, I don't hit a subroutine.

what's up with that?

Daniel J McDonald - CCIE 2495, CNX
Principal Network Specialist
Digicon Technologies
http://www.digicontech.com
[EMAIL PROTECTED]

Digicon - A Cisco Systems Partner, Silver Certified.


--
Unsubscribe mailto:[EMAIL PROTECTED]
Help        mailto:[EMAIL PROTECTED]
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

Reply via email to