Sorry to bother the developer group with this issue, but I haven't been
able to resolve in the user group mailing list.  My cluster is fairly
small with only 13 hosts and a queue master that hosts gmetad and the
web front end.

 

The problem is with my web front end (3.1.2) where many of my hosts do
or don't show up in the web GUI. 

 

I instrumented the ganglia.php with the following snippet to include the
creation of a file and the stashing of XML output.  The content of
file.txt has my little text markers in it and ends with the "end of
loop" indicating no error, but the file contains truncated XML.  I
believe the stream either went empty and took the EOF exit, or perhaps
fread is terminating because a packet was received.    See the tail of
file.txt at the bottom.

 

If I do a telnet localhost 8650 or 8651, I get full uncorrupted XML
output with a message at the bottom that says "Connection closed by
foreign host."

 

I did get one piece of feedback on the issue that involved shortening
the bytes to read variable on the fread function, but truncation
continued and in most cases, occurred sooner in the stream, causing even
less hosts to appear.

 

Does anyone have suggestions about where to go with this?

 

$f = fopen("/var/www/html/ganglia/file.txt", "w");

   while(!feof($fp))

      {

         $data = fread($fp, 16384);

         fwrite($f, $data);

         if (!xml_parse($parser, $data, feof($fp)))

            {

               $error = sprintf("XML error: %s at %d",

                  xml_error_string(xml_get_error_code($parser)),

                  xml_get_current_line_number($parser));

               fwrite($f, "\nerror detected\n");

               fclose($f);

               fclose($fp);

               return FALSE;

            }

      fwrite($f, "\nincrement loop\n");

      }

   fwrite($f, "\nend of loop\n");

   fclose($fp);

   fclose($f);

 

 

************ Tail of file.txt *******************

<EXTRA_DATA>

<EXTRA_ELEMENT NAME="GROUP" VAL="cpu"/>

<EXTRA_ELEMENT NAME="DESC" VAL="Total number of CPUs"/>

<EXTRA_ELEMENT NAME="TITLE" VAL="CPU Count"/>

</EXTRA_DATA>

</METRIC>

<METRIC NAME="cpu_speed" VAL="3200" TYPE="uint32" UNITS="MHz" TN="393">

<MAX="1200" DMAX="0" SLOPE="zero">

<EXTRA_DATA>

<EXTRA_ELEMENT NAME="GROUP" VAL="cpu"/>

<EXTRA_ELEMENT NAME="DESC" VAL="CPU Speed in terms of MHz"/>

<EXTRA_ELEMENT NAME="TITLE" VAL="CPU Speed"/>

</EXTRA_DATA>

</METRIC>

<METRIC NAME="pkts_out" VAL="2.75" TYPE="float" UNITS="packets/sec"
TN="251" TMAX="300" DMAX="0" SLOPE="both">

<EXTRA_DATA>

<EXTRA_ELEMENT NAME="GROUP" VAL="network"/>

<EXTRA_ELEMENT NAME="DESC

increment loop

end of loop

 

 

Rich Maes | Senior Logic Engineer
rm...@ciena.com <mailto:rm...@ciena.com>  | 115 North Sullivan Road |
Spokane Valley, WA 99037 USA
Direct +1.509.242.9230 | Mobile +1.509.701.1356 | Fax +1.509.242.9001

 




<<image/gif>>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to