[rrd-users] Question about averaging daily ; but with 5 min. steps

Simon Hobson linux at thehobsons.co.uk
Tue Dec 15 13:30:49 CET 2009

Alex van den Bogaerdt wrote:

>  > Did it seem to you that I had any issues converting units ?
>It still does. Else you would understand that this 'problem' is no different
>from having bits (or megabytes) in your database and using CDEF and GPRINT
>to display the average, after being multiplied by 86400, to get the amount
>of bits (or megabytes) in a day.

Actually, the problem is VERY different from the usual 
multiply/divide by some value to get 'real' units.

The problem is about doing a calculation that MUST be done on a 5 
minute sample period, in a graph where the resolution is 1day 
(86400). The calculation is such that doing the same sums over 
anything but a 5 minute sample period does NOT produce the right 

That is the danger of reading the first few lines and thinking it's 
the same question we've seen many times before.

Back to the question, if it's just a matter of getting the right 
value to print in the legend, then one route (I think) would be to do 
two runs through rrdtool. The first would generate no graph, just do 
the calculations at a resolution of 5 mins and output the answers. 
The values can then be included in the script that generates the 
graph on a second run.

Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.

More information about the rrd-users mailing list