<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 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:PMingLiU;
        panose-1:2 2 5 0 0 0 0 0 0 0;}
@font-face
        {font-family:PMingLiU;
        panose-1:2 2 5 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@PMingLiU";
        panose-1:2 2 5 0 0 0 0 0 0 0;}
/* 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:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        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=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I don’t really understand why you think that you’d need to have separate RRD files for the ‘daily’ graphs and the ‘monthly’ one.<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'>Why not have a single RRD, with two RRAs – one with 1cdp=1pdp (that you use for your daily graph) and one with a higher granularity – maybe 1cdp=1hour=4pdp – that extends for 62 days (to allow a graph of the last and current calendar months). When you generate your graph, simply use the start and end params to specify that you’re making a daily or monthly graph, and the correct RRA should be used. This is how MRTG, Cacti and similar use RRDTool.<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'>As you add new data to the RRD, RRDtool will take care of the summarisation and expiry of data. If you want to archive daily data for longer, then simply extend the first RRA as far as required.<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'>s.shipway@auckland.ac.nz<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 #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> rrd-users-bounces+s.shipway=auckland.ac.nz@lists.oetiker.ch [mailto:rrd-users-bounces+s.shipway=auckland.ac.nz@lists.oetiker.ch] <b>On Behalf Of </b>Steven Sim<br><b>Sent:</b> Wednesday, 11 June 2014 3:53 a.m.<br><b>To:</b> Simon Hobson<br><b>Cc:</b> rrd-users@lists.oetiker.ch<br><b>Subject:</b> Re: [rrd-users] If input is already in text format and I craft a perl script to parse the text format and update rrd database, what should the step and heartbeat be?<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Simon;<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>What if a single data file has data metrics for a single day ... I can easily generate the RRD and Graphs based on this single file single day. (much thanks to <span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Steve Shipway valuable pointers</span>)<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>But at the end of the month, my management would want to review the trend for the ENTIRE month.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>What would be an elegant practice for the above?<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>to accumulate data from each day onto a single RRD file?<br><br>Warmest Regards<br>Steven Sim<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On Tue, Jun 10, 2014 at 4:18 PM, Simon Hobson <<a href="mailto:linux@thehobsons.co.uk" target="_blank">linux@thehobsons.co.uk</a>> wrote:<o:p></o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'>Steve Shipway <<a href="mailto:s.shipway@auckland.ac.nz">s.shipway@auckland.ac.nz</a>> wrote:<br><br>> If your metrics are all coming in the same file, for the same point in time, and all being pushed into the RRD at the same time, then it makes sense to have a single RRD to hold them as in your example. You would usually use a separate RRD if the data came separately, potentially for different times. Then separate RRD would make sense as you may get one sample but not another, or they were sampled at differing times.<br><br>To add to that, also consider how things may change over time. Eg, suppose you are logging disk/filesystem utilisation - both in terms of data transferred, and space used/available.<br><br>It would make sense to collate all the quantities from one filesystem into a single RRD - so perhaps an RRD with bytes written, bytes read, % space used, $inodes used. But, a machine will almost certainly have multiple filesystems, and more importantly the number may change - so it would make sense to have one RRD/filesystem. Of course, there may well be more than one filesystem on a disk - so you might want to collect stats for the physical disk (probably just bytes read/written) into one RRD, and have a separate RRD for each physical disk (or array) since the number of physical disks/arrays may change (eg if you add a disk because you've run out of space).<br><br>There isn't really a right and wrong. It's perfectly OK to have lots of small RRDs with a single DS each. It's also perfectly OK to have fewer RRDs with many DSs each. It's a matter of balancing your requirements with the ability to manage the RRDs - and of course, as mentioned above, the requirement to update all DSs in a single RRD at the same time.<br><br>I tend to use a mixture.<br>At one extreme I have an RRD for our UPS stats with many parameters logged, and another with 508 DSs (data in and out for all 254 usable addresses in our /24 subnet) - in both cases, data is collected and graphed with custom scripts, and all the data is collected in a single operation.<br>At the other extreme, I have a whole bunch of RRDs with just 2 DSs (data in and out) - one per port for a bunch of switches (the data is collected and graphed with Cacti), and the data for each port is collected separately (it's the way Cacti works).<br><br>_______________________________________________<br>rrd-users mailing list<br><a href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</a><br><a href="https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users" target="_blank">https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users</a><o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p></div></div></div></div></div></body></html>