# S328WCI.def: Collects Oracle WebCenter Information # $Id: S328WCI.def,v 1.5 2009/02/06 18:22:54 mschenke Exp $ # ARCS: $Header: /u02/webapps/workbench/cvs/RDA_4/src/scripting/lib/modules/S328WCI.def,v 1.5 2009/02/06 18:22:54 mschenke Exp $ # # Change History # 20090206 DEM Encode file names. =head1 NAME S328WCI - Collects Oracle WebCenter 11g Information =head1 DESCRIPTION This module collects diagnostic information for Oracle WebCenter 11g or later. The following reports can be generated and are regrouped under C: =cut echo tput('bold'),'Processing WCI module ...',tput('off') # Initialization var $ORACLE_HOME = catDir(getSetting('WCI_ORACLE_HOME','')) var $TAIL = getSetting('RDA_TAIL',1000) var $WCI_JDK = catDir(getSetting('WCI_JDK',catDir($ORACLE_HOME,'jdk'))) var $CFGTOOLLOGS_HOME = catDir($ORACLE_HOME,'cfgtoollogs') var $INSTALL_HOME = catDir($ORACLE_HOME,'install') var $OH = quote($ORACLE_HOME) var $OH1 = concat('^',$OH,'[\\\/]') var $OH2 = concat('^',$OH,'\b') var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' pretoc '1:Oracle WebCenter' # Load the common macros run INSTinfo() run library() =head1 ORACLE HOME COLLECTIONS =head2 error - WebCenter Error Indicates that the specified Oracle home does not contain Oracle WebCenter 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,'^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 Install and Configuration Gathers the Oracle Application Server configuration and installation files. =cut debug ' Inside WCI module, gathering installation and configuration information' pretoc '2:Installation and Configuration' 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 WCI module, gathering diagnostics information' pretoc '2:Diagnostics' call sort_files(3,$TAIL,\ grepDir(lastDir(),'\.((conf|ini|xml|properties|err)$|log)|\~','dir')) unpretoc } =head2 product_info - WebCenter Product Information Gathers the product information if Oracle WebCenter is installed in a separate Oracle home. =cut if getSetting('WCI_DISTINCT_HOME') {debug ' Inside WCI module, processing Product Information (can take time)' report product_info write '---+!! WebCenter Oracle Home Product Information' write $TOC write '---+ Files in WebCenter Oracle Home' call statDir('an',$ORACLE_HOME) write $TOP var $fil = catFile($ORACLE_HOME,'inventory','ContentsXML','comps.xml') if testFile('fr',$fil) call inventory_details($fil,getSetting('WCI_INTERIM')) toc '2:[[',getFile(),'][rda_report][WebCenter Product Information]]' } =head2 jdk_info - JDK Information Checks for the available JDK and reports its version. =cut debug ' Inside WCI module, gathering jar files' report jdk_info write '---+!! JDK Information' write $TOC var @tbl = grepDir($WCI_JDK,'^java(\.exe)?$','inr') loop $cmd (@tbl) {if testFile('fx',$cmd) {write '---++ JDK Location: ',encode(replace($cmd,$OH2,'$OH')) call statFile('p',$cmd) var $cmd = quote($cmd,'x') 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 '**No JDK found.**%BR%' write $TOP } toc '2:[[',getFile(),'][rda_report][JDK Information]]' =head2 jdk_libs - Java Libs Gathers information about all C<*.jar> files located in the common directory. For each Jar file, the report collects file information and the output from C. =cut debug ' Inside WCI module, gathering Java libs information' report java_libs prefix {write '---+!! Information about Java Libs' write '%TOC3-2%' } var $cmd = findCommand('cksum') loop $jar (grepDir(catDir($ORACLE_HOME,'j2ee','home'),'\.jar$','inr'),\ grepDir(catDir($ORACLE_HOME,'jlib'),'\.jar$','inr'),\ grepDir(catDir($ORACLE_HOME,'lib'),'\.jar$','inr'),\ grepDir(catDir($ORACLE_HOME,'jdbc','lib'),'\.(jar|zip)$','dir')) {if testFile('f',$jar) {if match($jar,$OH2) write '---++ ',encode(replace($jar,$OH2,'$OH')) else write '---++ ',encode($jar) call statFile('p',$jar) if $cmd {write '---++++!! cksum: (checksum size filename)' call writeCommand(concat($cmd,' ',quote($jar,'x'))) } write $TOP } } if isCreated(true) toc '2:[[',getFile(),'][rda_report][Java Libs]]' unpretoc =head1 SEE ALSO L, L =begin credits =over 10 =item RDA 4.14: Greg Cook, Andrew Salt. =back =end credits =head1 COPYRIGHT NOTICE Copyright (c) 2002-2009, Oracle. All rights reserved. =head1 TRADEMARK NOTICE Oracle, JD Edwards, PeopleSoft, and Siebel are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. =cut