[rrd-users] Why do I see NaN values?

This is a discussion on [rrd-users] Why do I see NaN values? within the RRD Users forums, part of the Networking and Network Related category; Hi, I've created an RRD database to store a value (server clock offset in ms). I've created a ...


Go Back   Usenet Forums > Networking and Network Related > RRD Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-21-2008
Leon Stringer
 
Posts: n/a
Default [rrd-users] Why do I see NaN values?

Hi,

I've created an RRD database to store a value (server clock offset in
ms). I've created a cron job to add the value every 6 hours. As far
as I can tell the job is running correctly and getting a valid value.
However, when I run rrd fetch I get a lot of NaN values (between a
quarter and a third of values) so the generated graphs have gaps too.

I created the file with:

rrdtool create file.rrd -s 21600 DS:offset:GAUGE:21600:U:U
RRA:MAX:0:1:360

I add the data with:

rrdtool update file.rrd N:<val> (E.g. 1.903, -0.424, etc.)

And I query data with:

rrdtool fetch -s -1week file.rrd MAX

Can anyone tell me why I see NaN values instead of the values I
(think!) am putting in?

Thanks in advance,

Leon...

-----------------------------------------
Email sent from www.virginmedia.com/email
Virus-checked using McAfee(R) Software and scanned for spam

_______________________________________________
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

Reply With Quote
  #2 (permalink)  
Old 05-21-2008
Alex van den Bogaerdt
 
Posts: n/a
Default Re: [rrd-users] Why do I see NaN values?

On Wed, May 21, 2008 at 09:35:34AM +0000, Leon Stringer wrote:
> Hi,
>
> I've created an RRD database to store a value (server clock offset in
> ms). I've created a cron job to add the value every 6 hours. As far
> as I can tell the job is running correctly and getting a valid value.
> However, when I run rrd fetch I get a lot of NaN values (between a
> quarter and a third of values) so the generated graphs have gaps too.
>
> I created the file with:
>
> rrdtool create file.rrd -s 21600 DS:offset:GAUGE:21600:U:U
> RRA:MAX:0:1:360
>
> I add the data with:
>
> rrdtool update file.rrd N:<val> (E.g. 1.903, -0.424, etc.)
>
> And I query data with:
>
> rrdtool fetch -s -1week file.rrd MAX
>
> Can anyone tell me why I see NaN values instead of the values I
> (think!) am putting in?


Short answer: because you are using timestamp "N" and heartbeat 21600.

Longer answer:

When you run your script, it is not exactly 00:00, 06:00, 12:00, 18:00.
Sometimes the interval between two updates is a bit longer than 21600
seconds, other times it is a bit shorter.

When the interval is a bit shorter, RRDtool will accept the resulting
rate, when the interval is a bit longer, you(!) ask RRDtool to skip
that rate.

Choose:

1: use fixed timestamps
2: allow for some slack (increase your heartbeat)

--
Alex van den Bogaerdt
http://www.vandenbogaerdt.nl/rrdtool/

_______________________________________________
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:21 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0