[collectd] fix to create RRDs correctly

Thorsten von Eicken tve at voneicken.com
Sat Feb 16 02:40:14 CET 2008


When creating an RRD file, the rrdtool plugin doesn't do what it's 
supposed to do. Instead of creating 5 RRAs it creates 4 and in doing so 
it skips the first one. The result is about 2x the number of datapoints 
total. The fix below works for me. It's for 4.2.2 but it looks like this 
hasn't changed in the latest 4.3 beta

==========================================================
*** src/rrdtool.c      2008-02-15 13:47:18.000000000 -0800
--- src/rrdtool.c      2008-02-15 14:00:01.000000000 -0800
***************
*** 195,201 ****
                 span = rts[i];

                 if ((span / ss) < rrarows)
!                       continue;

                 if (cdp_len == 0)
                         cdp_len = 1;
--- 195,201 ----
                 span = rts[i];

                 if ((span / ss) < rrarows)
!                       span = ss * rrarows;

                 if (cdp_len == 0)
                         cdp_len = 1;
==========================================================

Thorsten



More information about the collectd mailing list