From 816a852d49c8ee8be9d1bc1362ee715b304ec07c Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Tue, 15 Sep 2009 07:40:14 +0000 Subject: [PATCH] vmstat output on AIX 53V is changed, and make the string match in heathcheck not work. Update script for AIX53V git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4134 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/ib/scripts/healthCheck | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/ib/scripts/healthCheck b/xCAT-server/share/xcat/ib/scripts/healthCheck index 9b06523f5..c191a9719 100644 --- a/xCAT-server/share/xcat/ib/scripts/healthCheck +++ b/xCAT-server/share/xcat/ib/scripts/healthCheck @@ -1035,7 +1035,7 @@ sub memCheckAIX() print $::LOG_FILE_HANDLE "$host total memory is $mem MB. UNEXPECTED small size\n"; } } - if ($line =~ /(\S*):\s*\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+(\d+)/ && defined($::MIN_FREELP)) + elsif ($line =~ /(\S*):\s*\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+(\d+)/ && defined($::MIN_FREELP)) { # Get node hostname and number of free large page $host = $1; @@ -1047,6 +1047,18 @@ sub memCheckAIX() print $::LOG_FILE_HANDLE "$host Free large page is $freelp. UNEXPECTED small size\n"; } } + elsif ($line =~ /(\S*):.*lcpu=(\d+)\s+mem=(\d+)MB/ && defined($::MIN_MEMORY) && $abnormalmem != 1) + { + # Get node hostname and memory size + $host = $1; + $mem = $3; + if ($mem < $::MIN_MEMORY) + { + $abnormalmem = 1; + print "$host total memory is $mem MB. UNEXPECTED small size\n"; + print $::LOG_FILE_HANDLE "$host total memory is $mem MB. UNEXPECTED small size\n"; + } + } } if(!$abnormalmem && defined($::MIN_MEMORY)) {