This is a discussion on [rrd-users] fetch problem? within the RRD Users forums, part of the Networking and Network Related category; May be it has been discus before but I can not find any trace of it. I also check all ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
May be it has been discus before but I can not find any trace of it. I
also check all the release not and I could not find any information on it. Did the fetch logic change between 1.0.33 and 1.2.15 ? I did a fetch with both on the same RRD and they do not return the same result: /usr/local/rrdtool-1.0.33/bin/rrdtool fetch /usr/local/ogr/torrus/rrd/labce/CE/CE1/3.1.253.31_Fa0_0_if-mib-IFSPEED_1 00000000.rrd AVERAGE -r 300 -s 1164214200 -e 1164214500 ifHCInOctetsifHCInUcastPkts ifHCOutOctetsifHCOutUcastPkts ifInDiscards ifInErrors ifOutDiscards ifOutErrors 1164214200: 2.4697370121e+02 2.4345375653e+00 2.8747105233e+02 2.0478456592e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1164214500: 2.4973870023e+02 2.4436822675e+00 2.7211157610e+02 2.1111507566e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 While with 1.2.15 we have /usr/local/rrdtool-1.2.15/bin/rrdtool fetch /usr/local/ogr/torrus/rrd/labce/CE/CE1/3.1.253.31_Fa0_0_if-mib-IFSPEED_1 00000000.rrd AVERAGE -r 300 -s 1164214200 -e 1164214500 ifHCInOctets ifHCInUcastPkts ifHCOutOctets ifHCOutUcastPkts ifInDiscards ifInErrors ifOutDiscards ifOutErrors 1164214500: 2.4973870023e+02 2.4436822675e+00 2.7211157610e+02 2.1111507566e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1164214800: 2.3876253405e+02 2.3550167264e+00 2.6478978375e+02 2.0012293907e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 An other test like this one : /usr/local/rrdtool-1.0.33/bin/rrdtool fetch /usr/local/ogr/torrus/rrd/labce/CE/CE1/3.1.253.31_Fa0_0_if-mib-IFSPEED_1 00000000.rrd AVERAGE -r 300 -s 1164214199 -e 1164214199 ifHCInOctetsifHCInUcastPkts ifHCOutOctetsifHCOutUcastPkts ifInDiscards ifInErrors ifOutDiscards ifOutErrors 1164213900: 2.6194484373e+02 2.3953592604e+00 2.9259346129e+02 1.9986915888e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 1164214200: 2.4697370121e+02 2.4345375653e+00 2.8747105233e+02 2.0478456592e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 --> If the start is not on a boundary, it adjusts to the lower one. --> If the end is not on a boundary, it adjusts to the upper one. While with 1.2.15 we have /usr/local/rrdtool-1.2.15/bin/rrdtool fetch /usr/local/ogr/torrus/rrd/labce/CE/CE1/3.1.253.31_Fa0_0_if-mib-IFSPEED_1 00000000.rrd AVERAGE -r 300 -s 1164214199 -e 1164214199 ifHCInOctets ifHCInUcastPkts ifHCOutOctets ifHCOutUcastPkts ifInDiscards ifInErrors ifOutDiscards ifOutErrors 1164214200: 2.4697370121e+02 2.4345375653e+00 2.8747105233e+02 2.0478456592e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 --> If the start is not on a boundary, it adjusts to the upper one. --> If the end is not on a boundary, it adjusts to the upper one. I have tried in Perl and it does the same thing. #!/usr/bin/perl use RRDs; use Getopt::Long; my $t_end=""; my $ok = GetOptions( 'rrd=s' => \$filename, 'start=s' => \$t_start, 'end=s' => \$t_end ); my( $f_start, $f_step, $f_names, $f_data ) = RRDs::fetch( $filename, "AVERAGE", '--resolution', 300, '--start', $t_start, '--end', $t_end ); $ERR = RRDs::error; if( $ERR ) { print("Error during RRD fetch for $filename: $ERR\n"); exit 1; } print "STEP = $f_step\n"; for( my $j = 0; $j < @{$f_data}; $j++ ) { for( my $i = 0; $i < @{$f_names}; $i++ ) { $f_time = $f_start + ($j * $f_step); print "$f_names->[$i] = [ $f_data->[$j]->[$i], $f_time ]\n"; } } Is it a problem in 1.2.15 or was it a problem in 1.0.33? Where they both OK, it is just that the logic changed? Thank, Luc -- Unsubscribe mailto:rrd-users-request@list.ee.ethz.ch?subject=unsubscribe Help mailto:rrd-users-request@list.ee.ethz.ch?subject=help Archive http://lists.ee.ethz.ch/rrd-users WebAdmin http://lists.ee.ethz.ch/lsg2.cgi |