Re: [rrd-users] rrdfetch returning too many rows

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: ...


Go Back   Usenet Forums > Networking and Network Related > RRD Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-12-2007
Edward Quick
 
Posts: n/a
Default Re: [rrd-users] rrdfetch returning too many rows

--===============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>&gt; =
Date: Mon, 12 Nov 2007 13:07:18 +0100<br>&gt; From: alex@ergens.op.het.net<=
br>&gt; To: rrd-users@lists.oetiker.ch<br>&gt; Subject: Re: [rrd-users] rrd=
fetch returning too many rows<br>&gt; <br>&gt; On Mon, Nov 12, 2007 at 11:2=
4:37AM +0000, Edward Quick wrote:<br>&gt; <br>&gt; &gt; I would like to fet=
ch the hourly averages for a particular datasouce in an rrd file for the la=
st 24 hours.<br>&gt; &gt; The command I'm using is similar to the one on th=
e man page for rrdfetch:<br>&gt; &gt; <br>&gt; &gt; rrdtool fetch $rrdfile =
AVERAGE -r $rrdres -e @{[int($ctime/$rrdres)*$rrdres]} -s e-24h<br>&gt; <br=
>&gt; What is in rrdres? This is quite relevant!<br>&gt; <br>&gt; 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>&gt; <br>&gt; Try setting rrdres to 7200, and I expect 14 lines r=
eturned. That would be 12 rows, plus two other lines. Correct?<br>&gt; <br=
>&gt; &gt; 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>&gt; <=
br>&gt; No, I don't think so. Use awk, or perl, or ...<br>&gt; <br>&gt; &g=
t; step =3D 60<br>&gt; <br>&gt; &gt; rra[0].cf =3D "AVERAGE"<br>&gt; &gt; r=
ra[0].rows =3D 26352<br>&gt; &gt; rra[0].pdp_per_row =3D 5<br>&gt; <br>&gt;=
Enough data for 24h@5min<br>&gt; <br>&gt; &gt; rra[1].cf =3D "AVERAGE"<br>=
&gt; &gt; rra[1].rows =3D 8784<br>&gt; &gt; rra[1].pdp_per_row =3D 30<br>&g=
t; <br>&gt; 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>&gt; <br>&gt; &gt; rra[2].cf =3D "AVERAGE"<br>&gt; &gt; rra[2].rows =
=3D 4392<br>&gt; &gt; rra[2].pdp_per_row =3D 120<br>&gt; <br>&gt; Enough da=
ta for 24h@2h<br>&gt; <br>&gt; &gt; rra[3].cf =3D "AVERAGE"<br>&gt; &gt; rr=
a[3].rows =3D 1098<br>&gt; &gt; rra[3].pdp_per_row =3D 1440<br>&gt; <br>&gt=
; 24h per row.<br>&gt; <br>&gt; <br>&gt; -- <br>&gt; Alex van den Bogaerdt<=
br>&gt; http://www.vandenbogaerdt.nl/rrdtool/<br>&gt; <br>&gt; ____________=
___________________________________<br>&gt; rrd-users mailing list<br>&gt; =
rrd-users@lists.oetiker.ch<br>&gt; 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==--

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:26 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0