# S557HFR.def: Collects Oracle Hyperion Financial Reporting Information # $Id: S557HFR.def,v 1.8 2012/08/10 10:46:56 mschenke Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_4/src/scripting/lib/modules/S557HFR.def,v 1.8 2012/08/10 10:46:56 mschenke Exp $ # # Change History # 20120808 KRA Improve epmsys_registry collection. =head1 NAME S557HFR - Collects Oracle Hyperion Financial Reporting Information =head1 DESCRIPTION This module collects information for Oracle Hyperion Financial Reporting. The following reports can be generated and are regrouped under C: =cut use Buffer echo tput('bold'),'Processing HFR module ...',tput('off') # Initialization var $EPM_HOME = ${EPM_HOME:${ENV.EPM_ORACLE_HOME:${ENV.HYPERION_HOME:''}}} var $HFR_REQUESTS = ${HFR_REQUESTS} var $ORACLE_PARENT = ${ORACLE_PARENT:''} var $TAIL = ${HFR_TAIL:1000} var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' pretoc '1:Hyperion Financial Reporting' # Load the common macros run EPMlib() run library() # Password file on version 11.1.2.2 and later var $EPM_VERSION = get_epm_version($EPM_HOME) if compare('valid',$EPM_VERSION,'11.1.2.2') {var $epm = createTemp('EPMPWD','.tmp',false) if getSetting('SQL_PASSWORD_EPM_REGISTRY') var ($pwd) = unpack('u',last) else var $pwd = askPassword('Enter Shared Services database password:') call writeTemp('EPMPWD',$pwd) call closeTemp('EPMPWD') } =head2 registry - Registry Information For Windows, collects Hyperion Financial Reporting-related Registry information. =cut if or(isWindows(),isCygwin()) {debug ' Inside HFR module, gathering HFR registry information' report registry prefix {write '---+!! Hyperion Financial Reporting Registry Information' write $TOC } if writeRegistry('HKCU\Software\Hyperion Analytic Reporter') write $TOP if writeRegistry('HKLM\SOFTWARE\Oracle Corporation\Financial Reporting Studio') write $TOP if writeRegistry(\ 'HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment') write $TOP if writeRegistry('HKLM\SOFTWARE\Hyperion Solutions\FinancialReporting') write $TOP if writeRegistry('HKLM\SOFTWARE\Hyperion Solutions\Financial Reporting0') write $TOP if writeRegistry('HKLM\SOFTWARE\Hyperion Solutions\Hyperion Reports') write $TOP if hasRegOption() {if writeRegistry64('HKLM\SOFTWARE\AFPL Ghostscript') write $TOP if writeRegistry32('HKLM\SOFTWARE\AFPL Ghostscript') write $TOP if writeRegistry64('HKLM\SOFTWARE\GPL Ghostscript') write $TOP if writeRegistry32('HKLM\SOFTWARE\GPL Ghostscript') write $TOP } else {if writeRegistry('HKLM\SOFTWARE\AFPL Ghostscript') write $TOP if writeRegistry('HKLM\SOFTWARE\Wow6432Node\AFPL Ghostscript') write $TOP if writeRegistry('HKLM\SOFTWARE\GPL Ghostscript') write $TOP if writeRegistry('HKLM\SOFTWARE\Wow6432Node\GPL Ghostscript') write $TOP } if writeRegistry('HKLM\SYSTEM\CurrentControlSet\Services\HyS9FRReport') write $TOP if isCreated(true) toc '2:[[',getFile(),'][rda_report][Registry Information]]' =head2 tcpip_registry - TCPIP Registry Information For Windows, collects TCPIP Registry information. =cut debug ' Inside HFR module, gathering TCPIP registry information' report tcpip_registry prefix {write '---+!! TCPIP Registry Information' write $TOC } if writeRegistry('HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters') write $TOP if isCreated(true) toc '2:[[',getFile(),'][rda_report][TCPIP Registry Information]]' } =head2 Startup Scripts Gets startup scripts. =cut debug ' Inside HFR module, gathering startup scripts' pretoc '2:Startup Scripts' call sort_files(3,0,\ catFile($EPM_HOME,'BiPlus','bin',${AS.CMD:'FRSetenv'}),\ catFile($EPM_HOME,'BiPlus','bin',${AS.BAT:'start_BIPlus'}),\ catFile($EPM_HOME,'BiPlus','bin',${AS.BAT:'set_common_env'}),\ catFile($EPM_HOME,'products','BiPlus','bin',${AS.CMD:'FRSetenv'}),\ catFile($EPM_HOME,'products','BiPlus','bin',${AS.BAT:'start_BIPlus'}),\ catFile($EPM_HOME,'products','BiPlus','bin',${AS.BAT:'set_common_env'}),\ catFile($EPM_HOME,'products','BiPlus','bin',${AS.BAT:'start'}),\ catFile($EPM_HOME,'products','FinancialReportingStudio','products',\ 'financialreporting','bin',${AS.CMD:'FRSetenv'}),\ catFile($EPM_HOME,'products','FinancialReportingStudio','products',\ 'financialreporting','bin',${AS.CMD:'hrcmd'}),\ catFile($EPM_HOME,'products','FinancialReportingStudio','products',\ 'financialreporting','bin',${AS.CMD:'ManageUserPov'}),\ catFile($EPM_HOME,'products','FinancialReportingStudio','products',\ 'financialreporting','bin',${AS.CMD:'SchedulerJobsCopier'}),\ catFile($EPM_HOME,'deployments','WebSphere6','bin',\ ${AS.BAT:'startFinancialReporting'})) unpretoc =head2 Configuration Files Gets configuration files. =cut var @fil = () loop $sub (findDir(catDir($EPM_HOME,'common','httpServers','Apache'),\ '^conf$','ir',2)) call push(@fil,\ catFile($sub,'httpd.conf'),\ catFile($sub,'HYSL-Weblogic.conf')) debug ' Inside HFR module, gathering configuration files' pretoc '2:Configuration Files' call sort_files(3,0,\ grepDir(catDir($EPM_HOME,'BiPlus','lib'),\ '^(fr_.*\.properties|fr\.env|EnvSetup\.properties)$','np'),\ grepDir(catDir($EPM_HOME,'products','BiPlus','lib'),\ '^(fr_.*\.properties|fr\.env|EnvSetup\.properties)$','np'),\ catFile($EPM_HOME,'common','config','product','biplus','9.3.1.0',\ 'biplus_1_config.xml'),\ catFile($EPM_HOME,'common','config','9.5.0.0','product','biplus','9.5.0.0',\ 'biplus_1_config.xml'),\ catFile($EPM_HOME,'products','financialreporting','lib',\ 'clientlogging.xml'),\ catFile($EPM_HOME,'products','financialreporting','lib',\ 'printserverlogging.xml'),\ catFile($EPM_HOME,'products','FinancialReportingStudio','products',\ 'financialreporting','bin','ManageUserPov.properties'),\ catFile($EPM_HOME,'products','FinancialReportingStudio','products',\ 'financialreporting','bin','SchedulerJobsCopier.properties'),\ catFile($EPM_HOME,'products','FinancialReportingStudio','products',\ 'financialreporting','bin','SchedulerJobsCopierlogging.xml'),\ catFile($EPM_HOME,'products','FinancialReportingStudio','products',\ 'financialreporting','bin','ManageUserPovlogging.xml'),\ catFile($EPM_HOME,'products','FinancialReportingStudio','products',\ 'financialreporting','bin','ManageUserPovSample.xml'),\ catFile($ORACLE_PARENT,'ohs','diagnostics','config','registration',\ 'OUI.xml'),\ @fil) unpretoc =head2 ver_hfr - Java Archive Versions Collects the Java archive versions for the following files: From F directory, =over 4 =item o F =item o F =back From F directory, =over 4 =item o F =item o F =back From F directory, =over 4 =item o F =item o F =item o F =item o F =back From F directory, =over 4 =item o F =item o F =back When F is available, it extracts the manifest from Java archives. =cut var $UNZIP = findCommand('unzip') debug ' Inside HFR module, gathering java archive versions' report ver_hfr prefix {write '---+!! Java Archive Version Information' write $TOC } loop $fil (\ catFile($EPM_HOME,'BiPlus','lib','HReports.jar'),\ catFile($EPM_HOME,'BiPlus','lib','foundation.jar'),\ catFile($EPM_HOME,'products','BiPlus','lib','HReports.jar'),\ catFile($EPM_HOME,'products','BiPlus','lib','foundation.jar'),\ catFile($EPM_HOME,'deployments','Tomcat5','FinancialReporting','webapps',\ 'hr','WEB-INF','lib','HReports.jar'),\ catFile($EPM_HOME,'deployments','OAS','FinancialReporting','webapps',\ 'hr','WEB-INF','lib','HReports.jar'),\ catFile($EPM_HOME,'deployments','WebLogic','FinancialReporting','webapps',\ 'hr','WEB-INF','lib','HReports.jar'),\ catFile($EPM_HOME,'deployments','WebSphere6','profile','installedApps',\ 'hyslCell','HReports.ear','hr.war','WEB-INF','lib','HReports.jar'),\ catFile($EPM_HOME,'common','workspacert','9.5.0.0','lib','annotation.jar'),\ catFile($EPM_HOME,'common','workspacert','9.5.0.0','lib','foundation.jar')) {if testFile('f',$fil) {write '---+ Version Information from ',encode($fil) call statFile('p',$fil) write '%BR%' if or(isWindows(),isCygwin()) {var $inf = getVersionInfo($fil) loop $key (keys($inf)) write '|*',$key,' *|',replace($inf->{$key},'\012','%BR%',true),' |' } write $TOP if and(match($fil,'\.jar$',true),$UNZIP) {prefix write '---++ Manifest Information' var $cmd = concat($UNZIP,' -p ',$fil,' META-INF/MANIFEST.MF') call writeCommand($cmd) if hasOutput(true) write $TOP } } } if isCreated(true) toc '2:[[',getFile(),'][rda_report][Java Archive Versions]]' =head2 Log Files Gets log files. =cut var @fil = () loop $sub (findDir(catDir($EPM_HOME,'common','httpServers','Apache'),\ '^logs$','ir',2)) call push(@fil,catFile($sub,'error.log')) debug ' Inside HFR module, gathering log files' pretoc '2:Log Files' call sort_files(3,$TAIL,\ grepDir(catDir($EPM_HOME,'BiPlus','logs'),\ '^(FRReportSrv|FRClient|FRSchedSrv|FRPrintSrv|FRWebApp)\.log',\ 'np'),\ grepDir(catDir($EPM_HOME,'logs','BiPlus'),\ '^(FRReportSrv|FRClient|FRSchedSrv|FRPrintSrv|FRWebApp)\.log',\ 'np'),\ grepDir(catDir($EPM_HOME,'logs','config'),'^configtool\.log','np'),\ catFile($EPM_HOME,'logs','install','biplus-install.log'),\ catFile($EPM_HOME,'logs','install','common-install.log'),\ catFile($EPM_HOME,'logs','install','common-product-install.log'),\ catFile($EPM_HOME,'logs','config','configtool_err.log'),\ catFile($EPM_HOME,'logs','workspace','workspace.log'),\ catFile($EPM_HOME,'logs','workspace','stdout_console.log'),\ catFile($EPM_HOME,'logs','workspace','servlets_backupMessages.log'),\ catFile($EPM_HOME,'deployments','WebLogic9','servers','Workspace','logs',\ 'workspace.log'),\ @fil) unpretoc =head1 DEPLOYMENT REPORTS Available on version 11.1.2 and later. =cut if ?$HFR_REQUESTS {loop $uid (split('\|',$HFR_REQUESTS)) {next !$uid var $ins = getSetting(concat('HFR_HOME',$uid)) call setAbbr(concat('HFR_i',$uid)) toc '%SPLIT%' toc "1+:'",getSetting(concat('HFR_INSTANCE',$uid)),"' Deployment" =head2 Startup Scripts Collects the startup scripts from the F<$INSTANCE_HOME/bin> directory. =cut debug ' Inside HFR module, getting instance startup scripts' pretoc '2:Startup Scripts' call sort_files(3,0,\ catFile($ins,'bin',${AS.BAT:'startFinancialReporting'}),\ catFile($ins,'bin','deploymentScripts',\ ${AS.BAT:'setCustomParamsFinancialReporting'})) unpretoc =head2 CSS Configuration Exports the CSS Configuration using F<$INSTANCE_HOME/bin/epmsys_registry.sh> or F<$INSTANCE_HOME/bin/epmsys_registry.bat>. =cut debug ' Inside HFR module, getting the CSS Configuration' call collect_cssconfig(2,catDir($ins,'bin'),$epm) =head2 Configuration Files Collects the logging configuration files from the F<$INSTANCE_HOME/config> directory. =cut debug ' Inside HFR module, getting the logging configuration files' pretoc '2:Configuration Files' call cat_report(catDir($ins,'config'),'FinancialReporting.properties') unpretoc =head2 diaglogs - Diagnostic Log Files Collects the diagnostic log files from the F<$INSTANCE_HOME/diagnostics/logs> directory. =cut debug ' Inside HFR module, getting the diagnostic log files' report diaglogs var $log = catDir($ins,'diagnostics','logs') prefix {write '---+!! Diagnostic Log Files' write '---## From: ',$log if $TAIL write ' * Last ',$TAIL,' lines from the log files captured' write ' * Links point to files that have been collected in their original \ format. Opening them directly in your browser can present \ risks. To prevent them, access the file outside the browser or \ use the link to save them and use an adequate viewer.' write '|*File Name*| *Size*|*Last Modified Date*|' } loop $fil (grepDir(catDir($log,'FinancialReporting'),'^[^\.]+','pt')) {if $buf = new('Buffer','r',$fil) {var $lnk = encode($fil) var $siz = getSize($fil) if $siz {output d,concat('L_',basename($fil)) if cond($TAIL,${CUR.LAST}->write_tail($buf,$TAIL,['F',$fil,'F','T']),\ ${CUR.LAST}->write_data($buf,['F',$fil,'F','T'])) var $lnk = concat('[[',${CUR.LAST}->get_raw(true),'][_blank][',$lnk,']]') end ${CUR.LAST} } write '|',$lnk,' | ',$siz,'|',\ getLastModify($fil,'%d-%b-%Y %H:%M:%S'),' |' } } if isCreated(true) toc '2:[[',getFile(),'][rda_report][Diagnostic Log Files]]' =head2 Oracle WebLogic Server Information Includes the Oracle WebLogic Server reports generated by the WREQ module for the associated Oracle WebLogic Server domain. =cut if ?getSetting(concat('HFR_DOM',$uid,'_REQ_DOMAIN')) {var $dom = basename(last) toc '%PUSH("%SPLIT%")%' toc '%PUSH("1++:Oracle WebLogic Server Overview")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_HFR_TOP',$uid,'.toc",1)%' toc '%POP2%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1++:',"'",$dom,"'",' Domain")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_HFR_DOM',$uid,'.toc",1)%' toc '%POP2%' } } } =head1 PRODUCT REPORTS Collects the following reports on versions earlier than 11.1.2: =head2 cssconfig - CSS Configuration Exports the CSS Configuration using F<$HYPERION_HOME/common/config/9.5.0.0/epmsys_registry.sh> or F<$HYPERION_HOME/common/config/9.5.0.0/epmsys_registry.bat> (on versions earlier than 11.1.2). =cut else {debug ' Inside HFR module, getting the CSS Configuration' call collect_cssconfig(2,catDir($EPM_HOME,'common','config','9.5.0.0'),$epm) =head2 Oracle WebLogic Server Information Includes the Oracle WebLogic Server reports generated by the WREQ module for the associated Oracle WebLogic Server domain (on versions having a product registry). =cut if ?${HFR_DOM_REQ_DOMAIN} {var $dom = basename(last) toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Overview")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_HFR_TOP.toc")%' toc '%POP2%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:',"'",$dom,"'",' Domain")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_HFR_DOM.toc")%' toc '%POP2%' } } # Unlink the temporary password file when existing if ?$epm call unlinkTemp('EPMPWD') unpretoc =head1 SEE ALSO L, L, L =begin credits =over 10 =item RDA 4.23: Jim Kusnerik. =item RDA 4.29: Maurice Bauhahn. =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