# DCireq.ctl:313:Handles the Oracle Instance Collection Requests # $Id: DCireq.ctl,v 1.19 2016/05/18 16:48:34 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/OFM/DCireq.ctl,v 1.19 2016/05/18 16:48:34 RDA Exp $ # # Change History # 20160516 SJC Only call HCVE for version 11. =head1 NAME OFM:DCireq - Handles the Oracle Instance Collection Requests =head1 DESCRIPTION This module collects information for Oracle Instances and their associated Oracle homes. =head1 REPORTS =cut echo tput('bold'),'Processing OFM.IREQ module ...',tput('off') # Initialization var $BI_AGE = ${SET.BI.BI.R_LOG_AGE/T:5} var $BI_TAIL = ${SET.BI.BI.N_TAIL:5000} var $DEV_AGE = ${GRP.DEV.R_AGE/T:7} var $DEV_FRM_URL = ${GRP.DEV.T_FRM_URL} var $MAX = ${GRP.DSCV.N_LOG_MAX:20} var $ODL_SIZE = ${N_ODL_TAIL:65536} var $TAIL = ${DFT.N_TAIL:1000} var $WEBC_TAIL = ${GRP.WEBC.N_TAIL:5000} var $PRE = setPrefix() var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' var $VER = 'Version:\w+\s+[\d\.]+' set $NOT_OWNER_STATEMENT {**Note:** " "The RDA was executed with an operating system user which is different from "the operating system user who installed the Oracle Fusion Middleware 11g. " "Therefore, no information are available in this section. " } var ($cnt,%COMMON,%HOMES,%INSTANCES) = 0 # Define global variables var %cmp var %DUP var %FLT var %HTTPDCONF var %HTTPDERRLOG var %HTTPDREQLOG # Load the common macros run OFM:ASITlib() run OFM:WLSlib() run RDA:INVinfo() run RDA:library() # Set the required environment var $env = setContext({PERL5LIB => ${ENV.PERL5LIB},\ PERL5OPT => ${ENV.PERL5OPT}}) # Define a macro to check if a focus area is applicable for the current target macro chk_area {var ($nam,@dir) = @arg import $PRE keep $PRE # Check the directory presence if @dir {loop $dir (@dir) break $flg = testDir('d',$dir) if !$flg return false } # Check the interest for that area if @tid = getFocus($nam) {var $pre = setPrefix($PRE) call switchToc(@tid) call setPrefix($pre) return true } return false } # Define a macro to indicate an installation type error macro dsp_error {echo ' Error: The identified Oracle home does not contain appropriate \ information' report error write '** Error: The identified Oracle home is not a supported installation \ type.**%BR%This module supports the following installation types:' write ' * Oracle Business Intelligence Enterprise Edition 11g' write ' * Oracle Forms and Reports 11g' write ' * Oracle Identity Management 11g' write ' * Oracle Portal, Forms, Reports and Discoverer 11g' write ' * Oracle WebTier' write '%BR%' if @arg {write '|*Oracle Home*|',encode($arg[0]),' |' write '|*Install Name*|',$arg[1],' |' write '|*Install Version*|',$arg[2],' |' } toc '2:[[',getFile(),'][rda_report][Installation Type Error]]' } # Analyze the Oracle home collection requests loop $itm (${CUR.O_SETUP}->search('IREQ_\w+_OH')) {var $tid = substr($itm->get_oid,5) var $hom = $itm->get_first('I_ORACLE_HOME')->get_first('D_ORACLE_HOME') next !?testDir('d',$hom) if missing($HOMES{$hom}) var $HOMES{$hom} = addTarget($itm->get_first('I_ORACLE_HOME')) call $HOMES{$hom}->set_focus($tid,$itm->get_first('T_OH_FOCUS')) } # Used later for HCVE rule check var $PROD_ORACLE_HOME = getHome('.') # Analyze the common home collection requests loop $itm (${CUR.O_SETUP}->search('IREQ_\w+_CH')) {var $tid = substr($itm->get_oid,5) var $hom = $itm->get_first('I_COMMON_HOME')->get_first('D_COMMON_HOME') next !?testDir('d',$hom) if missing($COMMON{$hom}) var $COMMON{$hom} = addTarget($itm->get_first('I_COMMON_HOME')) call $COMMON{$hom}->set_focus($tid,$itm->get_first('T_CH_FOCUS')) } # Analyze the instance home collection requests loop $itm (${CUR.O_SETUP}->search('IREQ_\w+_OI')) {var $tid = substr($itm->get_oid,5) var $ins = $itm->get_first('I_ORACLE_INSTANCE')->get_first('D_ORACLE_INSTANCE') next !?testDir('d',$ins) if missing($INSTANCES{$ins}) {var $hom = $itm->get_first('I_ORACLE_INSTANCE')->get_first(\ 'I_ORACLE_HOME')->get_first('D_ORACLE_HOME') if and(defined($hom),testDir('d',$hom)) {# Get the Oracle home target if missing($HOMES{$hom}) var $HOMES{$hom} = addTarget(\ $itm->get_first('I_ORACLE_INSTANCE')->get_first('I_ORACLE_HOME')) # Define the instance target (with Oracle home) var $INSTANCES{$ins} = addTarget($itm->get_first('I_ORACLE_INSTANCE')) } else {# Define the instance target (without Oracle home) var $INSTANCES{$ins} = addTarget('OI_Req$$',\ {D_ORACLE_INSTANCE=>$ins,\ B_MISSING_HOME =>1}) } } var $tgt = $INSTANCES{$ins} if !${B_NO_INSTANCE} call $tgt->set_focus($tid,$itm->get_first('T_OI_FOCUS')) next !?$tgt = $tgt->get_home var $tid = replace($tid,'_OI','_OH') if !${B_NO_HOME} call $tgt->set_focus($tid,$itm->get_first('T_OH_FOCUS')) } =head1 COMMON COMPONENTS HOME COLLECTIONS Performs the following collection on all requested common components homes: =cut var $cnt = 0 loop $key (keys(%COMMON)) {# Skip when not requested call setCurrent($COMMON{$key}) next !getFocus() call switchToc(last) call setPrefix(concat($PRE,'c',incr($cnt))) var $ORACLE_HOME = getCommon('.') =head2 abbr - Abbreviations Displays the RDA abbreviations defined for the Common Components home collection. =cut debug ' Inside IREQ module, collecting defined abbreviations' report abbr prefix {write '---+ Common Components Home Abbreviations' write '|*Abbreviation*|*Location*|' } var %hsh = getSymbols() loop $key (keys(%hsh)) write '|',$key,' |',$hsh{$key},' |' if isCreated(true) toc '2:[[',getFile(),'][rda_report][Abbreviations]]' =head2 product_info - Product Information Gathers the Common Components home product information. =cut if chk_area('Generic') {if ?testDir('d',catDir($ORACLE_HOME,'inventory')) {debug ' Inside IREQ module, getting common components product information \ (can take time)' report product_info prefix {write '---+!! Common Components Home Product Information' write '---## From ',encode($ORACLE_HOME),' ' write $TOC } call inventory_details(lastDir(),true) if isCreated(true) toc '2:[[',getFile(),'][rda_report][Product Information]]' } =head2 Installation and Configuration Files Gathers the Oracle Fusion Middleware Common Components home C, and C files. =cut debug ' Inside IREQ module, gathering common components cfgtoollogs files' pretoc '2:Installation and Configuration Files' call sort_files(3,0,\ grepDir(catDir($ORACLE_HOME,'cfgtoollogs'),'.','np'),\ grepDir(catDir($ORACLE_HOME,'cfgtoollogs','cfgfw'),'\.log$','np'),\ grepDir(catDir($ORACLE_HOME,'cfgtoollogs','oui'),'\.(err|log|out)$','np'),\ grepDir(catDir($ORACLE_HOME,'cfgtoollogs','opatch'),'\.(log|txt)$','np'),\ grepDir(catDir($ORACLE_HOME,'upgrade','logs'),'^(ps|u)a.*?\.log$','np')) unpretoc } =head2 WLS and WLST Administration Scripts Gathers the Oracle WebLogic Server and Oracle WebLogic Scripting Tool-related administration scripts. =head2 wlst_cmd_list - WLST Command Files List Lists the Oracle WebLogic Scripting Tool-related command files. =cut if chk_area('WlsGeneric') {debug ' Inside IREQ module, collecting the administration scripts' pretoc '2:WLS and WLST Administration Scripts' call sort_files(3,0,\ grepDir(catDir($ORACLE_HOME,'common','bin'),'\.(cmd|sh)$','p')) unpretoc debug ' Inside IREQ module, listing the WLST command files' var $dir = catDir($ORACLE_HOME,'common','wlst') report wlst_cmd_list prefix {write '---+ List of WLST Command Files' write '---## Information Taken from ',encode($dir) } call statFile('b',grepDir($dir,'\.py$','p')) if isCreated(true) {write $TOP toc '2:[[',getFile(),'][rda_report][WLST Command Files List]]' } } =head2 Manifest Information Gathers the Common Components home manifest information. =cut if chk_area('Manifest') {debug ' Inside IREQ module, getting common components manifest information \ (can take time)' pretoc '2:Manifest Information' call dsp_manifest(3,$ORACLE_HOME,'IREQ_CH_MANIFEST') unpretoc } # Restore module prefix call setPrefix($PRE) } =head1 ORACLE HOME COLLECTIONS Performs the following collections on all requested Oracle homes: =cut var $cnt = 0 loop $key (keys(%HOMES)) {# Skip when not requested call setCurrent($HOMES{$key}) next !getFocus() call switchToc(last) call setPrefix($pre = concat($PRE,'o',incr($cnt))) # Oracle home initialization var $ORACLE_HOME = getHome('.') var $APACHE_TOP = catDir($ORACLE_HOME,'ohs') var $ASSISTANTS_HOME = catDir($ORACLE_HOME,'assistants') var $BI_HOME = catDir($ORACLE_HOME,'bifoundation') var $CFGTOOLLOGS_HOME = catDir($ORACLE_HOME,'cfgtoollogs') var $DEV_BIN = catDir($ORACLE_HOME,'bin') var $DISCOVERER_HOME = catDir($ORACLE_HOME,'discoverer') var $FORMS_HOME = catDir($ORACLE_HOME,'forms') var $INSTALL_HOME = catDir($ORACLE_HOME,'install') var $LDAP_HOME = catDir($ORACLE_HOME,'ldap') var $OPMN_HOME = catDir($ORACLE_HOME,'opmn') var $OVD_HOME = catDir($ORACLE_HOME,'ovd') var $PORTAL_HOME = catDir($ORACLE_HOME,'portal') var $REPORTS_HOME = catDir($ORACLE_HOME,'reports') var $WEBCACHE_HOME = catDir($ORACLE_HOME,'webcache') =head2 error - Installation Type Error Indicates that the identified Oracle home does not contain information related to a supported installation type. =cut debug ' Inside IREQ module, analyzing Oracle home ',basename($ORACLE_HOME) debug ' Inside IREQ module, validating the installation type' var $COMPS = catFile($ORACLE_HOME,'inventory','ContentsXML','comps.xml') if ?testFile('fr',$COMPS) {if xmlFind(xmlLoadFile($COMPS),'PRD_LIST/TL_LIST/COMP') {var ($xml) = (last) var $ver = xmlValue($xml,'VER') var $dsc = xmlData(xmlFind($xml,'EXT_NAME')) if !or(defined(testDir('d',catDir($ORACLE_HOME,'webgate'))),\ and(match($dsc,'^(Classic Application Server 11g|\ Oracle Business Intelligence Shiphome|\ Oracle Client|\ (Oracle\s)?EPM System|\ Oracle Forms and Reports 11g|\ Oracle Identity Management 11g|\ Oracle Portal, Forms, Reports and Discoverer 11g|\ Oracle WebTier)',true),\ match($ver,'^11\.'))) call dsp_error($ORACLE_HOME,$dsc,$ver) } } elsif !?testDir('d',$OPMN_HOME) call dsp_error() =head2 abbr - Abbreviations Displays the RDA abbreviations defined for the Oracle home collection. =cut debug ' Inside IREQ module, collecting defined abbreviations' report abbr prefix {write '---+ Oracle Home Abbreviations' write '|*Abbreviation*|*Location*|' } var %hsh = getSymbols() loop $key (keys(%hsh)) write '|',$key,' |',$hsh{$key},' |' if isCreated(true) toc '2:[[',getFile(),'][rda_report][Abbreviations]]' =head2 product_info - Product Information Gathers the product information. =cut if ?testDir('d',catDir($ORACLE_HOME,'inventory')) {debug ' Inside IREQ module, getting product information (can take time)' report product_info prefix {write '---+!! Product Information' write '---## From ',encode($ORACLE_HOME),' ' write $TOC } call inventory_details(lastDir(),true) if isCreated(true) toc '2:[[',getFile(),'][rda_report][Product Information]]' } =head2 Install and Configuration Gathers the Oracle Fusion Middleware configuration and installation files. =cut debug ' Inside IREQ module, gathering install and configuration information' pretoc '2:Installation and Configuration' call sort_files(3,$TAIL,\ grepDir($ASSISTANTS_HOME,'\.log$','dir'),\ grepDir($CFGTOOLLOGS_HOME,'\.(ini|log|properties|xml)','dir'),\ grepDir($INSTALL_HOME,'\.(ini|log)','dir')) unpretoc if ?testDir('d',catDir($ORACLE_HOME,'diagnostics')) {debug ' Inside IREQ module, gathering diagnostics information' pretoc '2:Diagnostics' call sort_files(3,$TAIL,\ grepDir(lastDir(),'\.((conf|ini|xml|properties|err)$|log)|\~','dir')) unpretoc } =head2 Manifest Information Gathers the Oracle home manifest information. =cut if chk_area('Manifest') {debug ' Inside IREQ module, getting Oracle home manifest information \ (can take time)' pretoc '2:Manifest Information' call dsp_manifest(3,$ORACLE_HOME) unpretoc } # Check the user var ($own,$uid) = () loop $tid (getFocus()) break ?$uid = getOwner(catFile(getGroupDir('D_CWD',${CUR.D_DATA}),\ concat(${CUR.W_ABBR},$tid,'_TF.toc'))) if grepDir(catDir($OPMN_HOME,'bin'),'^opmnctl(\.(bat|exe))?$','fip') var $own = getOwner(last) elsif ?testFile('fr',$COMPS) var $own = getOwner($COMPS) if compare('eq',$uid,$own) var $NOT_OWNER = false else {var $NOT_OWNER = true echo tput('reverse'),'Warning:' echo '========' echo 'The RDA is started as userid: ',$uid echo 'The Oracle home ',$ORACLE_HOME, ' was installed using userid: ',\ nvl($own,'[not found]') echo 'The RDA script will continue, but it will skip some collection steps.',\ tput('off') } =head2 Oracle Business Intelligence Enterprise Edition Gathers the Oracle Business Intelligence Enterprise Edition version and its executable. =cut if chk_area('BI',$BI_HOME) {# Load the library on first usage if !isImplemented('collect_bi_generic') run BI:BIr11() # Collect the Business Intelligence information call setPrefix(concat($pre,'_BI')) pretoc '1++:Oracle Business Intelligence Enterprise Edition' call collect_bi_generic($BI_HOME) unpretoc call setPrefix($pre) } =head2 Oracle Discoverer Gathers the Oracle Discoverer executable and library versions. =cut if chk_area('DSCV',$DISCOVERER_HOME) {call setPrefix(concat($pre,'_DSCV')) pretoc '1++:Oracle Discoverer' run OFM:DSCVinfo(true) unpretoc call setPrefix($pre) } =head2 Oracle Forms/Reports Gathers the Oracle Forms/Reports installation files and collects all general Fusion Middleware information for Oracle Forms/Reports. =cut if chk_area('DEV',$FORMS_HOME,$REPORTS_HOME) {var $ENV = {} var $PS_EF var $DEV_VER = undef var $IAS_VER = undef var $IAS_ALONE = 'unknown' var $IAS_HOME = undef var $APPS_INST = undef var $OAH_TOP = undef # Load the library on first usage if !isImplemented('collect_dev_generic') run OFM:DEVr11() # Adapt the environment variables run &{check(getOsName(),'aix', 'OS:OSaix',\ 'darwin', 'OS:OSdarwin',\ 'dec_osf', 'OS:OSosf',\ 'dynixptx', 'OS:OSptx',\ 'hpux', 'OS:OShpux',\ 'linux', 'OS:OSlinux',\ 'solaris', 'OS:OSsunos',\ cond(isCygwin(), 'OS:OSwin32',\ isUnix(), 'OS:OSunix',\ isVms(), 'OS:OSvms',\ isWindows(),'OS:OSwin32'))}('DEV',\$ENV,\$PS_EF) var $bkp = setContext($ENV) # Collect the Developer information call setPrefix(concat($pre,'_DEV')) pretoc '1++:Oracle Forms/Reports' run OFM:DEVinfo(\$PS_EF,\$DEV_VER,\$IAS_VER,\$IAS_ALONE,\$IAS_HOME,\ \$APPS_INST,\$OAH_TOP) call collect_dev_generic() unpretoc call setPrefix($pre) # Restore the initial environment call restoreContext($bkp) } =head2 Oracle HTTP Server Gathers the Oracle HTTP server executable list and the F script. =cut if chk_area('HTTP') {debug ' Inside IREQ module, listing Oracle HTTP Server executables' pretoc '1++:Oracle HTTP Server' report ohs_bin var $dir = catDir($APACHE_TOP,'bin') prefix write '---+ List of Files in ',encode($dir) call statDir('an',$dir) if isCreated(true) {write $TOP toc '2:[[',getFile(),'][rda_report][Executable List]]' } var $fil = catFile($dir,'apachectl') if ?testFile('fr',$fil) {debug ' Inside IREQ module, getting apachectl start script' report ohs_apachectl write '---+ Content Taken from File ',encode($fil) call writeFile($fil) write $TOP toc '2:[[',getFile(),'][rda_report][apachectl]]' } unpretoc } =head2 Oracle Internet Directory Displays the output of the F command. Displays the C status. Displays the information about processes. Lists details from the C table. Lists details from the C table. Displays the contents of the F<$OH/ldap/odi/conf/odi.properties> file. =cut if chk_area('OID',$LDAP_HOME) {call setPrefix(concat($pre,'_OID')) pretoc '1++:Oracle Internet Directory' run OFM:OIDinfo(true,false) unpretoc call setPrefix($pre) =head2 LDAP Gathers the LDAP executable list. =cut if ?testDir('d',$dir = catDir($LDAP_HOME,'bin')) {debug ' Inside IREQ module, gathering LDAP information' report LDAP_bin prefix write '---+ List of Files in ',encode($dir) call statDir('an',$dir) if isCreated(true) {toc '1++:LDAP' toc '2:[[',getFile(),'][rda_report][Executable List]]' } } } =head2 OPMN Gathers the OPMN executable list. =cut if chk_area('OPMN',$dir = catDir($OPMN_HOME,'bin')) {debug ' Inside IREQ module, getting OPMN information' report OPMN_bin prefix write '---+ List of Files in ',encode($dir) call statDir('an',$dir) if isCreated(true) {write $TOP toc '1++:OPMN' toc '2:[[',getFile(),'][rda_report][Executable List]]' } } =head2 Oracle Virtual Directory Gathers the Oracle Virtual Directory executable list. =cut if chk_area('OVD',$OVD_HOME) {# Load the library on first usage if !isImplemented('collect_ovd_generic') run OFM:OVDr11() # Collect the Oracle Virtual Directory information call setPrefix(concat($pre,'_OVD')) pretoc '1++:Oracle Virtual Directory' call collect_ovd_generic($OVD_HOME) unpretoc call setPrefix($pre) } =head2 Oracle Web Cache Gathers the Oracle Web Cache file permissions and DTD files. =cut if chk_area('WEBC',$WEBCACHE_HOME) {# Load the library on first usage if !isImplemented('collect_webc_generic') run OFM:WEBCr11() # Collect the Web Cache information call setPrefix(concat($pre,'_WEBC')) pretoc '1++:Oracle Web Cache' call collect_webc_generic($WEBCACHE_HOME) unpretoc call setPrefix($pre) } # Restore module prefix call setPrefix($PRE) } =head1 INSTANCES COLLECTIONS Performs the following collections on all specified instances: =cut # Collect the data for each instance var $cnt = 0 loop $key (keys(%INSTANCES)) {# Skip when not requested call setCurrent($INSTANCES{$key}) next !getFocus() call switchToc(last) call setPrefix($pre = concat($PRE,'i',incr($cnt))) # Instance home initialization var $ORACLE_HOME = getHome('.') var $APACHE_TOP = catDir($ORACLE_HOME,'ohs') var $BI_HOME = catDir($ORACLE_HOME,'bifoundation') var $DISCOVERER_HOME = catDir($ORACLE_HOME,'discoverer') var $FORMS_HOME = catDir($ORACLE_HOME,'forms') var $LDAP_HOME = catDir($ORACLE_HOME,'ldap') var $OVD_HOME = catDir($ORACLE_HOME,'ovd') var $PORTAL_HOME = catDir($ORACLE_HOME,'portal') var $REPORTS_HOME = catDir($ORACLE_HOME,'reports') var $WEBCACHE_HOME = catDir($ORACLE_HOME,'webcache') # Get the instance name and its associated components var $ins = basename($top = getInstance('.')) var ($dsc) = get_components(\%cmp,$top,$ins,'.') debug ' Inside IREQ module, analyzing instance ',$dsc =head2 abbr - Abbreviations Displays the RDA abbreviations defined for the instance home collection. =cut report abbr prefix {write '---+ Oracle Instance Abbreviations' write '|*Abbreviation*|*Location*|' } var %hsh = getSymbols() loop $key (keys(%hsh)) write '|',$key,' |',$hsh{$key},' |' if isCreated(true) toc '2:[[',getFile(),'][rda_report][Abbreviations]]' =head2 Oracle Business Intelligence Enterprise Edition Gathers the Oracle Business Intelligence Enterprise Edition configuration and log files. It includes a DMS dump along with its repositories. =cut if chk_area('BI',$BI_HOME) {# Load the library on first usage if !isImplemented('collect_bi_instance') run BI:BIr11() # Get the Business Intelligence repositories var @rep = () call collect_bi_repo_list(\@rep) # Collect the Business Intelligence information pretoc '1+++:Oracle Business Intelligence Enterprise Edition' call collect_bi_instance($pre,$top,\%cmp,\@rep) unpretoc } =head2 Oracle Discoverer Gathers Oracle Discoverer configuration and log files. Runs the F script. =cut if chk_area('DSCV',$DISCOVERER_HOME) {# Load the library on first usage if !isImplemented('collect_dscv_instance') run OFM:DSCVr11() # Collect the Discoverer information pretoc '1+++:Oracle Discoverer' call collect_dscv_instance($pre,$top,\%cmp) unpretoc } =head2 Oracle Forms/Reports Collects all start scripts. Collects the toolkit files (such as F, F, and F). Reports on versions used. Gathers the Oracle Forms/Reports configuration and log files. =cut if chk_area('DEV',$FORMS_HOME,$REPORTS_HOME) {# Load the library on first usage if !isImplemented('collect_dev_instance') run OFM:DEVr11() # Collect the Developer information pretoc '1+++:Oracle Forms/Reports' call collect_dev_instance($pre,$top,\%cmp) call collect_forms_instance($pre,$top,\%cmp) call collect_reports_instance($pre,$top,\%cmp) unpretoc } =head2 Oracle HTTP Server Gathers the Oracle HTTP server configuration and log files. It includes a DMS dump. =cut if chk_area('HTTP') {# Load the library on first usage if !isImplemented('httpServer_getListenerConf') run OFM:IAS() # Collect the HTTP server information debug ' - Getting Oracle HTTP Server configuration and log files' pretoc '1+++:Oracle HTTP Server' loop $key (keys(%cmp)) {var ($typ,$cmp) = split('\|',$key,2) next !match($typ,'^OHS$',true) var (%HTTPDCONF,%HTTPDERRLOG,%HTTPDREQLOG) = () var ($fil) = (grepDir(catDir(\ $top,'config',$typ,$cmp),'^httpd(s)?\.conf$','pf')) var ${F_HTTPD_CONF_LOCATION/T} = $fil call setPrefix(concat($pre,'_c_',$cmp)) pretoc "2:'",$cmp,"' OHS Component" # Collect the configuration files call httpServer_getListenerConf(true,$top,$typ,$cmp) pretoc '3:Configuration Files' loop $fil (keys(%HTTPDCONF)) {var $nam = catSymbol($fil) report concat('lc_',$nam) prefix write '---+ Content Taken from File ',encode($nam) call writeFile($fil) if isCreated(true) {write $TOP toc '4:[[',getFile(),'][rda_report][',encode($nam),']]' } } unpretoc # Collect the log files call httpServer_getListenerLogs(true,$top,$typ,$cmp) pretoc '3:Log Files' loop $fil (keys(%HTTPDERRLOG),keys(%HTTPDREQLOG),\ grepDir(catDir($top,'diagnostics','logs',$typ,$cmp),\ '^(console.*?\.log$|oblog\.log(\.trace)?$)','ip')) {var $nam = catSymbol($fil) report concat('ll_',$nam) prefix write '---+ Last ',$TAIL,' Lines from File ',encode($nam) call writeTail($fil,$TAIL) if isCreated(true) {write $TOP toc '4:[[',getFile(),'][rda_report][',encode($nam),']]' } } call httpServer_getOdlLog(true,$top,$typ,$cmp) unpretoc # Collect the DMS dump if $cmp{$key} {report dms_metrics var ($opmnctl) = grepDir(catDir($top,'bin'),'^opmnctl(\.(bat|exe))?$','fip') var $cmd = concat(quote($opmnctl),' @instance:',$dsc,\ ' metric op=query PROCESS_UID=',quote($cmp{$key}),\ ' dmsarg="format=raw&nountype=opmn_process" 2>&1') prefix {write '---+ Display of DMS Dump Metrics' write '---## Using: ',encode($cmd) } call writeCommand($cmd) if isCreated(true) {write $TOP toc '3:[[',getFile(),'][rda_report][DMS Dump]]' } } unpretoc } unpretoc call setPrefix($pre) } =head2 Oracle Internet Directory Displays the last lines of the monitor log. Displays the last lines of the LDAP log. Displays the last lines of the replication log. Displays the contents of the files in the F<$INSTANCE_ROOT/OID/load> directory. =cut if chk_area('OID',$LDAP_HOME) {# Load the library on first usage if !isImplemented('collect_oid_instance') run OFM:OIDr11() # Collect the Oracle Internet Directory information pretoc '1+++:Oracle Internet Directory' call collect_oid_instance($pre,$top,\%cmp) unpretoc } =head2 OPMN Gathers the OPMN information using F. It collects all C<*.conf>, C<*.log>, and C<*.xml> files. It includes a DMS dump. =cut # Collect the opmnctl information if chk_area('OPMN') {debug ' - Executing opmnctl' toc '1+++:OPMN' if $NOT_OWNER {report no_opmnctl write '---+ opmnctl' write $NOT_OWNER_STATEMENT toc '2:[[',getFile(),'][rda_report][opmnctl]]' } else {toc '2:opmnctl' var ($opmnctl) = grepDir(catDir($top,'bin'),'^opmnctl(\.(bat|exe))?$','fip') var $pgm = concat(quote($opmnctl),' @instance:',$dsc) report opmnctl_status write '---+ opmnctl status' var $cmd = concat($pgm,' status -l 2>&1') write '---## Using: ',encode($cmd) call writeCommand($cmd) write $TOP toc '3:[[',getFile(),'][rda_report][opmnctl status]]' report opmnctl_debug_pm write '---+ opmnctl debug comp=pn' var $cmd = concat($pgm,' debug comp=pm 2>&1') write '---## Using: ',encode($cmd) call writeCommand($cmd) write $TOP toc '3:[[',getFile(),'][rda_report][opmnctl debug comp=pn]]' report opmnctl_debug_ons write '---+ opmnctl debug comp=ons' var $cmd = concat($pgm,' debug comp=ons 2>&1') write '---## Using: ',encode($cmd) call writeCommand($cmd) write $TOP toc '3:[[',getFile(),'][rda_report][opmnctl debug comp=ons]]' } # Collect the configuration files debug ' - Getting OPMN config and log files' pretoc '2:Configuration Files' call sort_files(3,$TAIL,\ grepDir(catDir($top,'config','OPMN'),'\.(conf$|properties$|xml)','dir')) unpretoc # Collect the log files pretoc '2:Log Files' call sort_files(3,$TAIL,\ grepDir(catDir($top,'diagnostics','logs','OPMN'),'\.log$','dir')) unpretoc # Collect the DMS dump report opmn_metrics prefix {write '---+ Display of DMS Dump Metrics' write '---## Using: ',encode($cmd) } var $cmd = concat($pgm,' metric op=query PROCESS_UID=0 \ dmsarg="format=raw&nountype=opmn_process" 2>&1') call writeCommand($cmd) if isCreated(true) {write $TOP toc '2:[[',getFile(),'][rda_report][DMS Dump]]' } } =head2 Portal Diagnostics Collects the repository information from the Portal database. Run PDA in advanced mode for a detailed report collection. Gathers the list of Portal users from C. Gathers the HTTP status of URLs from the Portal and Infrastructure tier. Gathers the OID connection information. Provides a summary of the performance information logged by C. =cut if chk_area('PDA',$PORTAL_HOME) {# Load the library on first usage if !isImplemented('analyze_ohs_logs') run OFM:PDAr11() # Collect the Portal information pretoc '1+++:Portal Diagnostics' # Define the common variables var $OC4J_USED var $VERSION # Collect the portal repository information var $tns = setLocalEnv('TNS_ADMIN',catDir($top,'config')) run OFM:PDAinfo(\$OC4J_USED,\$VERSION) call setLocalEnv('TNS_ADMIN',$tns) # Analyze the OHS logs call analyze_ohs_logs($pre,$top,$OC4J_USED,$VERSION,\%cmp) unpretoc } =head2 Oracle Virtual Directory Collects the Oracle Virtual Directory-related configuration and log files. =cut if chk_area('OVD',$OVD_HOME) {# Load the library on first usage if !isImplemented('collect_ovd_instance') run OFM:OVDr11() # Collect the Oracle Virtual Directory information pretoc '1+++:Oracle Virtual Directory' call collect_ovd_instance($pre,$top,\%cmp) unpretoc } =head2 Oracle Web Cache Gathers the Oracle Web Cache configuration and log files. It includes a DMS dump. =cut if chk_area('WEBC',$WEBCACHE_HOME) {# Load the library on first usage if !isImplemented('collect_webc_instance') run OFM:WEBCr11() # Collect the Web Cache information pretoc '1+++:Oracle Web Cache' call collect_webc_instance($pre,$top,\%cmp) unpretoc } # Restore module prefix call setPrefix($PRE) } # Restore the default behavior call switchToc() =head2 HCVE When requested, performs the preinstallation checks. =cut var $pve = getProductVersion($PROD_ORACLE_HOME,'00') if compare('ne',substr($pve,0,2),'00') debug ' Inside IREQ module, product version identified as ',$pve if and(compare('eq',substr($pve,0,2),'11'),\ ${B_HCVE_CHECKS},\ ${CUR.O_SETUP}->search('IREQ_\w+_(CH|OI|OH)')) {debug ' Inside IREQ module, executing the preinstallation checks' if check(getOsName(),\ 'aix', 'OFM:Aofm1111_aix',\ 'hpux', 'OFM:Aofm1111_hp',\ 'linux', 'OFM:Aofm1111_lin',\ 'solaris', 'OFM:Aofm1111_sol',\ cond(isCygwin(), 'OFM:Aofm1111_win',\ isWindows(), 'OFM:Aofm1111_win')) {var $rul = last var ${T_ORACLE_SID/T} = '-' test TOOL:TLhcve($rul) } } # Restore the previous environment call restoreContext($env) =head1 SEE ALSO L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L =begin credits =over 10 =item RDA 4.21: Eliane Papillon Le Noc, Hector Viveros. =item RDA 4.24: Greg Cook, Andrew Salt. =item RDA 4.26: Laurence De Sulzer Wart. =item RDA 4.29: Adriana Dominguez. =item RDA 4.30: Maurice Bauhahn, Andrew Rowland. =item RDA 8.02: Laxmi Prasanna Madu, Pedro Nunes. =item RDA 8.04: Brad Donison, Sunder Subramanyan. =item RDA 8.06: Satish Madanwad, Taruna Nanecha. =item RDA 8.09: Pedro Nunes. =item RDA 8.10: Ian Reid. =back =end credits =head1 COPYRIGHT NOTICE Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. =head1 TRADEMARK NOTICE Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. =cut