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 [EMAIL PROTECTED]

> rra[1].cf = "AVERAGE"
> rra[1].rows = 8784
> rra[1].pdp_per_row = 30

Enough data for [EMAIL PROTECTED] 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 [EMAIL PROTECTED]

> 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
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

Reply via email to