# DCdscv.ctl:390:Collects Oracle Discoverer Information # $Id: DCdscv.ctl,v 1.5 2015/07/03 12:04:44 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/OFM/DCdscv.ctl,v 1.5 2015/07/03 12:04:44 RDA Exp $ # # Change History # 20150703 MSC Improve the documentation. =head1 NAME OFM:DCdscv - Collects Information for Oracle Discoverer =head1 DESCRIPTION This module collects information for Oracle Discoverer. Produced reports are regrouped under C. =cut echo tput('bold'),'Processing OFM.DSCV module ...',tput('off') # Initialization var $ORACLE_HOME = ${D_ORACLE_HOME/P:''} var $MNU = '1:Oracle Discoverer' # Collect Discoverer Information if !?${B_PRIMARY} {# Initialization var $MAX = ${N_LOG_MAX:20} var $DISCOVERER_HOME = catDir($ORACLE_HOME,'discoverer') var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' var $VER = 'Version:\w+\s+[\d\.]+' pretoc $MNU # Collect the generic information run OFM:DSCVinfo(false,false,catFile($ORACLE_HOME,'webcache','webcache.xml')) # Load the common macros run RDA:library() =head2 Configuration Files Gathers configuration files. =cut debug ' Inside DSCV module, getting configuration file' var $fil = catFile($ORACLE_HOME,'config','ias.properties') var $ver = undef if ?testFile('f',$fil) {if grepFile($fil,'10\.1') var $ver = '10' elsif grepFile($fil,'9\.0') var $ver = '9' } if $ver {pretoc '2:Configuration File' if match($ver,'10') call sort_files(3,0,\ catFile($DISCOVERER_HOME,'.reg_key.dc'),\ catFile($DISCOVERER_HOME,'discwb.sh'),\ catFile($DISCOVERER_HOME,'util','pref.txt'),\ catFile($DISCOVERER_HOME,'config','configuration.xml'),\ catFile($DISCOVERER_HOME,'config','disco.conf')) elsif match($ver,'9') call sort_files(3,0,\ catFile($DISCOVERER_HOME,'.reg_key.dc'),\ catFile($DISCOVERER_HOME,'discwb.sh'),\ catFile($DISCOVERER_HOME,'util','pref.txt'),\ catFile($ORACLE_HOME,'j2ee','OC4J_BI_Forms','applications',\ 'discoverer','web','plus_files','xsl','plus_config.xml')) unpretoc } =head2 Log Files Gathers the most recent Oracle Discoverer logs. =cut debug ' Inside DSCV module, getting log files' pretoc '2:Log Files' var $cnt = $MAX if expr('>',$cnt,0) {var $dir = catDir($DISCOVERER_HOME,'logs') loop $nam (grepDir($dir,'\.xml$','it')) {call cat_report($dir,$nam,'log_') decr $cnt break !$cnt } } call cat_report(catDir($DISCOVERER_HOME,'util'),'error.txt') unpretoc =head2 not_found - Not found Used as a warning when no Oracle Discoverer files are found. =cut if !isTocCreated(true) {debug ' Inside DSCV module, no file found' report not_found write 'No Oracle Discoverer files were found and all files were optional. \ This does not mean there was necessarily a problem with RDA, but it \ should be investigated.' toc $MNU toc '2:[[',getFile(),'][rda_report][Not found]]' } } =head1 DISCOVERER INFORMATION FOR ORACLE FUSION MIDDLEWARE Includes the reports generated by the L module about the Oracle instances and their associated Oracle homes. =cut elsif or(${B_REQ_IREQ},${B_REQ_WREQ}) {# Analyze the instance requests var %tbl = () loop $req (${CUR.O_SETUP}->search('^IREQ_OFM_DSCV_OI')) {var $ins = $req->get_first('I_ORACLE_INSTANCE') if ?$ins->get_first('I_ORACLE_HOME')->get_prime('I_COMMON_HOME') var $tbl{last->get_oid,$req->get_oid} = $ins->get_first('D_ORACLE_INSTANCE') else var $tbl{'CH',$req->get_oid} = $ins->get_first('D_ORACLE_INSTANCE') } # Collect the DSCV 11g information toc '%PUSH("0: * Oracle Discoverer")%' loop $oid (keys(%tbl)) {toc '%PUSH("1+:Common Product Home")%' toc '%INCLUDE("OFM_IREQ_OFM_DSCV_',$oid,'_TF.toc")%' toc '%POP%' loop $tid (keys($tbl = $tbl{$oid})) {toc '%PUSH("0: * ',"'",basename($tbl->{$tid}),"'",' Instance")%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1++:Associated Oracle Home")%' toc '%INCLUDE("OFM_',replace($tid,'_OI','_OH'),'_TF.toc",1)%' toc '%POP2%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1++:Instance Home")%' toc '%INCLUDE("OFM_',$tid,'_TF.toc")%' toc '%POP3%' } } =head2 Oracle WebLogic Server Domain Information It includes all reports produced by the L module for the specified Oracle WebLogic Server domain. =cut toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Overview")%' toc '%INCLUDE("OFM_WREQ_OFM_DSCV_WH_TF.toc")%' toc '%POP2%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Domain")%' toc '%INCLUDE("OFM_WREQ_OFM_DSCV_DOM_TF.toc")%' toc '%POP3%' } =head1 SEE ALSO L, L, L, L, L =begin credits =over 10 =item RDA 4.4: Gurmakh Dev, Steve Fitzgerald. =item RDA 4.10: John Whitaker. =item RDA 4.15: Greg Cook, Andrew Salt. =item RDA 4.17: Sarath Babu, Gianluca Carosi, Evelene Raechel. =item RDA 4.22: Gianluca Carosi, Daniel Mortimer. =item RDA 4.24: Greg Cook, Andrew Salt. =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