[rrd-users] Graph Difficulty Patch
Tobias Oetiker
oetiker at ee.ethz.ch
Wed Nov 3 07:44:11 MET 1999
Today you sent me mail regarding Re: [rrd-users] Re: Graph Difficulty [long...:
*> > yep ... I know ... but I realy hate it when people send 1 megabyte mails to
*> > the list ... I thought about deleting it without even looking at it ...
*> >
*>
*> "bit" sorter, same result:
*>
*> #!/bin/bash
*>
*> rrdtool create test.rrd -b 941580000 DS:a:GAUGE:600:U:U RRA:AVERAGE:0.5:1:20
*>
*> rrdtool update test.rrd 941580300:32768 941580600:49152
*> rrdtool update test.rrd 941580900:32768 941581200:49152
*> rrdtool update test.rrd 941581500:32768 941581800:49152
*> rrdtool update test.rrd 941582100:32768
*>
*> rrdtool graph test1.png -s 941580600 -e 941581800 \
*> DEF:a=test.rrd:a:AVERAGE LINE2:a#FF0000
*> rrdtool graph test2.png -s 941580600 \
*> DEF:a=test.rrd:a:AVERAGE LINE2:a#FF0000
*>
thanks ... and here is the patch ...
--- rrd_graph.c~ Sun Oct 24 14:15:49 1999
+++ rrd_graph.c Wed Nov 3 07:41:35 1999
@@ -1186,16 +1186,15 @@
if (! isnan(value)) {
paintval += value;
im->gdes[ii].p_data[i] = paintval;
+ if (finite(paintval)){
+ if (isnan(minval) || paintval < minval)
+ minval = paintval;
+ if (isnan(maxval) || paintval > maxval)
+ maxval = paintval;
+ }
} else {
im->gdes[ii].p_data[i] = DNAN;
}
-
- if (finite(paintval)){
- if (isnan(minval) || paintval < minval)
- minval = paintval;
- if (isnan(maxval) || paintval > maxval)
- maxval = paintval;
- }
break;
case GF_PRINT:
case GF_GPRINT:
--
* To unsubscribe from the rrd-users mailing list, send a message with the
subject: unsubscribe to rrd-users-request at list.ee.ethz.ch
More information about the rrd-users
mailing list