Jessie,

the following commit (r1754 in ganglia's svn) seems to be patching the fix
proposed by Jason as part of BUG37 and that was committed in r1595 and has
been left unconsistent (as not all uses of this feature has been converted
to use /dev/null).

I had been unable to reproduce any problem with the original patch using
several different versions of rrdtool, but your comment seems to imply you
had observed the problem somehow, could you elaborate on that?

using "/dev/null" instead was proposed when this patch was last reviewed in
the list as shown in :

  
http://www.mail-archive.com/ganglia-developers@lists.sourceforge.net/msg04522.html

but the solution proposed by Jason has the advantage of being cross-platform
(/dev/null doesn't exist in windows), so if you see no problem with the
original patch I'd suggest you revert yours.

Carlo
---
commit 26fd9a02c6b766b43952e60e33a43abc67ae518b
Author: hawson <[EMAIL PROTECTED]>
Date:   Wed Sep 10 22:24:30 2008 +0000

    Workaround for problem with rrdtool.  rrdtool needs to have an output file
    to do any calculations, including computing averages and other single
    values.  Omitting the filename doens't work, nor does simply piping it
    to STDOUT.  However, using /dev/null as a target file should work.
    
    
    git-svn-id: https://ganglia.svn.sourceforge.net/svnroot/[EMAIL PROTECTED] 
93a4e39c-3214-0410-bb16-828d8e3bcd0f

diff --git a/trunk/monitor-core/web/functions.php 
b/trunk/monitor-core/web/functions.php
index 4e162eb..fb49128 100644
--- a/trunk/monitor-core/web/functions.php
+++ b/trunk/monitor-core/web/functions.php
@@ -259,7 +259,7 @@ function find_avg($clustername, $hostname, $metricname)
      $sum_dir = "$rrds/$clustername/$hostname";
    else
      $sum_dir = "$rrds/$clustername/__SummaryInfo__";
-   $command = RRDTOOL . " graph '' --start $start --end $end ".
+   $command = RRDTOOL . " graph /dev/null --start $start --end $end ".
      "DEF:avg='$sum_dir/$metricname.rrd':'sum':AVERAGE ".
      "PRINT:avg:AVERAGE:%.2lf ";
    exec($command, $out);

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to