[rrd-users] rrdfetch returning too many rows

Edward Quick edwardquick at hotmail.com
Mon Nov 12 13:37:45 CET 2007


Thanks Alex. 

That makes complete sense now. You were right, I was setting rrdres to 3600.

Thanks for your help.

Ed.

> Date: Mon, 12 Nov 2007 13:07:18 +0100
> From: alex at ergens.op.het.net
> To: rrd-users at lists.oetiker.ch
> Subject: Re: [rrd-users] rrdfetch returning too many rows
> 
> On Mon, Nov 12, 2007 at 11:24:37AM +0000, Edward Quick wrote:
> 
> > I would like to fetch the hourly averages for a particular datasouce in an rrd file for the last 24 hours.
> > The command I'm using is similar to the one on the man page for rrdfetch:
> > 
> > rrdtool fetch $rrdfile AVERAGE -r $rrdres -e @{[int($ctime/$rrdres)*$rrdres]} -s e-24h
> 
> What is in rrdres? This is quite relevant!
> 
> You probably have "3600" in there, but there isn't such an RRA available.  RRDtool will do the next best thing, which in your case is showing data in 30-minute rows.
> 
> Try setting rrdres to 7200, and I expect 14 lines returned. That would be 12 rows, plus two other lines.  Correct?
> 
> > However, this returns 50 rows, instead of 24. Also is there a way for me just to pull out one datasource, instead of all of them?
> 
> No, I don't think so. Use awk, or perl, or ...
>  
> > step = 60
> 
> > rra[0].cf = "AVERAGE"
> > rra[0].rows = 26352
> > rra[0].pdp_per_row = 5
> 
> Enough data for 24h at 5min
> 
> > rra[1].cf = "AVERAGE"
> > rra[1].rows = 8784
> > rra[1].pdp_per_row = 30
> 
> Enough data for 24h at 30min. This would be 48 rows, close to the 50 you mention: 1 row headers, one empty row for separation, 48 rows of data.
> 
> > rra[2].cf = "AVERAGE"
> > rra[2].rows = 4392
> > rra[2].pdp_per_row = 120
> 
> Enough data for 24h at 2h
> 
> > rra[3].cf = "AVERAGE"
> > rra[3].rows = 1098
> > rra[3].pdp_per_row = 1440
> 
> 24h per row.
> 
> 
> -- 
> Alex van den Bogaerdt
> http://www.vandenbogaerdt.nl/rrdtool/
> 
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

_________________________________________________________________
Celeb spotting – Play CelebMashup and win cool prizes
https://www.celebmashup.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20071112/35fd84e8/attachment.html 


More information about the rrd-users mailing list