From ae9b42a5f309a46c6a79f87806d45837523874bb Mon Sep 17 00:00:00 2001 From: linggao Date: Wed, 25 Mar 2009 18:47:56 +0000 Subject: [PATCH] minor bug fix git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2990 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/monitoring/pcpmon.pm | 7 +++++-- xCAT-server/lib/xcat/monitoring/xcatmon.pm | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/monitoring/pcpmon.pm b/xCAT-server/lib/xcat/monitoring/pcpmon.pm index 3b7731590..0af1be3ed 100644 --- a/xCAT-server/lib/xcat/monitoring/pcpmon.pm +++ b/xCAT-server/lib/xcat/monitoring/pcpmon.pm @@ -57,8 +57,11 @@ sub start my $value=5; #default my %settings=xCAT_monitoring::monitorctrl->getPluginSettings("pcpmon"); - my $reading=$settings{'ping-interval'}; - if ($reading>0) { $value=$reading;} + my $reading; + if (exists($settings{'ping-interval'})) { + $reading=$settings{'ping-interval'};; + if ($reading>0) { $value=$reading;} + } #create the cron job, it will run the command every 5 minutes(default and can be changed). my $newentry; diff --git a/xCAT-server/lib/xcat/monitoring/xcatmon.pm b/xCAT-server/lib/xcat/monitoring/xcatmon.pm index 60ed67808..9f1f30dfe 100644 --- a/xCAT-server/lib/xcat/monitoring/xcatmon.pm +++ b/xCAT-server/lib/xcat/monitoring/xcatmon.pm @@ -131,8 +131,11 @@ sub startNodeStatusMon #foreach (keys(%settings)) { # print "key=$_, value=$settings{$_}\n"; #} - my $reading=$settings{'ping-interval'}; - if ($reading>0) { $value=$reading;} + my $reading; + if (exists($settings{'ping-interval'})) { + $reading=$settings{'ping-interval'}; + if ($reading>0) { $value=$reading;} + } #create the cron job, it will run the command every 3 minutes. my $newentry;