[rrd-users] determining invalid values using RRDs vs rrdtool fetch

Ann Gentile gentile at dancer.ca.sandia.gov
Fri Mar 17 19:01:20 MET 2006


Hello,

I would like to be able distinguish values that are invalid
calling RRDs::fetch vs using rrdtool fetch. That is:

at time 1142539176

calling:
	rrdtool fetch "<myrrdhere>" AVERAGE -r 1 -e now -s e-1min

returns:

	timestamp    sum
	
	1142539080:  2.3500000000e+01
	1142539140:  nan
	1142539200:  nan



whereas using: 

	my ($start,$step,$names,$data) = RRDs::fetch ... 
	 foreach my $line (@$data) {
	   print "  ", scalar localtime($start), " ($start) ";
	   $start += $step;
	   foreach my $val (@$line) {
	     printf "%12.1f ", $val;
	   }
	   print "\n";
	 }

prints out:
	1142539080         23.5
        1142539140          0.0



Two questions:
1) Since at time 1142539176 rrdtool fetch returns
   nan for times 1142539140 & 1142539200, but later fills
   them in I assume that they are just not calculated yet, as
   opposed to nan results due to data points that will never
   come in -- is there a way to determine that this is the case ?
2) Is there someother way I can use RRDs::fetch to get back
   something other than 0.0 for the values that appear as nan
   when I call rrdtool fetch, since 0.0 may be a valid return
   value for my calculation?

Thank you,
Ann

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list