<html><body>
<p><font size="2">Hi,</font><br>
<br>
<font size="2">I have been using RRDtool with great success for a few years, and while those of us on the pointy end of the swords can get what we need from the graphs, upper management too often calls me needing totals within minutes for a conference call they are on, or meeting they are in. To combat this, the no brainer was to write a script, and though I don't profess to be a real Perl programmer, I can usually get what I need.</font><br>
<br>
<font size="2">In this case though, it's not the code that is confusing me, but something I read in Alex's &quot;Computing Amount of Data Transferred&quot; tutorial. BTW, I thought the tutorial was great! I was in the process of writing logic that would based upon the dates selected, choose the appropriate RRA. I was elated to read that fetch takes care of that for me....that all the data will come from the same RRA, hence having the same step size.</font><br>
<br>
<font size="2">My point of confusion is that I would think that to compute the total of, let's say packets, since that's what I'm dealing with, I would need to maintain a running total of the (current value * step size). This would leave me to believe that if the current value was 10 and the step size was 7200 I would have a total of 72000 packets in a two hour period. The math would be easy as ( 10 packets/second * 7200 seconds ) = ((10 * 7200 packets) * seconds/seconds) = 72000 packets. </font><br>
<br>
<font size="2">However, reading the tutorial, I infer that this is not correct, and I am having a mental block figuring out why. I am going to paste the piece of the tutorial that is confusing me, hopefully that will be acceptable.</font><br>
<br>
<font size="2">&quot;</font>Each row in an RRA represents an amount of time and a rate. The rate is measured in bytes per second, the time in seconds. Some easy math shows that unless the amount of time is zero, you can get rid of it: (byte/second)*second = (byte*second)/second = byte*(second/second) = byte*1=byte. 
<p>(If &quot;second&quot; is zero, then &quot;second/second&quot; is undefined. This is why it doesn't work when second equals zero.) 
<p>When dealing with other rates, it works similar. If you have multiplied the input by 3600 (for instance to get messages per hour) then the result of the computation in the paragraph above is also 3600 times what it should be. Remember that when you continue...<font size="2">&quot;</font>
<p><font size="2">It is the last paragraph that I am most concerned with, for I have multiplied my packets per second by the step size to achieve the total in each row - maintaining a running total of the rows, and as I understand the above, this is incorrect. As I understand the tutorial, I should just be maintaining a running total of the values, and not multiply them in each row by the step size. Is that correct?</font>
<p><font size="2">Thank you,</font>
<p><font size="2">Jeff Petter</font>
<p>
<p></body></html>