<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Thanks Alex. <br><br>That makes complete sense now. You were right, I was setting rrdres to 3600.<br><br>Thanks for your help.<br><br>Ed.<br><br>> Date: Mon, 12 Nov 2007 13:07:18 +0100<br>> From: alex@ergens.op.het.net<br>> To: rrd-users@lists.oetiker.ch<br>> Subject: Re: [rrd-users] rrdfetch returning too many rows<br>> <br>> On Mon, Nov 12, 2007 at 11:24:37AM +0000, Edward Quick wrote:<br>> <br>> > I would like to fetch the hourly averages for a particular datasouce in an rrd file for the last 24 hours.<br>> > The command I'm using is similar to the one on the man page for rrdfetch:<br>> > <br>> > rrdtool fetch $rrdfile AVERAGE -r $rrdres -e @{[int($ctime/$rrdres)*$rrdres]} -s e-24h<br>> <br>> What is in rrdres? This is quite relevant!<br>> <br>> 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.<br>> <br>> Try setting rrdres to 7200, and I expect 14 lines returned. That would be 12 rows, plus two other lines. Correct?<br>> <br>> > 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?<br>> <br>> No, I don't think so. Use awk, or perl, or ...<br>> <br>> > step = 60<br>> <br>> > rra[0].cf = "AVERAGE"<br>> > rra[0].rows = 26352<br>> > rra[0].pdp_per_row = 5<br>> <br>> Enough data for 24h@5min<br>> <br>> > rra[1].cf = "AVERAGE"<br>> > rra[1].rows = 8784<br>> > rra[1].pdp_per_row = 30<br>> <br>> Enough data for 24h@30min. This would be 48 rows, close to the 50 you mention: 1 row headers, one empty row for separation, 48 rows of data.<br>> <br>> > rra[2].cf = "AVERAGE"<br>> > rra[2].rows = 4392<br>> > rra[2].pdp_per_row = 120<br>> <br>> Enough data for 24h@2h<br>> <br>> > rra[3].cf = "AVERAGE"<br>> > rra[3].rows = 1098<br>> > rra[3].pdp_per_row = 1440<br>> <br>> 24h per row.<br>> <br>> <br>> -- <br>> Alex van den Bogaerdt<br>> http://www.vandenbogaerdt.nl/rrdtool/<br>> <br>> _______________________________________________<br>> rrd-users mailing list<br>> rrd-users@lists.oetiker.ch<br>> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users<br><br /><hr />Get free emoticon packs and customisation from Windows Live. <a href='http://www.pimpmylive.co.uk' target='_new'>Pimp My Live!</a></body>
</html>