[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rrd-developers
Subject:    [rrd-developers] PATCH: Fix looping in rrdgraph
From:       "Peter Stamfest" <peter () stamfest ! at>
Date:       2010-11-08 23:23:36
Message-ID: OFCF4A81EA.2EFD4365-ONC12577D5.007F6A0C-C12577D5.00806F09 () domino ! stamfest ! net
[Download RAW message or body]

--=_mixed 00806C4AC12577D5_=
Content-Type: multipart/alternative;
	boundary="=_alternative 00806C4CC12577D5_="


--=_alternative 00806C4CC12577D5_=
Content-Type: text/plain; charset="US-ASCII"

Find attached a small patch that fixes a problem when using --rigid with 
the graph command.

The problem this patch fixes is reproducible using the following command:

rrdtool  graph a.png --rigid --start 1287948770 --end 1289406370 
--upper-limit 100 --lower-limit -100 DEF:out=/tmp/a.rrd:out:AVERAGE 
CDEF:negout=out,-1,*   AREA:negout#0000ff:out

Unfortunately, I do not have a simple way to create a RRD file exhibiting 
the problem easily, so I have to use a real-life RRD file. The gzipped 
rrddump output has a size of over 300kB, unfortunately, so I am not 
attaching this file here.

The fix also fixes some incorrect graphing of data - the graphics output 
with and without the patch is often different - with the patchless version 
being wrong... That said, I'm not 100% sure that this is the correct fix 
for the problem. It definitly improves the situation, though.

peter


--=_alternative 00806C4CC12577D5_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Find attached a small patch that fixes
a problem when using --rigid with the graph command.</font>
<br>
<br><font size=2 face="sans-serif">The problem this patch fixes is reproducible
using the following command:</font>
<br>
<br><font size=2 face="sans-serif">rrdtool &nbsp;graph a.png --rigid --start
1287948770 --end 1289406370 --upper-limit 100 --lower-limit -100 DEF:out=/tmp/a.rrd:out:AVERAGE
CDEF:negout=out,-1,* &nbsp; AREA:negout#0000ff:out</font>
<br>
<br><font size=2 face="sans-serif">Unfortunately, I do not have a simple
way to create a RRD file exhibiting the problem easily, so I have to use
a real-life RRD file. The gzipped rrddump output has a size of over 300kB,
unfortunately, so I am not attaching this file here.</font>
<br>
<br><font size=2 face="sans-serif">The fix also fixes some incorrect graphing
of data - the graphics output with and without the patch is often different
- with the patchless version being wrong... That said, I'm not 100% sure
that this is the correct fix for the problem. It definitly improves the
situation, though.</font>
<br>
<br><font size=2 face="sans-serif">peter</font>
<br>
<br>
--=_alternative 00806C4CC12577D5_=--
--=_mixed 00806C4AC12577D5_=
Content-Type: application/octet-stream;
	name="fix-large-y-values-make-rrdtool-loop.patch"
Content-Disposition: attachment;
	filename="fix-large-y-values-make-rrdtool-loop.patch"
Content-Transfer-Encoding: base64

ZGlmZiAtdXIgcnJkdG9vbC0xLjQuNC9zcmMvcnJkX2dyYXBoLmMgcnJkdG9vbC0xLjQuNC1maXhl
ZC9zcmMvcnJkX2dyYXBoLmMKLS0tIHJyZHRvb2wtMS40LjQvc3JjL3JyZF9ncmFwaC5jCTIwMTAt
MDctMDUgMTc6Mzg6MjIuMDAwMDAwMDAwICswMjAwCisrKyBycmR0b29sLTEuNC40LW9sZC9zcmMv
cnJkX2dyYXBoLmMJMjAxMC0xMS0wOCAyMToxNDozNS4wMDAwMDAwMDAgKzAxMDAKQEAgLTM0MjMs
NyArMzQyMywxMCBAQAogICAgICAgICAgICAgfQogICAgICAgICAgICAgYnJlYWs7CiAgICAgICAg
IGNhc2UgR0ZfTElORToKLSAgICAgICAgY2FzZSBHRl9BUkVBOgorICAgICAgICBjYXNlIEdGX0FS
RUE6IHsKKwkgICAgcnJkX3ZhbHVlX3QgZGlmZnZhbCA9IGltLT5tYXh2YWwgLSBpbS0+bWludmFs
OworCSAgICBycmRfdmFsdWVfdCBtYXhsaW1pdCA9IGltLT5tYXh2YWwgKyA5ICogZGlmZnZhbDsK
KwkgICAgcnJkX3ZhbHVlX3QgbWlubGltaXQgPSBpbS0+bWludmFsIC0gOSAqIGRpZmZ2YWw7CiAg
ICAgICAgICAgICAvKiBmaXggZGF0YSBwb2ludHMgYXQgb28gYW5kIC1vbyAqLwogICAgICAgICAg
ICAgZm9yIChpaSA9IDA7IGlpIDwgaW0tPnhzaXplOyBpaSsrKSB7CiAgICAgICAgICAgICAgICAg
aWYgKGlzaW5mKGltLT5nZGVzW2ldLnBfZGF0YVtpaV0pKSB7CkBAIC0zNDM0LDYgKzM0MzcsMTIg
QEAKICAgICAgICAgICAgICAgICAgICAgfQogCiAgICAgICAgICAgICAgICAgfQorCQlpZiAoaW0t
PmdkZXNbaV0ucF9kYXRhW2lpXSA+IG1heGxpbWl0KSB7CisJCSAgICBpbS0+Z2Rlc1tpXS5wX2Rh
dGFbaWldID0gbWF4bGltaXQ7CisJCX0KKwkJaWYgKGltLT5nZGVzW2ldLnBfZGF0YVtpaV0gPCBt
aW5saW1pdCkgeworCQkgICAgaW0tPmdkZXNbaV0ucF9kYXRhW2lpXSA9IG1pbmxpbWl0OworCQl9
CiAgICAgICAgICAgICB9ICAgICAgICAgICAvKiBmb3IgKi8KIAogICAgICAgICAgICAgLyogKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgpAQCAt
MzY1OSw2ICszNjY4LDcgQEAKICAgICAgICAgICAgIH0KICAgICAgICAgICAgIGxhc3RnZGVzID0g
JihpbS0+Z2Rlc1tpXSk7CiAgICAgICAgICAgICBicmVhazsKKwl9CiAgICAgICAgIGNhc2UgR0Zf
U1RBQ0s6CiAgICAgICAgICAgICBycmRfc2V0X2Vycm9yCiAgICAgICAgICAgICAgICAgKCJTVEFD
SyBzaG91bGQgYWxyZWFkeSBiZSB0dXJuZWQgaW50byBMSU5FIG9yIEFSRUEgaGVyZSIpOwo=

--=_mixed 00806C4AC12577D5_=
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
rrd-developers mailing list
rrd-developers@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers

--=_mixed 00806C4AC12577D5_=--


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic