[rrd-users] no NaN values in perl?
Tobias Oetiker
tobi at oetiker.ch
Sat May 31 00:20:51 CEST 2008
Hi Karl,
In RRDs, NaN is represented as undef. So you can test:
if (not defined $value){
print "Nan"
} else {
print $value
}
cheers
tobi
Yesterday Karl Fischer wrote:
>
> Hello all,
>
> I'm new to this list and fairly new to using rrdtool.
>
> I found it quite useful to be able to store undefined 'NaN'
> values beneath numeric values in the rrd ...
> (eg. to differentiate between system offline and 0-value)
>
> Works great when using rrdtool as a standalone, however, when
> using RRDs::fetch in perl, all NaN values get converted into
> '0' when fetching values from the RRDB.
>
> Why? Am I doing anything wrong?
>
> I've tried to search the archives for hints and found many
> people complaining about NaN - however, I do want to get them.
>
> My apologies if this has been asked before - please point me
> to some documentation about this - if there's any.
>
> Many thanks for your help.
>
> Rgds
>
> - Karl
>
>
>
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>
>
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten
http://it.oetiker.ch tobi at oetiker.ch ++41 62 213 9902
More information about the rrd-users
mailing list