[prev in list] [next in list] [prev in thread] [next in thread]
List: rrd-users
Subject: Re: [rrd-users] RRDTool lib fetch
From: Steve Shipway <s.shipway () auckland ! ac ! nz>
Date: 2015-11-03 21:01:21
Message-ID: 5820DC553954E44FA1A36C78323AD148A3F6A6EB () uxcn10-6 ! UoA ! auckland ! ac ! nz
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
This is expected behaviour.
‘Rrdtool fetch' will return the raw data, using the RRA that most closely \
approximates the requested data resolution. So, if you request a resolution of 3600, \
and only have a 300 RRA available, then this will be used. However, if you have a \
3600 RRA then this will be chosen. In addition, RRDTool will ensure the time window \
is fully covered before selecting a resolution; so you need to be careful of \
fencepost errors where only the last sample is unavailable at your selected \
resolution and so it fails back to a lower granularity RRA. The graph function, on \
the other hand, will perform on-the-fly aggregation and calculation to generate a \
data set in the required resolution before graphing.
If you want to have the data pre-aggregated, then either ensure that a suitable RRA \
exists in the RRD, or else use ‘rrdtool xport', which is like the graph function \
but returns the data instead (after calculation and aggregation if necessary)
Steve
Steve Shipway
T: +64 9 3737 599 ext 86487
E: s.shipway@auckland.ac.nz <mailto:s.shipway@auckland.ac.nz>
(GNU Terry Pratchett)
From: rrd-users [mailto:rrd-users-bounces+s.shipway=auckland.ac.nz@lists.oetiker.ch] \
On Behalf Of Olivier
Sent: Wednesday, 4 November 2015 5:29 a.m.
To: rrd-users@lists.oetiker.ch
Subject: [rrd-users] RRDTool lib fetch
Hello,
I'm looking for documentation on rrdtool library. I'm actually using it through PHP \
and PECL project. I'm using function rrd_fetch() to grab data from a specific .rrd \
file.
I can see that 'resolution' parameter is not respected (as rrd_graph is doing) : RRD \
seems to find the most accurate resolution available, but returns the raw data. For \
example, if I have data with resolution =60 and I request resolution =3600, data is \
not aggregated, and I have one row every minute instead of one per hour.
First, I want to know if this is an expected behaviour. In that case, it means that \
rrd_graph is doing this aggregate itself. Is there a way to ask rrdtool to do the \
math for me ?
Olivier
[Attachment #5 (text/html)]
<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type \
content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 \
(filtered medium)"><style><!-- /* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@SimSun";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-NZ link="#0563C1" \
vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>This is \
expected behaviour.<o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>‘Rrdtool \
fetch' will return the raw data, using the RRA that most closely approximates the \
requested data resolution. So, if you request a resolution of 3600, and only have a \
300 RRA available, then this will be used. However, if you have a 3600 RRA then \
this will be chosen. In addition, RRDTool will ensure the time window is fully \
covered before selecting a resolution; so you need to be careful of fencepost errors \
where only the last sample is unavailable at your selected resolution and so it fails \
back to a lower granularity RRA. The graph function, on the other hand, will \
perform on-the-fly aggregation and calculation to generate a data set in the \
required resolution before graphing.<o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>If you want \
to have the data pre-aggregated, then either ensure that a suitable RRA exists in the \
RRD, or else use ‘rrdtool xport', which is like the graph function but returns the \
data instead (after calculation and aggregation if necessary)<o:p></o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Steve<o:p></o:p></span></p><p \
class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p \
class=MsoNormal><b><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Steve \
Shipway<o:p></o:p></span></b></p><p class=MsoNormal><span \
style='font-size:10.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>T: +64 9 3737 \
599 ext 86487<o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:10.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>E: <a \
href="mailto:s.shipway@auckland.ac.nz">s.shipway@auckland.ac.nz</a><o:p></o:p></span></p><p \
class=MsoNormal><span \
style='font-size:1.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>(GNU Terry \
Pratchett)<o:p></o:p></span></p><p class=MsoNormal><span \
style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><div \
style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div \
style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p \
class=MsoNormal><b><span lang=EN-US \
style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span \
lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'> rrd-users \
[mailto:rrd-users-bounces+s.shipway=auckland.ac.nz@lists.oetiker.ch] <b>On Behalf Of \
</b>Olivier<br><b>Sent:</b> Wednesday, 4 November 2015 5:29 a.m.<br><b>To:</b> \
rrd-users@lists.oetiker.ch<br><b>Subject:</b> [rrd-users] RRDTool lib \
fetch<o:p></o:p></span></p></div></div><p \
class=MsoNormal><o:p> </o:p></p><div><p \
class=MsoNormal>Hello,<o:p></o:p></p><div><p \
class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I'm looking for \
documentation on rrdtool library. I'm actually using it through PHP and PECL project. \
I'm using function rrd_fetch() to grab data from a specific .rrd file.<br><br>I can \
see that 'resolution' parameter is not respected (as rrd_graph is doing) : RRD seems \
to find the most accurate resolution available, but returns the raw data. For \
example, if I have data with resolution =60 and I \
request resolution =3600, data is not aggregated, and I have one row every \
minute instead of one per hour.<br><br>First, I want to know if this is an expected \
behaviour. In that case, it means that rrd_graph is doing this aggregate itself. Is \
there a way to ask rrdtool to do the math for me ?<o:p></o:p></p></div><div><p \
class=MsoNormal><br><br>Olivier<o:p></o:p></p></div><div><p \
class=MsoNormal><o:p> </o:p></p></div></div></div></div></body></html>
["smime.p7s" (application/pkcs7-signature)]
_______________________________________________
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
--===============6657181605811109099==--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic