[rrd-users] Rrdtool for counting irregular events

Simon Hobson linux at thehobsons.co.uk
Mon May 21 15:07:05 CEST 2012

Rafal Gwizdala wrote:

>Or maybe the step can be calculated based on graph date range? If 
>so, what's the algorithm rrdtool uses?

It should attempt to use the most detailed data that will fill the 
graph most fully. If you have consolidations where every 
consolidation is a multiple of the shorter ones (eg, 30mins is a 
multiple of 5 mins, 2 hours is a multiple of both 30 and 5 minutes, 
and so on) then this will normally mean using the most detailed data 

Example, you consolidate over 5 minute intervals for one day, and 1/2 
hour over one week. If you ask for a graph which starts not more than 
24 hours ago, then you'll see 5 minute data. Go back a few minutes 
more and you'll get 1/2 hour data as the 5 minute data won't fill the 
graph. This is because there is never a situation where a lower 
resolution consolidation covers a period that isn't also covered by a 
higher resolution one - at least as far back as the higher resolution 
data goes.

Where it breaks down is if the consolidated periods are multiples of 
each other. Suppose you consolidate over 2 minutes and 5 minutes. 
Graph from midnight (00:00) to 00:14 and you'll get 7off 2 minutes 
samples. Graph from midnight to 00:15 and you may get 3off 5 minute 
samples as that will fill more of the graph.
 From memory, you can force the resolution to be used - which would 
result in the 15 minute graph showing the more detailed data with a 
gap at the end (if you forced the 120s resolution). I also believe 
some changes have been made since I last took any notice of this and 
I don't know what changed.

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