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: > Hi All, > > I have a question about RPN. I'm sorry if it has ...


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
Sven Ulland
 
Posts: n/a
Default Re: [rrd-users] RPN Question

Wesley PA4WDH wrote:
> Hi All,
>
> I have a question about RPN. I'm sorry if it has been
> asked before. I've search my email archive but didn't
> find it.
>
> 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


Yes. That is explained in the tutorial found here:
http://oss.oetiker.ch/rrdtool/tut/cdeftutorial.en.html

> I have tried this:
> total=new_value,UN,total_calucated_so_far,total_ca lulated_so_far,new_value,+,IF


DEF:ds_one=rrdfile.rrd:foo:AVERAGE
DEF:ds_two=rrdfile.rrd:bar:AVERAGE
DEF:ds_three=other_rrdfile.rrd:baz:AVERAGE

CDEF:total=\
ds_one,UN,0,ds_one,IF,\
ds_two,UN,0,ds_two,IF,+,\
ds_three,UN,0,ds_three,IF,+

Something like that would do the trick. A line can be
read like so:

"If ds_one == UNKNOWN, then return 0; else return ds_one"

> [...]


S

_______________________________________________
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 05:25 AM.


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