# DCow.ctl:348:Collects Oracle Waveset Information # $Id: DCow.ctl,v 1.8 2013/12/19 14:53:10 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/OFM/DCow.ctl,v 1.8 2013/12/19 14:53:10 RDA Exp $ # # Change History # 20131219 KRA Fix spell. =for stopwords Waveset =head1 NAME OFM:DCow - Collects Oracle Waveset Information =head1 DESCRIPTION This module collects Oracle Waveset-related information. The following reports can be generated and are regrouped under C: =head1 REPORTS =cut echo tput('bold'),'Processing OFM.OW module ...',tput('off') # Initialization var $WAS_PATH = ${D_WAS_PATH:''} var $WAS_TYPE = ${W_WAS} var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' toc '%TITLE("1:Oracle Waveset")%' # Load common macros run RDA:library() var %tbl = (GFS => '$GFS',\ JBS => '$JBOSS',\ TOM => '$TOMCAT',\ WLS => '$DOM',\ WSP => '$PROFILE') if missing($tbl{$WAS_TYPE}) echo 'Invalid Web server type' elsif ?testDir('d',$WAS_PATH) call setSymbol($tbl{$WAS_TYPE},$WAS_PATH) =head2 abbr_used - Abbreviations Displays the RDA abbreviations defined for Oracle Waveset collection. =cut report abbr_used prefix {write '---+ Oracle Waveset Abbreviations' write '|*Abbreviation*|*Location*|' } var %hsh = getSymbols() loop $abr (keys(%hsh)) write '|',$abr,' |',$hsh{$abr},' |' if isCreated(true) toc '%TITLE("2:[[',getFile(),'][rda_report][Abbreviations]]")%' =head2 Oracle GlassFish Server Log Files Collects Oracle GlassFish server log files. =cut if compare('eq',$WAS_TYPE,'GFS') {# Macro to identify the shared files from GFS module macro get_shares {var ($lvl,@id) = @arg # Identify the shared file list loop $id (@id) {var $fil = getShare($id) var $fil{dirname($fil),basename($fil)} = setShare($id) } # Generate the shared reports and related index links var $det = $lvl incr $det loop $grp (keys(%fil)) {# Start a new section toc $lvl,':',encode(addSymbol($grp)),' ' # Treat each file loop $nam (keys($fil{$grp})) toc $det,':[[',$fil{$grp,$nam},'][rda_report][',encode($nam),']]' } } debug ' Inside OW module, collecting the GlassFish log files' pretoc '2:Oracle GlassFish Server Log Files' call get_shares(3,findShares('GFS_LOG','OFM.GFS')) unpretoc } =head2 JBoss Server Log Files Collects JBoss server log files. =cut elsif ?testDir('d',$WAS_PATH) {if compare('eq',$WAS_TYPE,'JBS') {debug ' Inside OW module, collecting the JBoss log files' pretoc '2:JBoss Server Log Files' call sort_files(3,0,catFile($WAS_PATH,'server','default','log','server.log')) unpretoc } =head2 Tomcat Server Log Files Collects Tomcat server log files. =cut elsif compare('eq',$WAS_TYPE,'TOM') {debug ' Inside OW module, collecting the Tomcat log files' pretoc '2:Tomcat Server Log Files' call sort_files(3,0,catFile($WAS_PATH,'logs','catalina.out')) unpretoc } =head2 Oracle WebLogic Server Log Files Collects Oracle WebLogic server log files from the specified servers. =cut elsif compare('eq',$WAS_TYPE,'WLS') {debug ' Inside OW module, collecting the WebLogic log files' pretoc '2:Oracle WebLogic Server Log Files' loop $srv (@{W_WLS_SERVERS}) {pretoc "3:'",$srv,"' Server" call sort_files(4,0,\ grepDir(catDir($WAS_PATH,'servers',$srv,'logs'),\ concat('^',verbatim($srv),'\.log$'),'p')) unpretoc } unpretoc } =head2 IBM WebSphere Server Log Files Collects IBM WebSphere server log files from the specified servers. =cut elsif compare('eq',$WAS_TYPE,'WSP') {debug ' Inside OW module, collecting the Websphere log files' pretoc '2:IBM WebSphere Server Log Files' loop $srv (@{W_WSP_SERVERS}) {pretoc "3:'",$srv,"' Server" call sort_files(4,0,\ grepDir(catDir($WAS_PATH,'logs',$srv),'^System(Err|Out)\.log$','p')) unpretoc } unpretoc } } toc '%UNTITLE2%' =head1 SEE ALSO L =begin credits =over 10 =item RDA 4.27: Chris Conner. =item RDA 8.01: Georg Zigldrum. =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