[rrd-users] Math in VDEFs

Marco Chiappero marco at absence.it
Wed Mar 11 12:56:40 CET 2009


Hi everybody,
I have an unusual question for you.
As you know it's not possible to do mathematical operations in VDEFs. Is 
it by design? Or math is simply lacking and will be implemented in the 
future? Ok, you can argue that CDEFs are there for such a purpose, but 
why should be bad to do calculus on just a single data point rather than 
a whole set? Let me show you an example, maybe too much didactic but 
still meaningful, that made me think about this.
Let's say you want to plot uptime informations from a server of yours, 
in the legend you can show the current uptime and for example the 
longest run (maybe the shortest one too) and the average uptime during 
the last year. It looks pretty easy, you have just to move the entire 
data set from seconds to days dividing by 86400 seconds/day and then 
choose the average, maximum, etc. Now let's suppose you want to print 
information using the 'uptime' command output schema, thus days, hours, 
seconds separately. You can't do that anymore, because you have to do 
math calculation after choosing the average or maximum. Well, it's still 
quite simple form the logic point of view, select the value you want 
from the DEF, in seconds, and then apply three different VDEF 
calculation on that one, but currently you can't.
However I managed to get the same output another way (adding a 
particular CDEF) but with more complexity, in my opinion too much for 
such a simple purpose.
So I'm asking: is there a reason for not to have math operators in 
VDEFs? Is it by design or it's just a matter of time?
Thank you.

Regards,
Marco Chiappero



More information about the rrd-users mailing list