Invalid rpn expression in rrdtool, containing several LT and IF in a CDEF

StackOverflow https://stackoverflow.com/questions/12563473

  •  03-07-2021
  •  | 
  •  

سؤال

I'm trying to create a graph with multiple data sources and I'm trying to get the minimal value of all of them.

I've tried with two data sources, it's working. Below the version with 2 data sources :

DEF:min_0="/path0/file.rrd":value:MIN
DEF:min_1="/path1/file.rrd":value:MIN
CDEF:min=min_0,min_1,LT,min_0,min_1,IF

But I'm stuck with three, which is more complex :

DEF:min_0="/path0/file.rrd":value:MIN
DEF:min_1="/path1/file.rrd":value:MIN
DEF:min_2="/path2/file.rrd":value:MIN
CDEF:min=min_0,min_1,LT,min_0,min_1,IF,min_2,LT,min_0,min_1,LT,min_0,min_1,IF,min_2,IF

I got from rrdtool graph the error below :

ERROR: invalid rpn expression

Any ideas of why I can't push any values I want and then use it with IF statement or LT ?

هل كانت مفيدة؟

المحلول

how about just using the MIN function ? this will save your head from exploding

CDEF:min=min_0,min_1,MIN,min_2,MIN
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top