Re: [rrd-users] NAN and 0 in aggregate graphs

This is a discussion on Re: [rrd-users] NAN and 0 in aggregate graphs within the RRD Users forums, part of the Networking and Network Related category; Adam Jacob Muller wrote: >Right now I am solving this by doing something like: > >CDEF:field1_nz=%s,...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-31-2008
Simon Hobson
 
Posts: n/a
Default Re: [rrd-users] NAN and 0 in aggregate graphs

Adam Jacob Muller wrote:

>Right now I am solving this by doing something like:
>
>CDEF:field1_nz=%s,UN,0,field1,IF
>CDEF:field2_nz=%s,UN,0,field2,IF
>CDEF:field_total=field1_nz,field2_nz,+
>
>this works, but, on values where both are NAN this returns 0, it would
>be much more preferable to return NAN here



Hmm, looking at the doc pages it doesn't look like boolean operators
(AND, OR) are provided, if they were then I would suggest something
like :
CDEF:field1_nz=%s,UN,0,field1,IF
CDEF:field2_nz=%s,UN,0,field2,IF
CDEF:field_total=field1_nz,field2_nz,+

CDEF:final_value=field1,UN,field2,UN,AND,field_tot al,UNKN,IF


This is a bit contrived, but how about :

CDEF:a=field1,UN,field2,0,IF
ie IF filed1 is unknown, set a=field2, else set a=0

CDEF:final_total=a,UN,UNKN,field_total,IF
ie, if a is unknown (means both field1 and field2 must be unknown),
then set final_value to unknown, else use total calculated.

_______________________________________________
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB 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 08:31 PM.


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