Index: /trunk/web/addons/toga/conf.php
===================================================================
--- /trunk/web/addons/toga/conf.php	(revision 162)
+++ /trunk/web/addons/toga/conf.php	(revision 163)
@@ -24,5 +24,5 @@
 // by default localhost's gmetad
 //
-$DATA_SOURCE = '127.0.0.1:8649';
+$DATA_SOURCE = '127.0.0.1:8651';
 
 // Is there a jobarchive?
Index: /trunk/web/addons/toga/image.php
===================================================================
--- /trunk/web/addons/toga/image.php	(revision 162)
+++ /trunk/web/addons/toga/image.php	(revision 163)
@@ -10,4 +10,5 @@
 $clustername = $httpvars->getClusterName();
 
+//printf("clustername = %s\n", $clustername );
 if( isset($id) && ($id!='')) $filter[id]=$id;
 if( isset($state) && ($state!='')) $filter[state]=$state;
@@ -23,5 +24,5 @@
 function drawBigClusterImage() {
 
-	global $filter;
+	global $filter, $clustername;
 
 	$ic = new ClusterImage( $clustername );
Index: /trunk/web/addons/toga/libtoga.php
===================================================================
--- /trunk/web/addons/toga/libtoga.php	(revision 162)
+++ /trunk/web/addons/toga/libtoga.php	(revision 163)
@@ -399,8 +399,9 @@
 	var $xmlhandler, $data, $httpvars;
 
-	function DataGatherer() {
+	function DataGatherer( $cluster ) {
 
 		global $DATA_SOURCE;
-		
+	
+		//printf("dg cluster = %s\n", $cluster );
 		$ds_fields = explode( ':', $DATA_SOURCE );
 		$ds_ip = $ds_fields[0];
@@ -411,5 +412,5 @@
 		$this->parser = xml_parser_create();
 		$this->httpvars = $httpvars;
-		$this->xmlhandler = new TorqueXMLHandler();
+		$this->xmlhandler = new TorqueXMLHandler( $cluster );
 		xml_set_element_handler( $this->parser, array( &$this->xmlhandler, 'startElement' ), array( &$this->xmlhandler, 'stopElement' ) );
 	}
@@ -452,11 +453,13 @@
 class TorqueXMLHandler {
 
-	var $clusters, $heartbeat, $nodes, $jobs;
-
-	function TorqueXMLHandler() {
+	var $clusters, $heartbeat, $nodes, $jobs, $clustername, $proc_cluster;
+
+	function TorqueXMLHandler( $clustername ) {
 		$jobs = array();
 		$clusters = array();
-		$nodes = array();
+		$this->nodes = array();
 		$heartbeat = array();
+		$this->clustername = $clustername;
+		//printf(" cluster set to %s \n", $this->clustername );
 	}
 
@@ -489,22 +492,27 @@
 		$jobid = null;
 
-		// printf( '%s=%s', $attrs[NAME], $attrs[VAL] );
+		//printf( '%s=%s', $attrs[NAME], $attrs[VAL] );
+
+		//printf( "clustername = %s proc_cluster = %s\n", $this->clustername, $this->proc_cluster );
 
 		if( $name == 'CLUSTER' ) {
 
-			$clustername = $attrs[VAL];
-
-			if( !isset( $clusters[$clustername] ) )
-				$clusters[$clustername] = array();
-
-		} else if( $name == 'HOST' ) {
+			$this->proc_cluster = $attrs[NAME];
+			//printf( "Found cluster %s\n", $attrs[NAME] );
+			//print_r( $attrs );
+
+			//if( !isset( $clusters[$clustername] ) )
+			//	$clusters[$clustername] = array();
+
+		} else if( $name == 'HOST' and $this->proc_cluster == $this->clustername) {
 
 			$hostname = $attrs[NAME];
 			$location = $attrs[LOCATION];
+			//printf( "Found node %s\n", $hostname );
 
 			if( !isset( $this->nodes[$hostname] ) )
-				$this->nodes[$hostname] = new NodeImage( $hostname );
-
-		} else if( $name == 'METRIC' and strstr( $attrs[NAME], 'TOGA' ) ) {
+				$nodes[$hostname] = new NodeImage( $hostname );
+
+		} else if( $name == 'METRIC' and strstr( $attrs[NAME], 'TOGA' ) and $this->proc_cluster == $this->clustername ) {
 
 			if( strstr( $attrs[NAME], 'TOGA-HEARTBEAT' ) ) {
@@ -576,5 +584,5 @@
 								$my_node->addJob( $jobid, 1 );
 
-						$this->nodes[$host] = $my_node;
+						$nodes[$host] = $my_node;
 					}
 				}
@@ -582,4 +590,6 @@
 		}
 		$this->jobs = $jobs;
+		//print_r( $nodes );
+		$this->nodes = $nodes;
 	}
 
@@ -625,4 +635,5 @@
 
 	function getNodes() {
+		//print_r( $this->nodes );
 		return $this->nodes;
 	}
@@ -794,5 +805,6 @@
 	function ClusterImage( $clustername ) {
 
-		$this->dataget = new DataGatherer();
+		//printf( "image cluster = %s\n", $clustername );
+		$this->dataget = new DataGatherer( $clustername );
 		$this->clustername = $clustername;
 		$this->filters = array();
Index: /trunk/web/addons/toga/overview.php
===================================================================
--- /trunk/web/addons/toga/overview.php	(revision 162)
+++ /trunk/web/addons/toga/overview.php	(revision 163)
@@ -5,5 +5,5 @@
 //$tpl->assign("_ROOT.summary", "" );
 
-$data_gatherer = new DataGatherer();
+$data_gatherer = new DataGatherer( $clustername );
 
 //$tpl->assign( "self", "./index.php" );
