<!-- $Id: A300AS1013_lna.xml,v 1.7 2007/11/21 16:24:38 mschenke Exp $ -->
<!-- ARCS: $Header: /home/cvs/repository/RDA_4/src/scripting/lib/hcve/A300AS1013_lna.xml,v 1.7 2007/11/21 16:24:38 mschenke Exp $ -->
<!--  Change History: 20071121  DEM  Modify documentation -->
<hcve name="Oracle Application Server 10g R3 (10.1.3) PreInstall (Linux AMD64)" type="A" product="AS1013" platform="linux-amd64">
<rule condition="==" id="10" maximum="N" mode="RECORD" name="OS Type" repeat="1" command_type="RDA">
<command><![CDATA[import $OS_TYP,$OS_NAM
call setHcveResult(concat($OS_TYP,' ',$OS_NAM))
]]></command>
<description><![CDATA[This rule retrieves the OS type.]]></description>
<action type="negative" syntax="wiki"><![CDATA[NA]]></action>
<action type="positive"><![CDATA[NA]]></action>
</rule>
<rule condition="==" id="20" maximum="N" mode="RECORD" name="Processor Type" repeat="1" command_type="RDA">
<command><![CDATA[var @CPU = ()
call setHcveVariable('@CPU')
if !testFile('r','/proc/cpuinfo')
 return setHcveResult('Cannot access /proc/cpuinfo')
var @CPU = grepFile('/proc/cpuinfo','.')
var ($CPU) = grep(@CPU,'Itanium','if')
call setHcveResult(cond(\
  grep(@CPU,'model name','if'),\
        field('\s+:\s+',1,grep(@CPU,'model name','if')),\
  $CPU, 'Itanium',\
        'Model name not found'))
]]></command>
<description><![CDATA[This rule gets the processor type. The minimum requirement for the processor type is Pentium (32-bit).]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Cannot access /proc/cpuinfo|Grant read permission on /proc/cpuinfo to the current user.|]]></action>
<action type="positive"><![CDATA[NA]]></action>
</rule>
<rule condition="&gt;=" id="22" maximum="N" minimum="450" mode="VERIFY" name="Processor Speed" repeat="1" command_type="RDA">
<command><![CDATA[import @CPU
if !defined($CPU[0])
 return setHcveResult('Cannot access /proc/cpuinfo')
call setHcveResult(field('\s+:\s+',1,grep(@CPU,'cpu MHz','f')))
]]></command>
<description><![CDATA[This rule checks for the processor speed. The minimum requirement for the processor speed is 450 MHz or faster.]]></description>
<action type="negative" syntax="wiki"><![CDATA[The minimum requirement for the processor speed is 450 MHz or faster.
|*Return Value*|*Action*|
|Processor speed|Use a processor with a speed of 450 MHz or faster.|
|Cannot access /proc/cpuinfo|Grant read permission on /proc/cpuinfo to the current user.|]]></action>
<action type="positive"><![CDATA[The minimum requirement for the processor speed is met.]]></action>
</rule>
<rule condition="=~" id="30" maximum="N" minimum="Connected|Not connected. Check log." mode="VERIFY" name="Network" repeat="1" command_type="RDA">
<command><![CDATA[call setHcveResult(cond(\
  not(testFile('x','/sbin/ifconfig')),     'Cannot access /sbin/ifconfig',\
  grepCommand('/sbin/ifconfig','eth','f'), 'Connected',\
                                           'Not connected. Check log.'))
]]></command>
<description><![CDATA[This rule checks that the machine is connected to the network. You can install Oracle Application Server 10g on a standalone machine that is not connected to the network or on a machine that is connected to the network. Although both cases are supported, when the machine is not connected to the network, you must configure the machine to resolve the host name of the computer to either a static IP address or a loopback IP address. To access Oracle Application Server, you must use a local browser. For more information, see the ''Oracle Application Server 10g Installation Guide''.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Cannot access /sbin/ifconfig|Grant execute permission on /sbin/ifconfig to the current user.|]]></action>
<action type="positive"><![CDATA[The machine is connected to the network.]]></action>
</rule>
<rule condition="==" id="40" maximum="N" mode="RECORD" name="Memory Available" repeat="1" command_type="RDA">
<command><![CDATA[var $MEM = undef
call setHcveVariable('$MEM')
if !testFile('r','/proc/meminfo')
 return setHcveResult('Cannot access /proc/meminfo')
var $MEM = field('\s+',1,grepFile('/proc/meminfo','MemTotal','f'))
call setHcveResult(concat($MEM,' KB'))
]]></command>
<description><![CDATA[This rule retrieves the available physical memory in KB.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Cannot access /proc/meminfo|Grant read permission on /proc/meminfo to the current user.|]]></action>
<action type="positive"><![CDATA[NA]]></action>
</rule>
<rule condition="=~" id="42" maximum="N" minimum="Available" mode="VERIFY" name="Memory Required" repeat="1" command_type="RDA">
<command><![CDATA[import $MEM
call setHcveResult(cond(\
  not(defined($MEM)),      'Cannot access /proc/meminfo',\
  expr('>=',$MEM,1000000), 'Available',\
                           'Need at least 1 GB'))
]]></command>
<description><![CDATA[This rule checks that the machine has enough memory to install Oracle Application Server 10g or later. The minimum requirement is 1 GB.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 1 GB|Increase the memory to 1 GB or more to install Oracle Application Server 10g or later.|
|Cannot access /proc/meminfo|Grant read permission on /proc/meminfo to the current user.|]]></action>
<action type="positive"><![CDATA[The machine has enough memory to install Oracle Application Server 10g or later.]]></action>
</rule>
<rule condition="==" id="50" maximum="N" mode="RECORD" name="Disk Space" repeat="1" command_type="RDA">
<command><![CDATA[var $ORACLE_HOME = getEnv('ORACLE_HOME')
var $DF = cond(\
  not($ORACLE_HOME),              'ORACLE_HOME is not set',\
  not(testDir('d',$ORACLE_HOME)), 'Cannot access ORACLE_HOME',\
                                  get_df($ORACLE_HOME))
call setHcveVariable('$DF')
call setHcveResult(cond(isNumber($DF),concat($DF,' MB'),$DF))
]]></command>
<description><![CDATA[This rule retrieves the available disk space.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|ORACLE_HOME is not set|Set ORACLE_HOME environment variable.|
|Cannot access ORACLE_HOME|Set ORACLE_HOME to a valid directory.|]]></action>
<action type="positive"><![CDATA[No action is required.]]></action>
</rule>
<rule condition="=~" id="52" maximum="N" minimum="Available" mode="VERIFY" name="Space for 10.1.3.0" repeat="1" command_type="RDA">
<command><![CDATA[import $DF
call setHcveResult(cond(\
  not(isNumber($DF)), $DF,\
  expr('>=',$DF,700), 'Available',\
                      'Need at least 700 MB'))
]]></command>
<description><![CDATA[This rule checks that the machine has enough disk space to install the AS 10.1.3.0 install type. The minimum requirement is 700 MB.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 700 MB|Increase the available space to 700 MB or more to install the AS 10.1.3.0 install type.|
|ORACLE_HOME is not set|Set the ORACLE_HOME environment variable.|
|Cannot access ORACLE_HOME|Set ORACLE_HOME to a valid directory.|]]></action>
<action type="positive"><![CDATA[The machine has enough disk space to install the AS 10.1.3.0 install type.]]></action>
</rule>
<rule condition="=~" id="54" maximum="N" minimum="Available" mode="VERIFY" name="Space for J2EE/SOA (10.1.3.1)" repeat="1" command_type="RDA">
<command><![CDATA[import $DF
call setHcveResult(cond(\
  not(isNumber($DF)),  $DF,\
  expr('>=',$DF,1000), 'Available',\
                       'Need at least 1 GB'))
]]></command>
<description><![CDATA[This rule checks that the machine has enough disk space to install the J2EE Server and Oracle SOA Suite install type. The minimum requirement is 1 GB.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 1 GB|Increase the available space to 1 GB or more to install the J2EE Server and Oracle SOA Suite install type.|
|ORACLE_HOME is not set|Set the ORACLE_HOME environment variable.|
|Cannot access ORACLE_HOME|Set ORACLE_HOME to a valid directory.|]]></action>
<action type="positive"><![CDATA[The machine has enough disk space to install the J2EE Server and Oracle SOA Suite install type.]]></action>
</rule>
<rule condition="=~" id="56" maximum="N" minimum="Available" mode="VERIFY" name="Space for J2EE/Web/SOA (10.1.3.1)" repeat="1" command_type="RDA">
<command><![CDATA[import $DF
call setHcveResult(cond(\
  not(isNumber($DF)),  $DF,\
  expr('>=',$DF,1050), 'Available',\
                       'Need at least 1.05 GB'))
]]></command>
<description><![CDATA[This rule checks that the machine has enough disk space to install the J2EE Server, Web Server, and Oracle SOA Suite install type. The minimum requirement is 1.05 GB.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 1.05 GB|Increase the available space to 1.05 GB or more to install the J2EE Server, Web Server, and Oracle SOA Suite install type.|
|ORACLE_HOME is not set|Set the ORACLE_HOME environment variable.|
|Cannot access ORACLE_HOME|Set ORACLE_HOME to a valid directory.|]]></action>
<action type="positive"><![CDATA[The machine has enough disk space to install the J2EE Server, Web Server, and Oracle SOA Suite install type.]]></action>
</rule>
<rule condition="=~" id="58" maximum="N" minimum="Available" mode="VERIFY" name="Space for J2EE/Web (10.1.3.1)" repeat="1" command_type="RDA">
<command><![CDATA[import $DF
call setHcveResult(cond(\
  not(isNumber($DF)), $DF,\
  expr('>=',$DF,650), 'Available',\
                      'Need at least 650 MB'))
]]></command>
<description><![CDATA[This rule checks that the machine has enough disk space to install the J2EE Server and Web Server install type. The minimum requirement is 650 MB.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 650 MB|Increase the available space to 650 MB or more to install the J2EE Server and Web Server install type.|
|ORACLE_HOME is not set|Set the ORACLE_HOME environment variable.|
|Cannot access ORACLE_HOME|Set ORACLE_HOME to a valid directory.|]]></action>
<action type="positive"><![CDATA[The machine has enough disk space to install the J2EE Server and Web Server install type.]]></action>
</rule>
<rule condition="=~" id="60" maximum="N" minimum="Available" mode="VERIFY" name="Space for J2EE (10.1.3.1)" repeat="1" command_type="RDA">
<command><![CDATA[import $DF
call setHcveResult(cond(\
  not(isNumber($DF)), $DF,\
  expr('>=',$DF,625), 'Available',\
                      'Need at least 625 MB'))
]]></command>
<description><![CDATA[This rule checks that the machine has enough disk space to install the J2EE Server install type. The minimum requirement is 625 MB.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 625 MB|Increase the available space to 625 MB or more to install the J2EE Server install type.|
|ORACLE_HOME is not set|Set the ORACLE_HOME environment variable.|
|Cannot access ORACLE_HOME|Set ORACLE_HOME to a valid directory.|]]></action>
<action type="positive"><![CDATA[The machine has enough disk space to install the J2EE Server install type.]]></action>
</rule>
<rule condition="=~" id="62" maximum="N" minimum="Available" mode="VERIFY" name="Space for Web (10.1.3.1)" repeat="1" command_type="RDA">
<command><![CDATA[import $DF
call setHcveResult(cond(\
  not(isNumber($DF)), $DF,\
  expr('>=',$DF,500), 'Available',\
                      'Need at least 500 MB'))
]]></command>
<description><![CDATA[This rule checks that the machine has enough disk space to install the Web Server install type. The minimum requirement is 500 MB.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 500 MB|Increase the available space to 500 MB or more to install the Web Server install type.|
|ORACLE_HOME is not set|Set the ORACLE_HOME environment variable.|
|Cannot access ORACLE_HOME|Set ORACLE_HOME to a valid directory.|]]></action>
<action type="positive"><![CDATA[The machine has enough disk space to install the Web Server install type.]]></action>
</rule>
<rule condition="=~" id="64" maximum="N" minimum="Available" mode="VERIFY" name="Space for 10.1.3.2" repeat="1" command_type="RDA">
<command><![CDATA[import $DF
call setHcveResult(cond(\
  not(isNumber($DF)), $DF,\
  expr('>=',$DF,788), 'Available',\
                      'Need at least 788 MB'))
]]></command>
<description><![CDATA[This rule checks that the machine has enough disk space to install the 10.1.3.2 basic install type. The minimum requirement is 788 MB.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 788 MB|Increase the available space to 788 MB or more to install the 10.1.3.2 basic install type.|
|ORACLE_HOME is not set|Set the ORACLE_HOME environment variable.|
|Cannot access ORACLE_HOME|Set ORACLE_HOME to a valid directory.|]]></action>
<action type="positive"><![CDATA[The machine has enough disk space to install the 10.1.3.2 basic install type.]]></action>
</rule>
<rule condition="=~" id="66" maximum="N" minimum="Available" mode="VERIFY" name="Space for WebCenter/HTTP (10.1.3.2)" repeat="1" command_type="RDA">
<command><![CDATA[import $DF
call setHcveResult(cond(\
  not(isNumber($DF)), $DF,\
  expr('>=',$DF,755), 'Available',\
                      'Need at least 755 MB'))
]]></command>
<description><![CDATA[This rule checks that the machine has enough disk space to install the Oracle WebCenter Framework with Oracle HTTP Server install type. The minimum requirement is 755 MB.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 755 MB|Increase the available space to 755 MB or more to install the Oracle WebCenter Framework with Oracle HTTP Server install type.|
|ORACLE_HOME is not set|Set the ORACLE_HOME environment variable.|
|Cannot access ORACLE_HOME|Set ORACLE_HOME to a valid directory.|]]></action>
<action type="positive"><![CDATA[The machine has enough disk space to install the Oracle WebCenter Framework with Oracle HTTP Server install type.]]></action>
</rule>
<rule condition="=~" id="68" maximum="N" minimum="Available" mode="VERIFY" name="Space for Content Database (10.1.3.2)" repeat="1" command_type="RDA">
<command><![CDATA[import $DF
call setHcveResult(cond(\
  not(isNumber($DF)), $DF,\
  expr('>=',$DF,708), 'Available',\
                      'Need at least 708 MB'))
]]></command>
<description><![CDATA[This rule checks that the machine has enough disk space to install the Oracle Content Database install type. The minimum requirement is 708 MB.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 708 MB|Increase the available space to 708 MB or more to install the Oracle Content Database install type.|
|ORACLE_HOME is not set|Set the ORACLE_HOME environment variable.|
|Cannot access ORACLE_HOME|Set ORACLE_HOME to a valid directory.|]]></action>
<action type="positive"><![CDATA[The machine has enough disk space to install the Oracle Content Database install type.]]></action>
</rule>
<rule condition="=~" id="70" maximum="N" minimum="Available" mode="VERIFY" name="Space for WebCenter (10.1.3.2)" repeat="1" command_type="RDA">
<command><![CDATA[import $DF
call setHcveResult(cond(\
  not(isNumber($DF)), $DF,\
  expr('>=',$DF,615), 'Available',\
                      'Need at least 615 MB'))
]]></command>
<description><![CDATA[This rule checks that the machine has enough disk space to install the Oracle WebCenter Framework install type. The minimum requirement is 615 MB.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 615 MB|Increase the available space to 615 MB or more to install the Oracle WebCenter Framework install type.|
|ORACLE_HOME is not set|Set the ORACLE_HOME environment variable.|
|Cannot access ORACLE_HOME|Set ORACLE_HOME to a valid directory.|]]></action>
<action type="positive"><![CDATA[The machine has enough disk space to install the Oracle WebCenter Framework install type.]]></action>
</rule>
<rule condition="=~" id="72" maximum="N" minimum="Available" mode="VERIFY" name="Space for HTTP (10.1.3.2)" repeat="1" command_type="RDA">
<command><![CDATA[import $DF
call setHcveResult(cond(\
  not(isNumber($DF)), $DF,\
  expr('>=',$DF,474), 'Available',\
                      'Need at least 474 MB'))
]]></command>
<description><![CDATA[This rule checks that the machine has enough disk space to install the Oracle HTTP Server install type. The minimum requirement is 474 MB.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 474 MB|Increase the available space to 474 MB or more to install the Oracle HTTP Server install type.|
|ORACLE_HOME is not set|Set the ORACLE_HOME environment variable.|
|Cannot access ORACLE_HOME|Set ORACLE_HOME to a valid directory.|]]></action>
<action type="positive"><![CDATA[The machine has enough disk space to install the Oracle HTTP Server install type.]]></action>
</rule>
<rule condition="==" id="80" maximum="N" minimum="Available" mode="VERIFY" name="Space in tmp" repeat="1" command_type="RDA">
<command><![CDATA[var $TMP = nvl(getEnv('TMP'),getEnv('TMPDIR'),'/tmp')
call setHcveResult(cond(\
  not(testDir('d',$TMP)),      'Cannot access tmp directory',\
  expr('>=',get_df($TMP),400), 'Available',\
                               'Need at least 400 MB'))
]]></command>
<description><![CDATA[This rule checks that the machine has enough tmp space. Initially Oracle Universal Installer (OUI) checks the TMP and TMPDIR environment variables to locate the temporary directory. If these environment variables do not exist, then OUI uses /tmp. The minimum requirement is 400 MB.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 400 MB|Increase the available tmp space to 400 MB or more. You can define TMP or TMPDIR to point to a directory with 400 MB available space.|
|Cannot access tmp directory|Grant read and write permission on /tmp or directories in TMP or TMPDIR to the current user.|]]></action>
<action type="positive"><![CDATA[The machine has enough tmp space.]]></action>
</rule>
<rule condition="==" id="90" maximum="N" minimum="Available" mode="VERIFY" name="Swap Space for 10.1.3.0/10.1.3.1" repeat="1" command_type="RDA">
<command><![CDATA[import $MEM
call setHcveResult(cond(\
  not(defined($MEM)),     'Cannot access /proc/meminfo',\
  expr('>=',$MEM,512000), 'Available',\
                          'Need at least 512 MB'))
]]></command>
<description><![CDATA[This rule checks that the machine has enough swap space for 10.1.3.0 and 10.1.3.1 only. The minimum requirement is 512 MB.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 512 MB|Increase the swap space to 512 MB or more.|
|Cannot access /proc/meminfo|Grant read permission on /proc/meminfo to the current user.|]]></action>
<action type="positive"><![CDATA[The machine has enough swap space.]]></action>
</rule>
<rule condition="==" id="92" maximum="N" minimum="Available" mode="VERIFY" name="Swap Space for 10.1.3.2" repeat="1" command_type="RDA">
<command><![CDATA[import $MEM
call setHcveResult(cond(\
  not(defined($MEM)),      'Cannot access /proc/meminfo',\
  expr('>=',$MEM,2000000), 'Available',\
                           'Need at least 2 GB'))
]]></command>
<description><![CDATA[This rule checks that the machine has enough swap space for 10.1.3.2 only. The minimum requirement is 2 GB.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 2 GB|Increase the swap space to 2 GB or more.|
|Cannot access /proc/meminfo|Grant read permission on /proc/meminfo to the current user.|]]></action>
<action type="positive"><![CDATA[The machine has enough swap space.]]></action>
</rule>
<rule condition="==" id="100" maximum="N" minimum="Adequate" mode="VERIFY" name="Monitor Colors" repeat="1" command_type="RDA">
<command><![CDATA[call loadCommand('/usr/X11R6/bin/xdpyinfo 2>&1')
var @dpt = grepLastFile('depths')
call setHcveResult(cond(\
  grep(@dpt,'8','f'),              'Adequate',\
  not(defined(getEnv('DISPLAY'))), 'DISPLAY is not set',\
  grepLastFile('unable','f'),      'Cannot open DISPLAY',\
                                   'Need at least 256 colors'))
]]></command>
<description><![CDATA[This rule checks that the monitor has a minimum of 256 colors.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need at least 256 colors|Use a display with 256 colors.|
|DISPLAY is not set|Set the DISPLAY environment variable to a valid display.|
|Cannot open DISPLAY|Set the DISPLAY environment variable to a correct display.|]]></action>
<action type="positive"><![CDATA[The monitor has enough colors.]]></action>
</rule>
<rule condition="==" id="110" maximum="N" minimum="Certified" mode="VERIFY" name="OS Certified?" repeat="1" command_type="RDA">
<command><![CDATA[import $OS_NAM,$OS_TYP
macro chk_release
{import $OS_NAM
 if match($OS_NAM,'Update\s+(\d+)',true)
  return last
}
call setHcveResult(check($OS_TYP,\
  'Enterprise',check(lc($OS_NAM),\
    'october','Certified',\
              'Not certified [Enterprise version]'),\
  'Red Hat',check(lc($OS_NAM),\
    'taroon',cond(\
      expr('>=',chk_release(),3), 'Certified',\
                                  'Not certified [RH version]'),\
    'nahant',cond(\
      expr('>=',chk_release(),1), 'Certified',\
                                  'Not certified [RH version]'),\
                                  'Not certified [RH version]'),\
  'SuSE',check($OS_NAM,\
    'SLES-9','Certified',\
             'Not certified [SUSE version]'),\
  'Not certified [OS]'))
]]></command>
<description><![CDATA[This rule checks that the operating system is certified. The following operating systems are certified for Oracle Application Server 10g: Red Hat Enterprise Linux AS/ES 3.0 - Red Hat Enterprise Linux AS/ES 4.0 - SUSE Linux Enterprise Server 9.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Not certified ...|You must use one of the listed certified operating systems.|]]></action>
<action type="positive"><![CDATA[The operating system is certified.]]></action>
</rule>
<rule condition="=~" id="120" maximum="N" minimum="EL4rpmsOK|NotEL4|NotEnterprise" mode="VERIFY" name="EL4 RPMs OK?" repeat="1" command_type="RDA">
<command><![CDATA[import $OS_NAM,$OS_TYP
if !match($OS_TYP,'Enterprise')
 call setHcveResult('NotEnterprise')
elsif !match($OS_NAM,'october',true)
 call setHcveResult('NotEL4')
else
{var @tbl = ()
 call cmp_os_pkg(\@tbl,'binutils','2.15.92.0.2.13','x86_64')
 call cmp_os_pkg(\@tbl,'compat-db','4.1.25.9','i386')
 call cmp_os_pkg(\@tbl,'compat-db','4.1.25.9','x86_64')
 call cmp_os_pkg(\@tbl,'control-center','2.8.0.12','x86_64')
 call cmp_os_pkg(\@tbl,'gcc','3.4.3.22.1','x86_64')
 call cmp_os_pkg(\@tbl,'gcc-c++','3.4.3.22.1','x86_64')
 call cmp_os_pkg(\@tbl,'glibc','2.3.4.2.9','i686')
 call cmp_os_pkg(\@tbl,'glibc','2.3.4.2.9','x86_64')
 call cmp_os_pkg(\@tbl,'glibc-common','2.3.4.2.9','x86_64')
 call cmp_os_pkg(\@tbl,'glibc-devel','2.3.4.2.9','x86_64')
 call cmp_os_pkg(\@tbl,'gnome-libs','1.4.1.2.90.44.1','x86_64')
 call cmp_os_pkg(\@tbl,'libstdc++','3.4.3.22.1','i386')
 call cmp_os_pkg(\@tbl,'libstdc++','3.4.3.22.1','x86_64')
 call cmp_os_pkg(\@tbl,'libstdc++-devel','3.4.3.22.1','i386')
 call cmp_os_pkg(\@tbl,'libstdc++-devel','3.4.3.22.1','x86_64')
 call cmp_os_pkg(\@tbl,'make','3.80.5','x86_64')
 call cmp_os_pkg(\@tbl,'openmotif21','2.1.30.11.4/RHEL4','i386')
 call cmp_os_pkg(\@tbl,'pdksh','5.2.14.30','x86_64')
 call cmp_os_pkg(\@tbl,'setarch','1.6.1','x86_64')
 call cmp_os_pkg(\@tbl,'sysstat','5.0.5.1','x86_64')
 call cmp_os_pkg(\@tbl,'xscreensaver','4.18.5.2/rhel4','x86_64')
 call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'EL4rpmsOK'))
}]]></command>
<description><![CDATA[This rule verifies that the correct versions of the required RPMs are installed on an Enterprise Linux 4 system.]]></description>
<action type="negative"><![CDATA[You have incorrect versions of binutils, compat-db (32bit), compat-db, control-center, gcc, gcc-c++, glibc (32bit), glibc, glibc-common, glibc-devel, gnome-libs, libstdc++ (32bit), libstdc++, libstdc++-devel (32bit), libstdc++-devel, make, openmotif21, pdksh, setarch, sysstat, or xscreensaver installed on your system. Make sure that the correct versions are installed. For more information about the correct versions, see the ''Oracle Application Server 10g Installation Guide''.%BR%If binutils-2.15.92.0.2-13-x86_64 is not installed, you must install that exact version. For more information about where to download the version, see the ''Oracle Application Server Installation Guide'' or you can use the binutils-2.15.92.0.2-13-x86_64.rpm from Update 3.]]></action>
<action type="positive"><![CDATA[The correct binutils, compat-db (32bit), compat-db, control-center, gcc, gcc-c++, glibc (32bit), glibc, glibc-common, glibc-devel, gnome-libs, libstdc++ (32bit), libstdc++, libstdc++-devel (32bit), libstdc++-devel, make, openmotif21, pdksh, setarch, sysstat, and xscreensaver packages are installed on your Enterprise Linux 4 system. No action required.]]></action>
</rule>
<rule condition="=~" id="130" maximum="N" minimum="RHEL3rpms|NotRHEL3|NotRedHat" mode="VERIFY" name="RHEL3 RPMs OK?" repeat="1" command_type="RDA">
<command><![CDATA[import $OS_NAM,$OS_TYP
if !match($OS_TYP,'Red Hat')
 call setHcveResult('NotRedHat')
elsif !match($OS_NAM,'taroon',true)
 call setHcveResult('NotRHEL3')
else
{var @tbl = ()
 call cmp_os_pkg(\@tbl,'compat-db','4.0.14.5.1','i386')
 call cmp_os_pkg(\@tbl,'compat-gcc','7.3.2.96.122','i386')
 call cmp_os_pkg(\@tbl,'compat-glibc','7.2.2.4.32.5/x','i386')
 call cmp_os_pkg(\@tbl,'gcc','3.2.3.20','x86_64')
 call cmp_os_pkg(\@tbl,'glibc','3.2.3.95.27','i686')
 call cmp_os_pkg(\@tbl,'glibc','2.3.2.95.27','x86_64')
 call cmp_os_pkg(\@tbl,'glibc-devel','3.2.3.95.27','i386')
 call cmp_os_pkg(\@tbl,'glibc-devel','3.2.3.95.27','x86_64')
 call cmp_os_pkg(\@tbl,'gnome-libs','1.4.1.2.90.34.1','i386')
 call cmp_os_pkg(\@tbl,'libgcc','3.2.3.20','i386')
 call cmp_os_pkg(\@tbl,'libgcc','3.2.3.20','x86_64')
 call cmp_os_pkg(\@tbl,'openmotif21','2.1.30.8','i386')
 call cmp_os_pkg(\@tbl,'pdksh','5.2.14.21','x86_64')
 call cmp_os_pkg(\@tbl,'setarch','1.3.1','x86_64')
 call cmp_os_pkg(\@tbl,'sysstat','4.0.7.4','x86_64')
 call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'RHEL3rpmsOK'))
}]]></command>
<description><![CDATA[This rule verifies that the correct versions of the required RPMs are installed on a Red Hat Enterprise Linux 3 system.]]></description>
<action type="negative"><![CDATA[You have incorrect versions of either compat-db (32bit), compat-gcc (32bit), compat-glibc (32bit), gcc, glibc (32bit), glibc, glibc-devel (32bit), glibc-devel, gnome-libs, libgcc (32bit), libgcc, openmotif21 (32bit), pdksh, setarch, or sysstat installed on your system. Make sure that the correct versions are installed. For more information about the correct versions, see the ''Oracle Application Server 10g Installation Guide''.]]></action>
<action type="positive"><![CDATA[The correct compat-db (32bit), compat-gcc (32bit), compat-glibc (32bit), gcc, glibc (32bit), glibc, glibc-devel (32bit), glibc-devel, gnome-libs, libgcc (32bit), libgcc, openmotif21 (32bit), pdksh, setarch, and sysstat packages are installed on your RHEL3 system. No action required.]]></action>
</rule>
<rule condition="=~" id="132" maximum="N" minimum="RHEL4rpmsOK|NotRHEL4|NotRedHat" mode="VERIFY" name="RHEL4 RPMs OK?" repeat="1" command_type="RDA">
<command><![CDATA[import $OS_NAM,$OS_TYP
if !match($OS_TYP,'Red Hat')
 call setHcveResult('NotRedHat')
elsif !match($OS_NAM,'nahant',true)
 call setHcveResult('NotRHEL4')
else
{var @tbl = ()
 call cmp_os_pkg(\@tbl,'binutils','2.15.92.0.2.13','x86_64')
 call cmp_os_pkg(\@tbl,'compat-db','4.1.25.9','i386')
 call cmp_os_pkg(\@tbl,'compat-db','4.1.25.9','x86_64')
 call cmp_os_pkg(\@tbl,'control-center','2.8.0.12','x86_64')
 call cmp_os_pkg(\@tbl,'gcc','3.4.3.22.1','x86_64')
 call cmp_os_pkg(\@tbl,'gcc-c++','3.4.3.22.1','x86_64')
 call cmp_os_pkg(\@tbl,'glibc','2.3.4.2.9','i686')
 call cmp_os_pkg(\@tbl,'glibc','2.3.4.2.9','x86_64')
 call cmp_os_pkg(\@tbl,'glibc-common','2.3.4.2.9','x86_64')
 call cmp_os_pkg(\@tbl,'glibc-devel','2.3.4.2.9','x86_64')
 call cmp_os_pkg(\@tbl,'gnome-libs','1.4.1.2.90.44.1','x86_64')
 call cmp_os_pkg(\@tbl,'libstdc++','3.4.3.22.1','i386')
 call cmp_os_pkg(\@tbl,'libstdc++','3.4.3.22.1','x86_64')
 call cmp_os_pkg(\@tbl,'libstdc++-devel','3.4.3.22.1','i386')
 call cmp_os_pkg(\@tbl,'libstdc++-devel','3.4.3.22.1','x86_64')
 call cmp_os_pkg(\@tbl,'make','3.80.5','x86_64')
 call cmp_os_pkg(\@tbl,'openmotif21','2.1.30.11.4/RHEL4','i386')
 call cmp_os_pkg(\@tbl,'pdksh','5.2.14.30','x86_64')
 call cmp_os_pkg(\@tbl,'setarch','1.6.1','x86_64')
 call cmp_os_pkg(\@tbl,'sysstat','5.0.5.1','x86_64')
 call cmp_os_pkg(\@tbl,'xscreensaver','4.18.5.2/rhel4','x86_64')
 call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'RHEL4rpmsOK'))
}]]></command>
<description><![CDATA[This rule verifies that the correct versions of the required RPMs are installed on a Red Hat Enterprise Linux 4 system.]]></description>
<action type="negative"><![CDATA[Incorrect versions of either binutils, compat-db, compat-db (32bit), control-center, gcc, gcc-c++, glibc (32bit), glibc, glibc-common, glibc-devel, gnome-libs, libstdc++ (32bit), libstdc++, libstdc++-devel (32bit), libstdc++-devel, make, openmotif21 (32bit), pdksh, setarch, sysstat, or xscreensaver installed on your system. Make sure that the correct versions are installed. For more information about the correct versions, see the ''Oracle Application Server 10g Installation Guide''.%BR%If binutils-2.15.92.0.2-13-x86_64 is not installed, you must install that exact version. For more information about where to download the version, see the ''Oracle Application Server Installation Guide'' or you can use the binutils-2.15.92.0.2-13-x86_64.rpm from Update 3.]]></action>
<action type="positive"><![CDATA[The correct binutils, compat-db, compat-db (32bit), control-center, gcc, gcc-c++, glibc (32bit), glibc, glibc-common, glibc-devel, gnome-libs, libstdc++ (32bit), libstdc++, libstdc++-devel (32bit), libstdc++-devel, make, openmotif21 (32bit), pdksh, setarch, sysstat, and xscreensaver packages are installed on your RHEL4 system. No action required.]]></action>
</rule>
<rule condition="=~" id="140" maximum="N" minimum="SLES9rpmsOK|NotSLES9|NotSuSE" mode="VERIFY" name="SUSE SLES9 RPMs OK?" repeat="1" command_type="RDA">
<command><![CDATA[import $OS_NAM,$OS_TYP
if !match($OS_TYP,'SuSE')
 call setHcveResult('NotSuSE')
elsif !match($OS_NAM,'SLES-9')
 call setHcveResult('NotSLES9')
else
{var @tbl = ()
 call cmp_os_pkg(\@tbl,'binutils','2.15.90.0.1.1.32.5','x86_64')
 call cmp_os_pkg(\@tbl,'binutils-32bit','9.200407011229','x86_64')
 call cmp_os_pkg(\@tbl,'compat','2004.7.1.1.2','x86_64')
 call cmp_os_pkg(\@tbl,'compat-32bit','9.200407011229','x86_64')
 call cmp_os_pkg(\@tbl,'compat-sles8','1.3.93.3','x86_64')
 call cmp_os_pkg(\@tbl,'db1-32bit','9.200407011229','x86_64')
 call cmp_os_pkg(\@tbl,'db-32bit','9.200407011229','x86_64')
 call cmp_os_pkg(\@tbl,'gcc','3.3.3.43.24','x86_64')
 call cmp_os_pkg(\@tbl,'gcc-c++','3.3.3.43.24','x86_64')
 call cmp_os_pkg(\@tbl,'glibc','2.3.3.98.28','x86_64')
 call cmp_os_pkg(\@tbl,'glibc-32bit','9.200407011223','x86_64')
 call cmp_os_pkg(\@tbl,'glibc-devel-32bit','9.200407011229','x86_64')
 call cmp_os_pkg(\@tbl,'gnome-libs','1.4.1.7.671.1','x86_64')
 call cmp_os_pkg(\@tbl,'gnome-libs-32bit','9.200407011229','x86_64')
 call cmp_os_pkg(\@tbl,'gnome-libs-devel','1.4.1.7.671.1','x86_64')
 call cmp_os_pkg(\@tbl,'libaio-devel-32bit','9.200407011229','x86_64')
 call cmp_os_pkg(\@tbl,'libgcc','3.2.3.20','i386')
 call cmp_os_pkg(\@tbl,'libstdc++','3.3.3.43.24','x86_64')
 call cmp_os_pkg(\@tbl,'libstdc++-devel','3.3.3.43.24','x86_64')
 call cmp_os_pkg(\@tbl,'libstdc++-devel-32bit','9.200407011229','x86_64')
 call cmp_os_pkg(\@tbl,'linux32','1.0.341.1','x86_64')
 call cmp_os_pkg(\@tbl,'make','3.80.184.1','x86_64')
 call cmp_os_pkg(\@tbl,'pdksh','5.2.14.780.1','x86_64')
 call cmp_os_pkg(\@tbl,'perl-32bit','9.200407011229','x86_64')
 call cmp_os_pkg(\@tbl,'sysstat','5.0.1.35.1','x86_64')
 call cmp_os_pkg(\@tbl,'XFree86-devel-32bit','9.200407011229','x86_64')
 call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'SLES9rpmsOK'))
}]]></command>
<description><![CDATA[This rule verifies that the correct versions of the required RPMs are installed on a SUSE Linux Enterprise Server 9 system.]]></description>
<action type="negative"><![CDATA[You have incorrect versions of binutils, binutils-32bit, compat, compat-32bit, compat-sles8, db1-32bit, db-32bit, gcc, gcc-c++, glibc, glibc-32bit, glibc-devel-32bit, gnome-libs, gnome-libs-32bit, gnome-libs-devel, libaio-devel-32bit, libgcc (32bit), libstdc++, libstdc++-devel, libstdc++-devel-32bit, linux32, make, pdksh, perl-32bit, sysstat, or XFree86-devel-32bit packages installed on your SUSE SLES9 system. Make sure that the correct versions are installed. For more information about the correct versions, see the ''Oracle Application Server 10g Installation Guide''.]]></action>
<action type="positive"><![CDATA[The correct binutils, binutils-32bit, compat, compat-32bit, compat-sles8, db1-32bit, db-32bit, gcc, gcc-c++, glibc, glibc-32bit, glibc-devel-32bit, gnome-libs, gnome-libs-32bit, gnome-libs-devel, libaio-devel-32bit, libgcc (32bit), libstdc++, libstdc++-devel, libstdc++-devel-32bit, linux32, make, pdksh, perl-32bit, sysstat, and XFree86-devel-32bit packages are installed on your SUSE SLES9 system. No action required.]]></action>
</rule>
<rule condition="=~" id="150" maximum="N" minimum="Adequate|Not required" mode="VERIFY" name="hugemem Kernel" repeat="1" command_type="RDA">
<command><![CDATA[import $OS_NAM
call setHcveResult(cond(\
  not(match($OS_NAM,'(taroon|nahant)',true)),\
    'Not required',\
  and(match(uname('r'),'hugemem',true),not(match(uname('m'),'i386',true))),\
    'hugemem kernel is used',\
    'Adequate'))
]]></command>
<description><![CDATA[This rule checks if the hugemem kernel is used. This is only required for RedHat AS/ES 3.0 or 4.0. If the hugemem kernel is used, then the setarch i386 command must be executed.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|hugemem kernel is used|Run the setarch i386 command.|]]></action>
<action type="positive"><![CDATA[The hugemem kernel is not used or else it is used and the setarch i386 command has been run.]]></action>
</rule>
<rule condition="=~" id="160" maximum="N" minimum="Exists|Not required" mode="VERIFY" name="Perl Link" repeat="1" command_type="RDA">
<command><![CDATA[import $OS_NAM
var $LS = findCommand('ls')
call setHcveVariable('$LS')
call setHcveResult(cond(\
  not(match($OS_NAM,'(SLES-9|SuSE Linux 9|SUSE LINUX Enterprise Server 9)',\
            true)),\
    'Not required',\
  grepCommand(concat($LS,' -l /usr/local/bin/perl'),\
              quote('/usr/bin/perl'),\
              'f'),\
    'Exists',\
    'Missing'))
]]></command>
<description><![CDATA[This rule checks for the following symbolic link. This is required for SUSE 9.0.
/usr/local/bin/perl -> /usr/bin/perl]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Missing|Log in as root and create a Perl symbolic link:%BR%ln -sf /usr/bin/perl /usr/local/bin/perl|]]></action>
<action type="positive"><![CDATA[The Perl link exists or else it is not required.]]></action>
</rule>
<rule condition="=~" id="162" maximum="N" minimum="Exists|Not required" mode="VERIFY" name="fuser Link" repeat="1" command_type="RDA">
<command><![CDATA[import $OS_NAM,$LS
call setHcveResult(cond(\
  not(match($OS_NAM,'(SLES-9|SuSE Linux 9|SUSE LINUX Enterprise Server 9)',\
            true)),\
    'Not required',\
  grepCommand(concat($LS,' -l /sbin/fuser'),quote('/bin/fuser'),'f'),\
    'Exists',\
    'Missing'))
]]></command>
<description><![CDATA[This rule checks for the fuser symbolic link /sbin/fuser -> /bin/fuser. This is required for SUSE 9.0.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Missing|Log in as root and create an fuser symbolic link:%BR%ln -sf /bin/fuser /sbin/fuser|]]></action>
<action type="positive"><![CDATA[The fuser link exists or else it is not required.]]></action>
</rule>
<rule condition="=~" id="170" maximum="N" minimum="Not installed|Installed correctly|Not applicable|Environment reset not required" mode="VERIFY" name="orarun Package" repeat="1" command_type="RDA">
<command><![CDATA[import $OS_NAM
call setHcveResult(cond(\
  not(match($OS_NAM,'(SLES-9|SuSE Linux 9|SUSE LINUX Enterprise Server 9)',\
            true)),\
    'Not applicable',\
  not(chk_os_pkg('orarun')),\
    'Not installed',\
  not(testFile('r',catFile(getEnv('HOME'),'.profile'))),\
    'Environment reset not required.',\
  not(assign($prf,grepFile(catFile(getEnv('HOME'),'.profile'),\
                           quote('. ./.oracle'),\
                           'if'))),\
    'Installed correctly',\
  compare('eq',substr($prf,0,1),'#'),\
    'Installed correctly',\
    'Reset oracle environment.'))
]]></command>
<description><![CDATA[This rule checks that the orarun package is installed and if the oracle user environment must be reset. This is only required for SUSE 9.0.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Reset oracle environment.|For SUSE 9.0, follow these steps to reset the environment:%BR%a. Enter the following commands:%BR%prompt> cd /etc/profile.d%BR%prompt> mv oracle.csh oracle.csh.bak%BR%prompt> mv oracle.sh oracle.sh.bak%BR%prompt> mv alljava.sh alljava.sh.bak%BR%prompt> mv alljava.csh alljava.csh.bak%BR%b. Use any text editor to comment out%BR%the following line from the%BR%$HOME/.profile file:%BR%. ./.oracle%BR%c. Log out of the oracle user account.%BR%d. Log in to the oracle user account for the changes to take effect.|]]></action>
<action type="positive"><![CDATA[orarun is not installed or else it is not installed correctly.]]></action>
</rule>
<rule condition="==" id="180" maximum="N" minimum="Adequate" mode="VERIFY" name="semmsl" repeat="1" command_type="RDA">
<command><![CDATA[var ($KER,@KER) = (undef)
call setHcveVariable('$KER','@KER')
if !testFile('x','/sbin/sysctl')
 return setHcveResult('Cannot access /sbin/sysctl')
var @KER = command('/sbin/sysctl -a')
var ($KER) = grep(@KER,'sem','f')
call setHcveResult(cond(\
  expr('>=',field('\s+',2,$KER),256), 'Adequate',\
                                      'Less than 256'))
]]></command>
<description><![CDATA[This rule checks that the semmsl kernel parameter is 256 or higher. For more information about configuring this parameter, see the ''Oracle Application Server 10g Installation Guide''.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Less than 256|Increase semmsl to 256 or higher.|
|Cannot access /sbin/sysctl|Grant execute permission on /sbin/sysctl to the current user.|]]></action>
<action type="positive"><![CDATA[The semmsl kernel parameter is 256 or higher.]]></action>
</rule>
<rule condition="==" id="182" maximum="N" minimum="Adequate" mode="VERIFY" name="semmns" repeat="1" command_type="RDA">
<command><![CDATA[import $KER
call setHcveResult(cond(\
  not(defined($KER)),                   'Cannot access /sbin/sysctl',\
  expr('>=',field('\s+',3,$KER),32000), 'Adequate',\
                                        'Less than 32000'))
]]></command>
<description><![CDATA[This rule checks that the semmns kernel parameter is 32000 or higher. For more information about configuring this parameter, see the ''Oracle Application Server 10g Installation Guide''.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Less than 32000|Increase semmns to 32000 or higher.|
|Cannot access /sbin/sysctl|Grant execute permission on /sbin/sysctl to the current user.|]]></action>
<action type="positive"><![CDATA[The semmns kernel parameter is 32000 or higher.]]></action>
</rule>
<rule condition="==" id="184" maximum="N" minimum="Adequate" mode="VERIFY" name="semopm" repeat="1" command_type="RDA">
<command><![CDATA[import $KER
call setHcveResult(cond(\
  not(defined($KER)),                 'Cannot access /sbin/sysctl',\
  expr('>=',field('\s+',4,$KER),100), 'Adequate',\
                                      'Less than 100'))
]]></command>
<description><![CDATA[This rule checks that the semopm kernel parameter is 100 or higher. For more information about configuring this parameter, see the ''Oracle Application Server 10g Installation Guide''.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Less than 100|Increase semopm to 100 or higher.|
|Cannot access /sbin/sysctl|Grant execute permission on /sbin/sysctl to the current user.|]]></action>
<action type="positive"><![CDATA[The semopm kernel parameter is 100 or higher.]]></action>
</rule>
<rule condition="==" id="186" maximum="N" minimum="Adequate" mode="VERIFY" name="semmni" repeat="1" command_type="RDA">
<command><![CDATA[import $KER
call setHcveResult(cond(\
  not(defined($KER)),                 'Cannot access /sbin/sysctl',\
  expr('>=',field('\s+',5,$KER),142), 'Adequate',\
                                      'Less than 142'))
]]></command>
<description><![CDATA[This rule checks that the semmni kernel parameter is 142 or higher. For more information about configuring this parameter, see the ''Oracle Application Server 10g Installation Guide''.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Less than 142|Increase semmni to 142 or higher.|
|Cannot access /sbin/sysctl|Grant execute permission on /sbin/sysctl to the current user.|]]></action>
<action type="positive"><![CDATA[The semmni kernel parameter is 142 or higher.]]></action>
</rule>
<rule condition="==" id="188" maximum="N" minimum="Adequate" mode="VERIFY" name="shmall" repeat="1" command_type="RDA">
<command><![CDATA[import @KER
call setHcveResult(cond(\
  not(defined($KER[0])),\
    'Cannot access /sbin/sysctl',\
  expr('>=',field('\s+',2,grep(@KER,'kernel\.shmall','f')),2097152),\
    'Adequate',\
    'Less than 2097152'))
]]></command>
<description><![CDATA[This rule checks that the shmall kernel parameter is 2097152 or higher. For more information about configuring this parameter, see the ''Oracle Application Server 10g Installation Guide''.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Less than 2097152|Increase shmall to 2097152 or higher.|
|Cannot access /sbin/sysctl|Grant execute permission on /sbin/sysctl to the current user.|]]></action>
<action type="positive"><![CDATA[The shmall kernel parameter is 2097152 or higher.]]></action>
</rule>
<rule condition="==" id="190" maximum="N" minimum="Adequate" mode="VERIFY" name="shmmax" repeat="1" command_type="RDA">
<command><![CDATA[import @KER
call setHcveResult(cond(\
  not(defined($KER[0])),\
    'Cannot access /sbin/sysctl',\
  expr('>=',field('\s+',2,grep(@KER,'kernel\.shmmax','f')),2147483648),\
    'Adequate',\
    'Less than 2147483648'))
]]></command>
<description><![CDATA[This rule checks that the shmmax kernel parameter is 2147483648 or higher. For more information about configuring this parameter, see the ''Oracle Application Server 10g Installation Guide''.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Less than 2147483648|Increase shmmax to 2147483648 or higher.|
|Cannot access /sbin/sysctl|Grant execute permission on sbin/sysctl to the current user.|]]></action>
<action type="positive"><![CDATA[The shmmax kernel parameter is 2147483648 or higher.]]></action>
</rule>
<rule condition="==" id="192" maximum="N" minimum="Adequate" mode="VERIFY" name="shmmni" repeat="1" command_type="RDA">
<command><![CDATA[import @KER
call setHcveResult(cond(\
  not(defined($KER[0])),\
    'Cannot access /sbin/sysctl',\
  expr('>=',field('\s+',2,grep(@KER,'kernel\.shmmni','f')),4096),\
    'Adequate',\
    'Less than 4096'))
]]></command>
<description><![CDATA[This rule checks that the shmmni kernel parameter is 4096 or higher. For more information about configuring this parameter, see the ''Oracle Application Server 10g Installation Guide''.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Less than 4096|Increase shmmni to 4096 or higher.|
|Cannot access /sbin/sysctl|Grant execute permission on /sbin/sysctl to the current user.|]]></action>
<action type="positive"><![CDATA[The shmmni kernel parameter is 4096 or higher.]]></action>
</rule>
<rule condition="==" id="194" maximum="N" minimum="Adequate" mode="VERIFY" name="msgmax" repeat="1" command_type="RDA">
<command><![CDATA[import @KER
call setHcveResult(cond(\
  not(defined($KER[0])),\
    'Cannot access /sbin/sysctl',\
  expr('>=',field('\s+',2,grep(@KER,'kernel\.msgmax','f')),8192),\
    'Adequate',\
    'Less than 8192'))
]]></command>
<description><![CDATA[This rule checks that the msgmax kernel parameter is 8192 or higher. For more information about configuring this parameter, see the ''Oracle Application Server 10g Installation Guide''.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Less than 8192|Increase msgmax to 8192 or higher.|
|Cannot access /sbin/sysctl|Grant execute permission on /sbin/sysctl to the current user.|]]></action>
<action type="positive"><![CDATA[The msgmax kernel parameter is 8192 or higher.]]></action>
</rule>
<rule condition="==" id="196" maximum="N" minimum="Adequate" mode="VERIFY" name="msgmnb" repeat="1" command_type="RDA">
<command><![CDATA[import @KER
call setHcveResult(cond(\
  not(defined($KER[0])),\
    'Cannot access /sbin/sysctl',\
  expr('>=',field('\s+',2,grep(@KER,'kernel\.msgmnb','f')),65535),\
    'Adequate',\
    'Less than 65535'))
]]></command>
<description><![CDATA[This rule checks that the msgmnb kernel parameter is 65535 or higher. For more information about configuring this parameter, see the ''Oracle Application Server 10g Installation Guide''.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Less than 65535|Increase msgmnb to 65535 or higher.|
|Cannot access /sbin/sysctl|Grant execute permission on /sbin/sysctl to the current user.|]]></action>
<action type="positive"><![CDATA[The msgmnb kernel parameter is 65535 or higher.]]></action>
</rule>
<rule condition="==" id="198" maximum="N" minimum="Adequate" mode="VERIFY" name="msgmni" repeat="1" command_type="RDA">
<command><![CDATA[import @KER
call setHcveResult(cond(\
  not(defined($KER[0])),\
    'Cannot access /sbin/sysctl',\
  expr('>=',field('\s+',2,grep(@KER,'kernel\.msgmni','f')),2878),\
    'Adequate',\
    'Less than 2878'))
]]></command>
<description><![CDATA[This rule checks that the msgmni kernel parameter is 2878 or higher. For more information about configuring this parameter, see the ''Oracle Application Server 10g Installation Guide''.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Less than 2878|Increase msgmni to 2878 or higher.|
|Cannot access /sbin/sysctl|Grant execute permission on /sbin/sysctl to the current user.|]]></action>
<action type="positive"><![CDATA[The msgmni kernel parameter is 2878 or higher.]]></action>
</rule>
<rule condition="==" id="200" maximum="N" minimum="Adequate" mode="VERIFY" name="file-max" repeat="1" command_type="RDA">
<command><![CDATA[import @KER
call setHcveResult(cond(\
  not(defined($KER[0])),\
    'Cannot access /sbin/sysctl',\
  expr('>=',field('\s+',2,grep(@KER,'file\-max','f')),131072),\
    'Adequate',\
    'Less than 131072'))
]]></command>
<description><![CDATA[This rule checks that the file-max kernel parameter is 131072 or higher. For more information about configuring this parameter, see the ''Oracle Application Server 10g Installation Guide''.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Less than 131072|Increase file-max to 131072 or higher.|
|Cannot access /sbin/sysctl|Grant execute permission on /sbin/sysctl to the current user.|]]></action>
<action type="positive"><![CDATA[The file-max kernel parameter is 131072 or higher.]]></action>
</rule>
<rule condition="==" id="202" maximum="N" minimum="Adequate" mode="VERIFY" name="ip_local_port_range" repeat="1" command_type="RDA">
<command><![CDATA[import @KER
if !defined($KER[0])
 return setHcveResult('Cannot access /sbin/sysctl')
var (undef,undef,$low,$hig) = split('\s+',grep(\
 @KER,'ip_local_port_range','f'),4)
call setHcveResult(cond(\
  and(expr('<=',$low,10000),expr('>=',$hig,65000)),\
    'Adequate',\
    'Less than 10000 and 65000'))
]]></command>
<description><![CDATA[This rule checks that the ip_local_port_range kernel parameter is between 10000 and 65000 or higher. For more information about configuring this parameter, see the ''Oracle Application Server 10g Installation Guide''.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Less than 10000 and 65000|Increase the ip_local_port_range parameter to 10000 and 65000 or higher.|
|Cannot access /sbin/sysctl|Grant execute permission on /sbin/sysctl to the current user.|]]></action>
<action type="positive"><![CDATA[The ip_local_port_range kernel parameter is between 10000 and 65000 or higher.]]></action>
</rule>
<rule condition="==" id="210" maximum="N" minimum="Adequate" mode="VERIFY" name="Limit Processes" repeat="1" command_type="RDA">
<command><![CDATA[var $shl = getEnv('SHELL')
macro proc_lmt
{var ($cmd,$flg) = @arg
 var ($val) = command($cmd)
 if $flg
  var $val = field('\s+',1,$val)
 if compare('eq',$val,'unlimited')
  return 'Adequate'
 return cond(and(isNumber($val),expr('>=',$val,16384)),\
             'Adequate',\
             'Less than 16384')
}
call setHcveResult(check(\
  $shl,'csh',proc_lmt(concat($shl,' -f -c "limit maxproc"'),true),\
       'ksh',proc_lmt(concat($shl,' -c "ulimit -p"'),false),\
             proc_lmt(concat($shl,' -c "ulimit -u"'),false)))
]]></command>
<description><![CDATA[This rule checks that the limit of max processes is set to 16384 or higher. For more information about configuring this parameter, see the ''Oracle Application Server 10g Installation Guide''.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Less than 16384|Increase the limit for max processes to 16384 or higher.|]]></action>
<action type="positive"><![CDATA[The limit of max processes is set to 16384 or higher.]]></action>
</rule>
<rule condition="==" id="220" maximum="N" minimum="Adequate" mode="VERIFY" name="Limit Descriptors" repeat="1" command_type="RDA">
<command><![CDATA[var $shl = getEnv('SHELL')
macro proc_lmt
{var ($cmd,$flg) = @arg
 var ($val) = command($cmd)
 if $flg
  var $val = field('\s+',1,$val)
 if compare('eq',$val,'unlimited')
  return 'Adequate'
 return cond(and(isNumber($val),expr('>=',$val,65536)),\
             'Adequate',\
             'Less than 65536')
}
call setHcveResult(check(\
  $shl,'csh',proc_lmt(concat($shl,' -f -c "limit descriptors"'),true),\
             proc_lmt(concat($shl,' -c "ulimit -n"'),false)))
]]></command>
<description><![CDATA[This rule checks that the limit of file descriptors is set to 65536 or higher. For more information about configuring this parameter, see the ''Oracle Application Server 10g Installation Guide''.]]></description>
<action type="positive"><![CDATA[The limit of descriptors is set to 65536 or higher.]]></action>
</rule>
<rule condition="==" id="230" maximum="N" minimum="Properly defined" mode="VERIFY" name="Environment Variables" repeat="1" command_type="RDA">
<command><![CDATA[if grepEnv('^(TNS_ADMIN|ORA_NLS|LD_BIND_NOW|ANT_HOME)$')
 return setHcveResult('Some variables are set')
if testFile('e','/etc/oratab')
{if !testFile('r','/etc/oratab')
  return setHcveResult('Cannot access /etc/oratab')
 var @pth = (split(':',join(':',getEnv('PATH'),\
                                getEnv('CLASSPATH'),\
                                getEnv('LD_LIBRARY_PATH'))))
 loop $lin (grepFile('/etc/oratab','#|^$','v'))
 {var $pat = concat('^',quote(replace(field(':',1,$lin),'\/+$')),'(\/.*)?$')
  if grep(@pth,$pat)
   return setHcveResult('Variables containing reference to existing \
                         Oracle homes')
 }
}
return setHcveResult('Properly defined')
]]></command>
<description><![CDATA[This rule checks that the following environment variables are not set: TNS_ADMIN, ORA_NLS, ANT_HOME, and LD_BIND_NOW. In addition, the following environment variables must not reference to any existing Oracle home, PATH, CLASSPATH, and LD_LIBRARY_PATH.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Variables containing reference to existing Oracle homes|Remove any reference to existing Oracle homes from PATH, CLASSPATH, and LD_LIBRARY_PATH.|
|Some variables are set|Unset TNS_ADMIN, ORA_NLS, ANT_HOME, and LD_BIND_NOW.|
|Cannot access /etc/oratab|Grant read permission on /etc/oratab to the current user.|]]></action>
<action type="positive"><![CDATA[Environment variables do not have references to existing Oracle homes.]]></action>
</rule>
<rule id="240" mode="RECORD" name="IP Address" repeat="1" command_type="RDA">
<command><![CDATA[var $hst = field('\.',0,command('hostname'))
var ($lin) = grepFile('/etc/hosts',\
 concat('^[^#]+\s\<?',quote($hst),'\>?($|\.|\s)'),'f')
call setHcveResult(field('\s+',0,$lin))
]]></command>
<description><![CDATA[This rule gets the host IP address.]]></description>
</rule>
<rule id="250" mode="RECORD" name="Domain Name" repeat="1" command_type="RDA">
<command><![CDATA[var $ip = "%240%"
var ($hst) = command('hostname')
var ($nam,$dom) = split('\.',$hst,2)
if testFile('x','/bin/domainname')
 var ($nis) = command('/bin/domainname')
if testFile('r','/etc/resolv.conf')
 var $dns = field('\s+',1,grepFile('/etc/resolv.conf','domain'))
if testFile('x','/usr/bin/nslookup')
{if $nam
 {var $nsl = field(concat(quote($nam),'\.'),1,\
                   grepCommand(concat('/usr/bin/nslookup ',$hst),'Name','f'))
 }
 else
 {var $nsl = field(concat(quote($hst),'\.'),1,\
                   grepCommand(concat('/usr/bin/nslookup ',$hst),'Name','f'))
 }
}
if $ip
{if !$nam
  var $ipn = trim(field(concat($hst,'\.'),1,\
             grepCommand(concat('/usr/bin/nslookup -sil ',$ip),'Name','f')),'.')
}
call setHcveResult(cond($dom,$dom,\
                        and(length($nis),compare('ne',$nis,'(none)')),$nis,\
                        $dns,$dns,\
                        $nsl,$nsl,\
                        $ipn,$ipn,\
                             'Not configured'))
]]></command>
<description><![CDATA[This rule gets the host domain name.]]></description>
</rule>
<rule condition="==" id="260" minimum="Host correctly registered in DNS" mode="VERIFY" name="DNS Lookup" repeat="1" command_type="RDA">
<command><![CDATA[var $dom = "%250%"
var $ip  = "%240%"
var $hst = field('\.',0,command('hostname'))
if !length($hst)
{if and(compare('ne',$dom,'Not configured'),length($dom))
  var $hst = concat($hst,'.',$dom)
}
call setHcveResult(cond(\
  not(length($ip)),\
    'Cannot determine IP address',\
  not(testFile('x','/usr/bin/nslookup')),\
    'Cannot access /usr/bin/nslookup',\
  not(grepCommand(concat('/usr/bin/nslookup -sil ',$hst),quote($ip),'f')),\
    'nslookup host.domain',\
  not(grepCommand(concat('/usr/bin/nslookup -sil ',$ip),quote($hst),'f')),\
    'nslookup IP_address',\
    'Host correctly registered in DNS'))
]]></command>
<description><![CDATA[This rule checks that the host is registered properly in the DNS.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|nslookup host.domain|The DNS server failed to resolve the nslookup using host.domain.|
|nslookup IP_address|The DNS server failed to resolve the nslookup using IP address.|
|Cannot determine IP address|Fix any problem with the host IP address.|
|Cannot access /usr/bin/nslookup|Grant execute permission on /usr/bin/nslookup to the current user.|]]></action>
<action type="positive"><![CDATA[The host is registered correctly in the DNS.]]></action>
</rule>
<rule condition="==" id="270" minimum="Contains host.domain" mode="VERIFY" name="/etc/hosts Format" repeat="1" command_type="RDA">
<command><![CDATA[var $dom = "%250%"
var $ip  = "%240%"
if !testFile('r','/etc/hosts')
 return setHcveResult('Cannot access /etc/hosts')
var $hst = field('\.',0,command('hostname'))
var $fqd = concat($hst,'.',$dom)
var ($lin) = grepFile('/etc/hosts',quote($fqd),'f')
var @fld = split('\s+',$lin,4)
call setHcveResult(cond(\
  compare('eq',join('|',$fld[0],$fld[1]),join('|',$ip,$fqd)),\
    'Contains host.domain',\
    'Missing host.domain'))
]]></command>
<description><![CDATA[This rule checks that the /etc/hosts file contains a line with "ip_address fully_qualified_hostname short_hostname".]]></description>
<action type="negative" syntax="wiki"><![CDATA[The fully qualified host name is not configured properly. 
|*Return Value*|*Action*|
|Missing host.domain|Add the FQDN to the /etc/hosts file.|
|Cannot access /etc/hosts|Grant read permission on /etc/hosts to the current user.|]]></action>
<action type="positive"><![CDATA[The fully qualified domain name is set correctly.]]></action>
</rule>
<rule condition="==" id="280" minimum="Host name is less than 255 characters" mode="VERIFY" name="Host Name Length" repeat="1" command_type="RDA">
<command><![CDATA[var $hst = uname('n')
call setHcveResult(cond(\
  expr('>',length($hst),255), 'Host name is greater than 255 characters',\
                              'Host name is less than 255 characters'))
]]></command>
<description><![CDATA[Ensure that your fully qualified host name is not longer than 255 characters.]]></description>
<action type="negative"><![CDATA[Modify your fully qualified host name to less than 255 characters.]]></action>
<action type="positive"><![CDATA[The host name is less than 255 characters. No action required.]]></action>
</rule>
<rule condition="==" id="290" minimum="Less than 127 char" mode="VERIFY" name="Oracle Home Length" repeat="1" command_type="RDA">
<command><![CDATA[var $ORACLE_HOME = getEnv('ORACLE_HOME')
call setHcveResult(cond(\
  not(defined($ORACLE_HOME)),\
    'ORACLE_HOME is not set',\
  expr('<=',length($ORACLE_HOME),127),\
    'Less than 127 char',\
    'Longer than 127 characters'))
]]></command>
<description><![CDATA[This rule checks that the path to the Oracle home directory is not longer than 127 characters.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Longer than 127 characters|Change ORACLE_HOME to a directory not longer than 127 characters.|
|ORACLE_HOME is not set|Set the ORACLE_HOME environment variable.|]]></action>
<action type="positive"><![CDATA[The Oracle home directory is not longer than 127 characters.]]></action>
</rule>
</hcve>
