From 0cfb917de20fbf436aebbf3288a7bd008c5b27c9 Mon Sep 17 00:00:00 2001 From: linggao Date: Tue, 24 Mar 2009 19:29:45 +0000 Subject: [PATCH] performace tuning for monitorctrl.pm git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2971 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/monitoring/monitorctrl.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/monitoring/monitorctrl.pm b/xCAT-server/lib/xcat/monitoring/monitorctrl.pm index cd72637ed..d5a23988e 100644 --- a/xCAT-server/lib/xcat/monitoring/monitorctrl.pm +++ b/xCAT-server/lib/xcat/monitoring/monitorctrl.pm @@ -848,6 +848,7 @@ sub getNodeMonServerPair { my $table2=xCAT::Table->new("noderes", -create =>1); my $tabdata = $table2->getNodesAttribs(\@nodes,['monserver', 'servicenode', 'xcatmaster']); + my $sitemaster=xCAT::Utils->get_site_attribute('master'); foreach my $node (@nodes) { my $monserver; my $monmaster; @@ -865,7 +866,7 @@ sub getNodeMonServerPair { if ($tmp2->{servicenode}) { $monserver=$tmp2->{servicenode}; } if ($tmp2->{xcatmaster}) { $monmaster=$tmp2->{xcatmaster}; } if (!$monserver) { $monserver="noservicenode"; } - if (!$monmaster) { $monmaster=xCAT::Utils->get_site_attribute('master'); } + if (!$monmaster) { $monmaster=$sitemaster; } $pairs="$monserver:$monmaster"; } #print "node=$node, pairs=$pairs\n";