This is a discussion on Re: [rrd-users] rrdfetch returning too many rows within the RRD Users forums, part of the Networking and Network Related category; --===============0843818098== Content-Type: multipart/alternative; boundary="_add64587-ea0a-40b2-b73c-ad72460d24a8_" --_add64587-ea0a-40b2-b73c-ad72460d24a8_ Content-Type: ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
--===============0843818098==
Content-Type: multipart/alternative; boundary="_add64587-ea0a-40b2-b73c-ad72460d24a8_" --_add64587-ea0a-40b2-b73c-ad72460d24a8_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Thanks Alex.=20 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@ergens.op.het.net > To: rrd-users@lists.oetiker.ch > Subject: Re: [rrd-users] rrdfetch returning too many rows >=20 > On Mon, Nov 12, 2007 at 11:24:37AM +0000, Edward Quick wrote: >=20 > > 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 rrdfetc= h: > >=20 > > rrdtool fetch $rrdfile AVERAGE -r $rrdres -e @{[int($ctime/$rrdres)*$rr= dres]} -s e-24h >=20 > What is in rrdres? This is quite relevant! >=20 > 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 i= n 30-minute rows. >=20 > Try setting rrdres to 7200, and I expect 14 lines returned. That would be= 12 rows, plus two other lines. Correct? >=20 > > However, this returns 50 rows, instead of 24. Also is there a way for m= e just to pull out one datasource, instead of all of them? >=20 > No, I don't think so. Use awk, or perl, or ... > =20 > > step =3D 60 >=20 > > rra[0].cf =3D "AVERAGE" > > rra[0].rows =3D 26352 > > rra[0].pdp_per_row =3D 5 >=20 > Enough data for 24h@5min >=20 > > rra[1].cf =3D "AVERAGE" > > rra[1].rows =3D 8784 > > rra[1].pdp_per_row =3D 30 >=20 > Enough data for 24h@30min. This would be 48 rows, close to the 50 you men= tion: 1 row headers, one empty row for separation, 48 rows of data. >=20 > > rra[2].cf =3D "AVERAGE" > > rra[2].rows =3D 4392 > > rra[2].pdp_per_row =3D 120 >=20 > Enough data for 24h@2h >=20 > > rra[3].cf =3D "AVERAGE" > > rra[3].rows =3D 1098 > > rra[3].pdp_per_row =3D 1440 >=20 > 24h per row. >=20 >=20 > --=20 > Alex van den Bogaerdt > http://www.vandenbogaerdt.nl/rrdtool/ >=20 > _______________________________________________ > rrd-users mailing list > rrd-users@lists.oetiker.ch > https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users __________________________________________________ _______________ Celeb spotting =96 Play CelebMashup and win cool prizes https://www.celebmashup.com= --_add64587-ea0a-40b2-b73c-ad72460d24a8_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable <html> <head> <style> ..hmmessage P { margin:0px; padding:0px } body.hmmessage { FONT-SIZE: 10pt; FONT-FAMILY:Tahoma } </style> </head> <body class=3D'hmmessage'> Thanks Alex. <br><br>That makes complete sense now. You were right, I was s= etting 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] rrd= fetch returning too many rows<br>> <br>> On Mon, Nov 12, 2007 at 11:2= 4:37AM +0000, Edward Quick wrote:<br>> <br>> > I would like to fet= ch the hourly averages for a particular datasouce in an rrd file for the la= st 24 hours.<br>> > The command I'm using is similar to the one on th= e 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 proba= bly have "3600" in there, but there isn't such an RRA available. RRDtool w= ill 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 r= eturned. That would be 12 rows, plus two other lines. Correct?<br>> <br= >> > However, this returns 50 rows, instead of 24. Also is there a wa= y 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>> &g= t; step =3D 60<br>> <br>> > rra[0].cf =3D "AVERAGE"<br>> > r= ra[0].rows =3D 26352<br>> > rra[0].pdp_per_row =3D 5<br>> <br>>= Enough data for 24h@5min<br>> <br>> > rra[1].cf =3D "AVERAGE"<br>= > > rra[1].rows =3D 8784<br>> > rra[1].pdp_per_row =3D 30<br>&g= t; <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 dat= a.<br>> <br>> > rra[2].cf =3D "AVERAGE"<br>> > rra[2].rows = =3D 4392<br>> > rra[2].pdp_per_row =3D 120<br>> <br>> Enough da= ta for 24h@2h<br>> <br>> > rra[3].cf =3D "AVERAGE"<br>> > rr= a[3].rows =3D 1098<br>> > rra[3].pdp_per_row =3D 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/listinf= o/rrd-users<br><br /><hr />Get free emoticon packs and customisation from W= indows Live. <a href=3D'http://www.pimpmylive.co.uk' target=3D'_new'>Pimp = My Live!</a></body> </html>= --_add64587-ea0a-40b2-b73c-ad72460d24a8_-- --===============0843818098== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ rrd-users mailing list rrd-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users --===============0843818098==-- |