[rrd-users] trying to understand the relationship between source data, what's in rrd and what gets plotted

Mark Seger Mark.Seger at hp.com
Wed Jul 25 13:43:50 CEST 2007

Alex van den Bogaerdt wrote:
>> In any event, when I look at the contents of the rrd database that 
>> contains a day's worth of 10 second samples using fetch. starting at 
>> 1123992076  I see the first interval at 1123992080, which leads me to a 
>> couple of questions:
>> - does rrd choose to normalize data to the nearest minute boundary and 
>> therefore I get timestamps of 1:00, 1:10, 1:20 even if I enter data as 
>> 1:06, 1:16, etc?  keep in mind my start time for the create DOES land on 
>> a 6 second bounday
> "Nearest minute boundary":  No, it does not.  You tell it where to
> do so, using "--step".
Maybe I misled you by the term 'minute boundary', but I meant that it 
appeared to align the data such that at least one sample fell on a 
minute boundary which is consistent with an earlier reply made by 'Simon 
Hobson' in which he said

"See earlier posts in this thread, boundaries are ALWAYS on a multiple 
of your step size from unix epoch. Eg, is divisible by 10, 1123992076 is 
> As told before, it is "n*step", not "n*step+offset". Thus, if you
> want hh:mm:06, hh:(mm+1):06 and so on, your step size will need to
> be a whole multiple of 1,2,3 or 6.
> Yes, your create command may have used a wrong timestamp. RRDtool
> will have fixed this.
my timestamp of 1123992076 is correct and when I tried changing it 
to1123992080 (which IS an even mulitple from the epoch) I still get the 
same intervals with confirms Simon's statement.
> Or, you have multiple RRAs, not all in the same resolution. Maybe
> RRDtool had to select the RRA where each row describes 60 steps.
>> - assuming it does pick its own intervals, is that why none of the 
>> numbers stored in rrd match the source data even though I have one row 
>> per sample, because it's normalizing the data?
>> - if that's the case, I suppose that would explain why I'm not seeing 
>> the right numbers in my plots.
> Normalization is explained on my site.
yes, and that confirms what I think I also said.  rrd picks the times of 
the intervals for you using YOUR stepsize but ITS times, so if my 
samples are every 10 seconds starting 6 seconds after the minute, none 
of my data points will be recorded exactly as I supplied them.  I 
completely understand the reason for normalization and why rrd does it, 
but in my case it causes incorrect results because the data I put in is 
not the data I get out.  I also understand that if the data I put in IS 
sampled at times that are multiple steps from the epoch they WILL be 
recorded/repored correctly.
>> As I said in an earlier mail message, I think rrd is real good at what 
>> it does and I'm only trying to understand the areas in which someone is 
>> trying to do something it really wasn't intended for and this sounds 
>> like it may be on of those areas.
> I still think RRDtool can do exactly what you want, provided that you
> tell it what you want.  There may be cases where RRDtool cannot do what
> you want it to do, but I still think your case isn't one of them.
As I said above it sounds like if I conform my data to align to the time 
boudary conditions rrd requires it should work and if I don't conform it 

More information about the rrd-users mailing list