---
* exported rrd_update_v_r for theadsave rrd_update calls
+libDBI
+------
+* make rrdfillmissing actually work. The parameter is now in seconds and not
+ in steps for ease of use by Hans Jørgen Jakobsen
+
Bindings
--------
* dotnet by Chris Larsen of Euphoria Audio
=head1 SYNOPSIS
-E<lt>rrdfileE<gt> = B<sql//E<lt>libdbi driverE<gt>/E<lt>driver-option-nameE<gt>=E<lt>driver-option-valueE<gt>/...[/rrdminstepsize=E<lt>stepsizeE<gt>][/rrdfillmissing=E<lt>fill missing n samplesE<gt>]//E<lt>tableE<gt>/E<lt>unixtimestamp columnE<gt>/E<lt>data value columnE<gt>[/derive]/E<lt>where clause 1E<gt>/.../E<lt>where clause nE<gt>>
+E<lt>rrdfileE<gt> = B<sql//E<lt>libdbi driverE<gt>/E<lt>driver-option-nameE<gt>=E<lt>driver-option-valueE<gt>/...[/rrdminstepsize=E<lt>stepsizeE<gt>][/rrdfillmissing=E<lt>fill missing n secondsE<gt>]//E<lt>tableE<gt>/E<lt>unixtimestamp columnE<gt>/E<lt>data value columnE<gt>[/derive]/E<lt>where clause 1E<gt>/.../E<lt>where clause nE<gt>>
=head1 DESCRIPTION
defines the minimum number of the step-length used for graphing (default: 300 seconds)
-=item B</rrdfillmissing>=B<E<lt>fill missing stepsE<gt>>
+=item B</rrdfillmissing>=B<E<lt>fill missing secondsE<gt>>
- defines the number of steps to fill with the last value to avoid NaN boxes due to data-insertation jitter (default: 0 steps)
+ defines the number of seconds to fill with the last value to avoid NaN boxes due to data-insertation jitter (default: 0 seconds)
=item B<E<lt>tableE<gt>>
(*data)[idx*(*ds_cnt)+1]=r_value; /* AVG */
(*data)[idx*(*ds_cnt)+2]=r_value; /* MAX */
(*data)[idx*(*ds_cnt)+3]=1; /* COUNT */
- (*data)[idx*(*ds_cnt)+4]=r_value; /* SIGMA */
+ (*data)[idx*(*ds_cnt)+4]=r_value*r_value; /* SIGMA */
} else {
/* MIN */
if ((*data)[idx*(*ds_cnt)+0]>r_value) { (*data)[idx*(*ds_cnt)+0]=r_value; }
}
}
+ /* Fill in missing values */
+ fillmissing/=(*step);/* Convert from seconds to steps */
+ if (fillmissing>0) {
+ int copy_left=fillmissing;
+ for(idx=1;idx<rows;idx++) {
+ long count=(*data)[idx*(*ds_cnt)+3];
+ if (count==0) {
+ /* No data this bin */
+ if (copy_left>0) {
+ /* But we can copy from previous */
+ int idx_p=idx-1;
+ (*data)[idx*(*ds_cnt)+0]=(*data)[idx_p*(*ds_cnt)+0];
+ (*data)[idx*(*ds_cnt)+1]=(*data)[idx_p*(*ds_cnt)+1];
+ (*data)[idx*(*ds_cnt)+2]=(*data)[idx_p*(*ds_cnt)+2];
+ (*data)[idx*(*ds_cnt)+3]=(*data)[idx_p*(*ds_cnt)+3];
+ (*data)[idx*(*ds_cnt)+4]=(*data)[idx_p*(*ds_cnt)+4];
+ copy_left--;
+ }
+ }else{
+ copy_left=fillmissing;
+ }
+ }
+ }
+
/* and return OK */
return 0;
}