Re: [rrd-users] RPN Question

This is a discussion on Re: [rrd-users] RPN Question within the RRD Users forums, part of the Networking and Network Related category; Wesley PA4WDH wrote: >I have a lot of rrd's with the same DS in it. What i >...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2007
Simon Hobson
 
Posts: n/a
Default Re: [rrd-users] RPN Question

Wesley PA4WDH wrote:


>I have a lot of rrd's with the same DS in it. What i
>want to do is to calculate the sum of all the DS's and
>display that in a "total" graph.
>
>The problem is that those DS's have a lot of unknown
>values in it. What i need is a RPN that does:
>
>if (value_of_ds != unknown)
>return new_value+total_caluclated_so_far
>else return total_calculated_so_far
>
>I have tried this:
>total=new_value,UN,total_calucated_so_far,total_c alulated_so_far,new_value,+,IF



I would suggest keeping it simple to start with - it's tempting to go
for a long formula that spans 10 lines of code, but it's a nightmare
to debug !

So I would suggest something like (please check the syntax, I might
have got the IF statement wrong) :

i1=v1,UN,0,v1,IF
i2=v2,UN,0,v2,IF
total=i1,i2,+,i3,+, .... in,+

Of course you could start combining stuff, one way being by simple
substitution :

total=v1,UN,0,v1,IF,v2,UN,0,v2,IF,+,v3,UN,0,v3,IF, + ... in=vn,UN,0,vn,IF,+


Or you could break down your running total as :

t1=v1,UN,0,v1,IF
t2=v2,UN,0,v2,IF,t1,+
t3=v3,UN,0,v3,IF,t2,+


Where v1 .. vn are your data values.

_______________________________________________
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 10:37 AM.


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