From af0a034e90945e93dec553bd03faad0d01329c0d Mon Sep 17 00:00:00 2001 From: lissav Date: Mon, 28 Sep 2009 17:32:16 +0000 Subject: [PATCH] add check in preprocess for nmap installed, if installed skip hierarchy git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4251 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/nodestat.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/nodestat.pm b/xCAT-server/lib/xcat/plugins/nodestat.pm index caf13549d..83779d546 100644 --- a/xCAT-server/lib/xcat/plugins/nodestat.pm +++ b/xCAT-server/lib/xcat/plugins/nodestat.pm @@ -84,8 +84,10 @@ sub preprocess_request my $nodes = $req->{node}; my $service = "xcat"; my @requests; - if ($nodes){ - return [$req]; #For now, do not distribute, nodestat seems to lose accuracy and slow down distributed + if ($nodes){ + if (-x '/usr/bin/nmap' or -x '/usr/local/bin/nmap') { + return [$req]; #For now, do not distribute, nodestat seems to lose accuracy and slow down distributed, if using nmap + } # find service nodes for requested nodes # build an individual request for each service node my $sn = xCAT::Utils->get_ServiceNode($nodes, $service, "MN");