Need help with CDEF creation

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Moderators, Developers

Post Reply
Author
Message
stormonts
Cacti User
Posts: 300
Joined: Tue Mar 31, 2009 10:05 am

Need help with CDEF creation

#1 Post by stormonts » Thu Oct 17, 2019 11:55 am

I am trying to create a CDEF that says totals "b" + "c" + "f", subtracts that from "a" and then multiplies that by 1024 and I am stuck.

User avatar
RaduAlexandru
Posts: 43
Joined: Mon Mar 28, 2005 5:06 pm
Location: Bucharest, Romania
Contact:

Re: Need help with CDEF creation

#2 Post by RaduAlexandru » Sat Oct 19, 2019 4:40 pm

CDEFs use Reverse Polish Notation. You should look at the rrdtool manual/website, they have some examples as well as a list of functions supported.

Now regarding your expression

Code: Select all

(a - (b + c + f)) * 1024
that would look like (I used commas to separate operands)

Code: Select all

a,b,c,+,f,+,-,1024,*
You can use this to transform your equations.

netniV
Cacti Guru User
Posts: 3035
Joined: Sun Aug 27, 2017 12:05 am

Re: Need help with CDEF creation

#3 Post by netniV » Sun Oct 20, 2019 6:27 am

You can even get RPN calculators / convertors on mobile devices these days. Quite useful when you want to test out your formulas.

stormonts
Cacti User
Posts: 300
Joined: Tue Mar 31, 2009 10:05 am

Re: Need help with CDEF creation

#4 Post by stormonts » Mon Oct 21, 2019 8:14 am

Thank you! I tried 3-4 other RPN calculators but could not get the syntax correct for input. I have saved the link to the one that you provided as it is much easier!

Post Reply