From: dusteur@excite.com
I was having this problem too.
however, I found that this bug-fix alone didn't allow me to graph both averages and maximums
all in different colours.
I have a work-around - not really a bug-fix as it doesn't address the underlying bug,
but if you repeat the lines in grapher.cgi:
1369,1371d1368
< $colormax = graphParam($gRef, 'max-color',
< nextColor($colorRef));
< usedColor($colormax);
so they appear twice consectutively - again the line numbers are probably slightly out - then
the problem is overcome, and we get unique colours for each line on the graph.
I have also knocked up a small module called GetStats.pm which uses rrdtool to extract
the stats for a router interface over a set time period and return the average
for that time, which I'm using to produce MRTG style stats for daily,weekly,monthly,yearly
averages on the graphs. This works independently, but I also have some changes
to grapher.cgi to put it on the graphs.
If you want the code, drop me a line. Its probably not perfect for inclusion into
the Cricket baseline, but changes for other peoples implementations should be minimal.
Also - I haven't had any mail from one.list for about 5 days. and sugarat.net hasn't been
updated since saturday (or not via my ISP anyway). anyone know why?
Ryan Duffy.
dusteur@excite.com
Date: Mon, 27 Sep 1999 16:10:59 -0600
From: David Mitchell <mitchell@xxx.xxxx.xxxx
Subject: Bug fix for "show max"
I finally got around to tracking down some bugs in the
grapher.cgi code which display the maximum value for a datasource.
The short version is that in a couple of places, grapher.cgi pushes
the wrong stuff onto the command line for RRD. In the first change,
the $ got left off, so it pushes the name of the variable instead
of it's value. I wasn't actually hitting this bug, but I found it
when I was trying to find the second bug.
The second bug pushes the wrong color onto the command. Instead of
using $clmxCode it uses $colorCode. As a result, no matter how hard
you try and change it, the "max" graph is always the same color as
the "average" graph. Not very useful.
If you are running into this problem, here are diffs of the two changes.
You should probably change them by hand, since I think the line numbers
are a little off due to other changes I've made.
Also, if Jeff Allen or one of the other WebTV folks is on this
list, could you please put this fix in the code so it shows up
in 0.71? Thanks in advance,
-David Mitchell
1369c1371
< push @lines,
"$drawAs:totmx$mod#clmxCode:" .
---
> push @lines, "$drawAs:totmx$mod#$clmxCode:" .
1388c1390
< push @lines,
"$drawAs:mx$ct#$colorCode:" .
---
> push @lines, "$drawAs:mx$ct#$clmxCode:" .
-------------------------------------------
David Mitchell Network Engineer III
mitchell@ucar.edu National Center for
x1845 Atmospheric Research
-------------------------------------------
--------------------------- ONElist Sponsor ----------------------------
GET 2 FREE MUSIC CDS AND LOWER YOUR PHONE BILL! ACT NOW!
Sign up for Qwest long distance at Shopnow.com and receive 2 free music
CDs, huge savings on long distance, plus special deals! Expires 9/30!
<a href=" http://clickme.onelist.com/ad/shopnow1 ">Click Here</a>
------------------------------------------------------------------------
This archive was generated by hypermail 2b29 : Mon Mar 06 2000 - 19:01:03 PST