# DClcm.ctl:382:Collects Oracle Lifecycle Management Information # $Id: DClcm.ctl,v 1.1 2015/09/29 07:56:06 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/OFM/DClcm.ctl,v 1.1 2015/09/29 07:56:06 RDA Exp $ # # Change History # 20150922 KRA Initial version. =for stopwords Lifecycle =head1 NAME OFM:DClcm - Collects Oracle Lifecycle Management Information =head1 DESCRIPTION This module collects diagnostic information for Oracle Lifecycle Management. The following reports can be generated and are regrouped under C: =cut echo tput('bold'),'Processing OFM.LCM module ...',tput('off') # Initialization var $IAM_TOP = ${D_IAM_TOP:''} var $LCM_CFG = ${D_LCM_CFG:''} var $LCM_HOME = ${D_ORACLE_HOME:''} var $LCM_TOP = ${D_LCM_TOP:''} var $TAIL = ${DFT.N_TAIL:1000} var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' pretoc '1:Oracle Lifecycle Management' # Set the symbols call setSymbol('$IAM_TOP',$IAM_TOP) call setSymbol('$LCM_CFG',$LCM_CFG) call setSymbol('$LCM_HOME',$LCM_HOME) call setSymbol('$LCM_TOP',$LCM_TOP) # Load the common macros run RDA:library() =head1 ORACLE HOME COLLECTIONS =head2 abbr - Abbreviations Displays the RDA abbreviations defined for the Oracle home collection. =cut debug ' Inside LCM 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 if Oracle Lifecycle Management is installed in a separate Oracle home. =cut if ${B_DISTINCT_HOME} {# Load the common macros run RDA:INVinfo() debug ' Inside LCM module, processing Product Information (can take time)' report product_info title '---+!! LCM Oracle Home Product Information' title '---## From ',encode($LCM_HOME),' ' title $TOC prefix write '---+ Files in LCM Oracle Home' call statDir('an',$LCM_HOME) if hasOutput(true) write $TOP call inventory_details(catDir($LCM_HOME,'inventory'),${B_INTERIM}) if isCreated() toc '2:[[',getFile(),'][rda_report][Product Information]]' } =for stopwords Phaseguard =head2 pg_perms - Phaseguard File Permissions Collects the owner and group permissions of the files used by Lifecycle Management Phaseguard. =cut debug ' Inside LCM module, gathering phaseguard file permissions' report pg_perms prefix write '---+ Phaseguard File Permissions' call statDir('an',catDir($LCM_TOP,'provisioning','phaseguards')) if isCreated(true) {write $TOP toc '2:[[',getFile(),'][rda_report][Phaseguard File Permissions]]' } =head2 Configuration Files Gathers Lifecycle Management-related configuration files. =cut debug ' Inside LCM module, collecting the configuration files' pretoc '2:Configuration Files' call sort_files(3,0,\ catFile($LCM_CFG,'topology','topology.xml'),\ catFile($LCM_HOME,'release.txt'),\ catFile($IAM_TOP,'provisioning','plan','provisioning.plan')) unpretoc =head2 Log Files Gathers Lifecycle Management-related log files. =cut debug ' Inside LCM module, collecting the log files' pretoc '2:Log Files' call sort_files(3,$TAIL,\ grepDir(catDir($LCM_TOP,'provisioning','logs',${RDA.HOST}),'\.log$','dir')) unpretoc =head1 ORACLE WEBLOGIC SERVER DOMAIN COLLECTIONS It includes all reports produced by the L module for the specified Oracle WebLogic Server domains. =cut # Analyze the domain requests var %tbl = () loop $req (${CUR.O_SETUP}->search('^WREQ_OFM_LCM_DOM')) {var $dom = $req->get_first('I_DOMAIN') if ?$dom->get_first('I_WL_HOME') var $tbl{last->get_oid,$req->get_oid} = $dom->get_first('T_DOMAIN_NAME') else var $tbl{'WH',$req->get_oid} = $dom->get_first('T_DOMAIN_NAME') } # Include the table of content files produced by WREQ var $cnt = 0 loop $oid (keys(%tbl)) {var $flg = $cnt incr $cnt toc '%PUSH("%SPLIT%")%' if $flg toc '%PUSH("1+:Oracle WebLogic Server ',$cnt,' Overview")%' elsif compare('ne',$oid,'WH') toc '%PUSH("1+:Oracle WebLogic Server Overview")%' toc '%INCLUDE("OFM_WREQ_OFM_LCM_',$oid,'_TF.toc")%' toc '%POP2%' loop $tid (keys($tbl = $tbl{$oid})) {toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:',"'",$tbl->{$tid},"'",' Domain")%' toc '%INCLUDE("OFM_',$tid,'_TF.toc")%' toc '%POP2%' } } unpretoc =head1 SEE ALSO L, L, L =begin credits =over 10 =item RDA 8.10: Brad Donison. =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