Here's a patch that modifies the footer to include rrdtool's version.  I
simply run rrdtool without arguments, grab the output, tokenize it to grab
the second word of the first line, and assign that into the footer template.
I also changed "Gmetad frontend/backend" to "Ganglia frontend/backend"
because the package/suite is called Ganglia, right?  I didn't add a "check
for updates" to rrdtool but that could be done I suppose.

 

In other news (none of the following are included in the above patch):

 

I have looked at Ulf's changes to graph.php to use a "fudge factor" to make
the graphs the same size, and I have to say that I think that approach
should be used temporarily.  I have been working on changes that get rid of
the static z=small/medium/whatever attribute and simply have sx=<width> and
sy=<height> attributes instead.  In connection with those changes, I have
removed all dimension specifications in the <IMG> tags in the templates
because they were forcing the graphs to be a size other than they were
created as, which produced unsightly aliasing artifacts.  The root of the
problem is that rrdtool's -width and -height options do not, as of yet,
allow you to specify the output image's dimensions, only the inner graph
area's dimensions.  I have submitted a patch to rrdtool to change this by
adding a --full-size-mode flag to change the default behavior.  If and when
that version is released, I suggest we move over to the exact system of
specifying dimensions directly from the template files.  I of course have
been shell escaping the sx and sy attributes and even clamped them to
reasonable defaults (0 < dim < 1920/1280 depending on whether it's width or
height, or something like that; you never know, maybe people are watching
Ganglia in widescreen ;) ).

 

Another issue I looked at is that in the most recent version of rrdtool
(1.2.23), this bit of code does not work like it did with older versions (I
don't know exactly when it stopped working):

         if (file_exists("$rrd_dir/$metricname.rrd")) {

            $command = RRDTOOL . " graph - --start $start --end $end ".

                       "DEF:limits='$rrd_dir/$metricname.rrd':'sum':AVERAGE
".

                       "PRINT:limits:MAX:%.2lf ".

                       "PRINT:limits:MIN:%.2lf";

            exec($command, $out);

         if(isset($out[1])) {

            $thismax = $out[1];

         } else {

            $thismax = NULL;

         }

The problem is that the report does not print when the output file is '-'
(standard output), for what reason I don't know.  The rrdtool folks don't
really seem to think it's important.  So I changed it to /dev/null and it
works.  Not portable, but that's ok right? :)  Some kind soul with commit
privileges can change that one argument themselves and commit it. It's right
after "graph" and right before "--start" ;)

Attachment: rrdtool-version-patch.diff
Description: Binary data

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to