# S390DSCV.def: Collects Oracle Discoverer Information # $Id: S390DSCV.def,v 2.12 2012/01/03 13:34:46 mschenke Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_4/src/scripting/lib/modules/S390DSCV.def,v 2.12 2012/01/03 13:34:46 mschenke Exp $ # # Change History # 20120103 MSC Change the copyright notice. =head1 NAME S390DSCV - 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 Discoverer module ...',tput('off') # Initialization var $ORACLE_HOME = getSetting('ORACLE_HOME','') var $MNU = '1:Oracle Discoverer' # Collect Discoverer Information if !?getSetting('DSCV_PRIMARY') {# Initialization var $MAX = getSetting('DISCO_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 DSCVinfo(false,false,catFile($ORACLE_HOME,'webcache','webcache.xml')) # Load the common macros run 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 IREQ module about the Oracle instances and their associated Oracle homes. =cut elsif or(getSetting('DSCV_REQ_IREQ'),getSetting('DSCV_REQ_WREQ')) {# Collect the DSCV 11g information toc '%PUSH("0: * Oracle Discoverer")%' toc '%PUSH("1+:Common Product Home")%' toc '%INCLUDE("',${CUR.GROUP},'_IREQ_DSCV_CH.toc")%' toc '%POP%' loop $key (grepSetting('^DSCV_OI\d+_REQ_INSTANCE$')) {var $tid = substr($key,0,-13) var $ins = basename(getSetting($key,'')) toc '%PUSH("0: * ',"'",$ins,"'",' Instance")%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1++:Associated Oracle Home")%' toc '%INCLUDE("',${CUR.GROUP},'_IREQ_',replace($tid,'_OI','_OH'),'.toc",1)%' toc '%POP2%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1++:Instance Home")%' toc '%INCLUDE("',${CUR.GROUP},'_IREQ_',$tid,'.toc")%' toc '%POP3%' } =head2 Oracle WebLogic Server Domain Information Includes all reports collected for the specified Oracle WebLogic Server domain. =cut toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Overview")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_DSCV_TOP.toc")%' toc '%POP2%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Domain")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_DSCV_DOM.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, 2012, 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