# DCwc.ctl:328:Collects Oracle WebCenter Suite Information # $Id: DCwc.ctl,v 1.13 2015/07/17 16:42:08 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/OFM/DCwc.ctl,v 1.13 2015/07/17 16:42:08 RDA Exp $ # # Change History # 20150716 KRA Include 'Java KeyStore Validation' section. =head1 NAME OFM:DCwc - Collects Oracle WebCenter Suite 11g Information =head1 DESCRIPTION This module collects diagnostic information for Oracle WebCenter Suite 11g or later. The following reports can be generated and are regrouped under C: =cut echo tput('bold'),'Processing OFM.WC module ...',tput('off') # Initialization var $AGE = ${R_LOG_AGE/T:5} var $COMMON_HOME = ${D_COMMON_HOME/P:''} var $DOMAIN_HOME = ${D_DOMAIN_HOME:''} var $ORACLE_HOME = ${D_ORACLE_HOME/P:''} var $TAIL = ${DFT.N_TAIL:1000} var $WC_JDK = ${D_JDK:catDir($ORACLE_HOME,'jdk')} var $CFGTOOLLOGS_HOME = catDir($ORACLE_HOME,'cfgtoollogs') var $INSTALL_HOME = catDir($ORACLE_HOME,'install') var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' pretoc '1:Oracle WebCenter Suite' # Load the common macros run DB:DBinfo() run OFM:WLSlib() run RDA:INVinfo() run RDA:library() =head1 ORACLE HOME COLLECTIONS =head2 abbr - Abbreviations Displays the RDA abbreviations defined for the Oracle home collection. =cut debug ' Inside WC 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 error - WebCenter Error Indicates that the specified Oracle home does not contain Oracle WebCenter Suite information. =cut # Indicate WebCenter error macro dsp_error {echo ' Error: The specified Oracle home does not contain WebCenter \ information' report error write '** Error: The specified Oracle home does not contain files related to \ Oracle WebCenter 11g or later.**%BR%' 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][WebCenter Error]]' } # Validate the profile type var $flg = true var $fil = catFile($ORACLE_HOME,'inventory','ContentsXML','comps.xml') if ?testFile('fr',$fil) {if xmlFind(xmlLoadFile($fil),'PRD_LIST/TL_LIST/COMP') {var ($xml) = (last) var $ver = xmlValue($xml,'VER') var $dsc = xmlData(xmlFind($xml,'EXT_NAME')) if !and(match($dsc,'^(Oracle WebCenter Portal Suite 11g|\ Oracle WebCenter Suite 11g|\ Webcenter Application Server 11g)',true),\ match($ver,'^11\.')) {call dsp_error($ORACLE_HOME,$dsc,$ver) var $flg = false } } } if $flg {if !?testDir('d',catDir($ORACLE_HOME,'webcenter')) call dsp_error() } =head2 rep_info - Repository Information Collects the repository information from the selected Oracle WebCenter Suite database schemas. =cut pretoc '2:Repository Information' loop $tgt (@{I_DB}) {# Set the database context call setDbTarget($tgt) var (undef,undef,$usr) = getDbInfo() # Collect the repository information debug ' Inside WC module, gathering the repository information (',$usr,')' report concat('rep_info_',lc($usr)) if testDb() {echo '' echo tput('bold'),'The schema for ',$usr,' is not accessible.',tput('off') if getDbMessage() {echo last write '---+ Oracle WebCenter Repository Information (',$usr,')' write 'Database not accessible (',getDbMessage(),')' toc '3:[[',getFile(),"][rda_report]['",$usr,"' Schema]]" } echo '' } else {var $TTL = \ concat('---+!! Oracle WebCenter Repository Information (',$usr,')') var @TTL = ('',\ '---+ Version',\ '---+ Version Registry') var @HDR = ('',\ '|*Version*|*Label*|*DB Platform*|',\ '|*Component ID*|*Component Name*|*MRC Name*|*MR Name*|\ *MR Type*|*Owner*|*Version*|*Status*|*Upgraded*|*Start Time*|\ *Modified*|') set $sql {# SQL1 "SELECT '|' || " version || ' |' || " label || ' |' || " db_platform || ' |' " FROM wc_repository_version "/ "# MACRO separator(2) "# SQL2 "SELECT '|' || " comp_id || ' |' || " comp_name || ' |' || " mrc_name || ' |' || " mr_name || ' |' || " mr_type || ' |' || " owner || ' |' || " version || ' |' || " status || ' |' || " upgraded || ' |' || " start_time || ' |' || " modified || ' |' " FROM schema_version_registry "/ } call separator(1) call writeDb($sql) call separator(0,concat("'",$usr,"' Schema"),3) } } unpretoc =head2 product_info - Product Information Gathers the product information. =cut debug ' Inside WC module, processing Product Information (can take time)' if ${B_DISTINCT_HOME} {report product_info write '---+!! WebCenter Oracle Home Product Information' write '---## From ',encode($ORACLE_HOME),' ' write $TOC write '---+ Files in WebCenter Oracle Home' call statDir('an',$ORACLE_HOME) write $TOP call inventory_details(catDir($ORACLE_HOME,'inventory'),${B_INTERIM}) toc '2:[[',getFile(),'][rda_report][Product Information]]' } else {loop $id (findShares('OH_INV','RDA.CONFIG')) toc '2:[[',setShare($id),'][rda_report][Product Information]]' } =head2 Installation and Configuration Files Gathers the Oracle Fusion Middleware configuration and installation files. =cut debug ' Inside WC module, gathering installation and configuration information' pretoc '2:Installation and Configuration Files' call sort_files(3,$TAIL,\ grepDir($CFGTOOLLOGS_HOME,'\.(ini|log|properties|xml)','dir'),\ grepDir($INSTALL_HOME,'\.(ini|log)','dir')) unpretoc if ?testDir('d',catDir($ORACLE_HOME,'diagnostics')) {debug ' Inside WC module, gathering diagnostics information' pretoc '2:Diagnostics' call skip_files(catFile($dir=lastTestDir(),'config','registration','OUI.xml')) call sort_files(3,$TAIL,\ grepDir($dir,'\.((conf|ini|xml|properties|err)$|log)|\~','dir')) 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 debug ' Inside WC 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 WC 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 Extended Spaces Information Gathers the Extended Spaces manifest information. =cut debug ' Inside WC module, getting Extended Spaces manifest information' pretoc '2:Extended Spaces Information' pretoc '3:Manifest Information' call dsp_manifest(4,\ [catFile($ORACLE_HOME,'archives','applications','spaces-web.jar')]) unpretoc 2 =head2 Extended ADF Information Gathers the Extended ADF manifest information. =cut debug ' Inside WC module, getting Extended ADF manifest information' pretoc '2:Extended ADF Information' pretoc '3:Manifest Information' call dsp_manifest(4,\ [catFile($COMMON_HOME,'modules',\ "oracle.adf.model_\061\061\056\061\056\061",'adfm.jar')]) unpretoc 2 =for stopwords Personalization =head2 Personalization Server Information Gathers the Personalization server information. =cut debug ' Inside WC module, getting personalization server information' pretoc '2:Personalization Server Information' var $dir = catDir(splice(@dir = splitDir($DOMAIN_HOME),0,-2)) call sort_files(3,0,\ grepDir(catDir($dir,'applications',$dir[-1],'scripts'),'^\.+$','npv'),\ catFile($dir,'applications',$dir[-1],'conductor-extensions-library',\ 'WEB-INF','web.xml'),\ grepDir(catDir($dir,'applications',$dir[-1],'conductor-extensions-library',\ 'WEB-INF','classes'),'^\.+$','npv')) unpretoc =head2 jdk_info - JDK Information Checks for the available Java Development Kit and reports its version. =cut debug ' Inside WC module, gathering jar files' report jdk_info prefix {write '---+!! JDK Information' write $TOC } var @tbl = grepDir($WC_JDK,'^java(\.exe)?$','inr') loop $cmd (@tbl) {if ?testFile('f',$cmd) {write '---++ JDK Location: ',encode(catSymbol($cmd)) call statFile('p',$cmd) var $cmd = quote($cmd) write '---++++!! JDK Version' call writeCommand(concat($cmd,' -version 2>&1')) write '---++++!! JDK Full Version' call writeCommand(concat($cmd,' -fullversion 2>&1')) write $TOP } } if !hasOutput(true) {write '---+ JDK information' write '**No java executable found inside the JDK directory structure.**' } if isCreated() toc '2:[[',getFile(),'][rda_report][JDK Information]]' =for stopwords KeyStore =head2 jks_validation - Java KeyStore Validation Validates the Java KeyStore (JKS) file configured inside the domain using the C command. =cut debug ' Inside WC module, validating java keystore file' if ?testFile('f',\ catFile(catDir($DOMAIN_HOME,'config','fmwconfig'),'jps-config.xml')) {var $obj = xmlLoadFile(last,xmlDisable(xmlParser(),'DR')) report jks_validation title '---+!! Java KeyStore Validation' title $TOC loop $xml (xmlFind($obj,'jpsConfig/serviceInstances/serviceInstance \ provider="^keystore\.provider$"')) {var $jks = xmlValue($xml,'location') if !isAbsolute($jks) var $jks = catFile(lastDir(),$jks) prefix {write '---+ Validation of KeyStore ',encode(basename($jks)),' File' write '---## Using: ',encode($pgm) } call writeCommand($pgm = \ concat(catCommand($WC_JDK,'bin',${AS.EXE:'keytool'}),\ ' -list -v -keystore ',quote($jks))) if hasOutput(true) write $TOP } if isCreated(true) toc '2:[[',getFile(),'][rda_report][Java KeyStore Validation]]' } =head1 UNIVERSAL CONTENT MANAGEMENT COLLECTIONS =head2 Configuration Files Collects Content Server-related configuration files from a Oracle WebCenter Suite 11g installation. =cut if ?testDir('d',catDir($ORACLE_HOME,'ucm')) {debug ' Inside WC module, collecting UCM-related configuration files' pretoc '2:Universal Content Management' pretoc '3:Configuration Files' call sort_files(4,0,\ catFile($ORACLE_HOME,'ucm','admin','bin','intradoc.cfg'),\ catFile($ORACLE_HOME,'ucm','admin','config','config.cfg'),\ catFile($ORACLE_HOME,'ucm','bin','intradoc.cfg'),\ catFile($ORACLE_HOME,'ucm','config','config.cfg'),\ catFile($ORACLE_HOME,'ucm','config','jps-config.xml'),\ catFile($ORACLE_HOME,'ucm','config','license.cfg'),\ catFile($ORACLE_HOME,'ucm','config','system-jazn-data.xml')) unpretoc =head2 Log Files Collects Content Server-related log files from a Oracle WebCenter Suite 11g installation. =cut debug ' Inside WC module, collecting UCM-related log files' pretoc '3:Log Files' call sort_files(4,$TAIL,\ catFile($ORACLE_HOME,'ucm','etc','idcServerNT.log'),\ catFile($ORACLE_HOME,'ucm','etc','history'),\ catFile($ORACLE_HOME,'ucm','etc','log'),\ catFile($ORACLE_HOME,'ucm','etc','pid'),\ grepDir(catDir($ORACLE_HOME,'ucm','weblayout','groups','secure','logs'),\ '\.htm$',concat('dirm',$AGE))) unpretoc 2 } =head1 COMMON HOME INFORMATION Includes the reports generated by the L module about the common home. =cut toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Common Product Home")%' toc '%INCLUDE("OFM_IREQ_OFM_WC_CH_TF.toc")%' toc '%POP2%' =head1 ORACLE WEBLOGIC SERVER DOMAIN COLLECTIONS Includes the Oracle WebLogic reports generated by the L module. =cut toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Overview")%' toc '%INCLUDE("OFM_WREQ_OFM_WC_WH_TF.toc")%' toc '%POP2%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Domain")%' toc '%INCLUDE("OFM_WREQ_OFM_WC_DOM_TF.toc")%' toc '%POP2%' unpretoc =head1 SEE ALSO L, L, L, L, L, L =begin credits =over 10 =item RDA 4.14: Greg Cook, Andrew Salt. =item RDA 4.21: Pramod Vasista. =item RDA 4.23: Pramod Vasista. =item RDA 4.24: Greg Cook, Andrew Salt. =item RDA 4.26: Pramod Vasista. =item RDA 4.29: Meraj Mohammed. =item RDA 4.30: Laxmi Prasanna Madu. =item RDA 8.02: Laxmi Prasanna Madu, Pedro Nunes. =item RDA 8.04: Laxmi Prasanna Madu, Meraj Mohammed, Pedro Nunes. =item RDA 8.06: Laxmi Prasanna Madu, Pedro Nunes. =item RDA 8.08: Laxmi Prasanna Madu, Pedro Nunes. =item RDA 8.09: Laxmi Prasanna Madu, Pedro Nunes. =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