[rrd-users] RRDs::graph and DEF... MIN

Alex van den Bogaerdt alex at vandenbogaerdt.nl
Fri Dec 2 16:59:33 CET 2016


> All looks fine as lpng as the outdoor temperatrure is above 0 degree.
> Otherwise the pump graph ends at the O line, it looks ugly!

In other words: you only have a problem with

>    CDEF:OnOff=PUMPE,FLOOR,80,*",
>    "AREA:OnOff#F0EFEF:Umwaelzpumpe  ",

Not sure if it will work, but try this:

 CDEF:OnOff1=PUMPE,0.5,LT,UNKN,INF
 CDEF:OnOff2=PUMPE,0.5,LT,UNKN,NEGINF
 AREA:OnOff1#F0EFEF:Umwaelzpumpe
 AREA:OnOff2#F0EFEF

If you need to fix some error in my RPN, then here is what it is supposed
to do:

if PUMPE < 0.5 then return UNKN else return INF into OnOff1
if PUMPE < 0.5 then return UNKN else return -INF into OnOff2
Draw both OnOff as an area, just print one label.
INF will not modify the Y-axis, it will just fill the entire vertical
space available. If there are no negative rates, then I do not expect to
see anything from that second CDEF. But if there are negative rates, this
CDEF will show up, and it will look as if it is one big area from -inf to
+inf.

I assumed you enter 0 or 1 for pumpe, and I chose an arbitrary 0.5 as the
cutoff point. You can and should change this value if your situation is
different.

Do not test for being equal to 1 or not.  That won't work if there is any
normalization or consolidation happening.

HTH
Alex




More information about the rrd-users mailing list