[rrd-developers] RPN workaround to decrease IFs
Tobias Oetiker
tobi at oetiker.ch
Mon May 16 11:39:47 CEST 2011
Hi Maris,
thanks for the bug report ... COMPUTE is not used very often hence
there might be a bunch of bugs burried there ... my guess (without
looking at the code) is that the system does not properly determine
that it is running out of space for storing the COMPUTE expression.
(since the rrdtool data format has only a rather limited amount of
space for these expressions, that state might be reached quite
quickly.
cheers
tobi
Today Maris Janis Vasilevskis wrote:
> Hi,
>
> rrdtool create causes segmentation fault on COMPUTE with 4 IFs, but work with 3 IFs
> (my environment: Centos 5.5, tested with RRD 1.4.4 and 1.4.5).
> For one of possible workarounds, I should be sure about result of UNKN,0,/ - UNKN or INF?
> Another ideas welcomed.
>
> The task is elementary: computed cpuperc=cpuused/cpuall*100
> 4 data checks required:
> 1) cpuused unknown - result unknown
> 2) cpuall unknown - result unknown
> 3) cpuused>cpuall - bad data, result unknown
> 4) cpuall=0 - result 0
> When I implement them using IF, segmentation fault occurs.
>
> If I remove any of 4 IFs, create works normally.
>
> A full sample causing segfault:
> rrdtool create x1.rrd \
> DS:cpuused:DERIVE:600:0:U \
> DS:cpuall:DERIVE:600:0:U \
> DS:cpuperc:COMPUTE:cpuused,UN,UNKN,cpuall,UN,UNKN,cpuused,cpuall,GT,UNKN,cpuall,0,EQ,0,cpuused,cpuall,/,100,*,IF,IF,IF,IF \
> RRA:AVERAGE:0.5:1:60
>
> Thank you,
> Mahris
>
> _______________________________________________
> rrd-developers mailing list
> rrd-developers at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers
>
>
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900
More information about the rrd-developers
mailing list