# DChcm.ctl:566:Collects Oracle Hyperion Calculation Manager Information # $Id: DChcm.ctl,v 1.8 2015/08/21 16:04:40 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/BI/DChcm.ctl,v 1.8 2015/08/21 16:04:40 RDA Exp $ # # Change History # 20150821 MSC Improve time consistency. =head1 NAME BI:DChcm - Collects Oracle Hyperion Calculation Manager Information =head1 DESCRIPTION This module collects information for Oracle Hyperion Calculation Manager. The following reports can be generated and are regrouped under C: =cut echo tput('bold'),'Processing BI.HCM module ...',tput('off') # Initialization var $EPM_HOME = ${GRP.EPM.D_HOME:${ENV.EPM_ORACLE_HOME:${ENV.HYPERION_HOME:''}}} var $TAIL = ${DFT.N_TAIL:1000} var $PRE = setPrefix() var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' pretoc '1:Hyperion Calculation Manager' # Load the common library run RDA:library() =head2 abbr - Abbreviations Displays the RDA abbreviations defined for the Hyperion Calculation Manager home collection. =cut debug ' Inside HCM module, collecting defined home abbreviations' report abbr prefix {write '---+ Hyperion Calculation Manager 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 HCM Log Files Gathers Hyperion Calculation Manager log files. =cut debug ' Inside HCM module, gathering HCM log files' pretoc '2:HCM Log Files' call sort_files(3,$TAIL,\ catFile($EPM_HOME,'logs','aps','apsserver.log'),\ grepDir(catDir($EPM_HOME,'logs','calcmgr'),'\.log$','p')) unpretoc =head2 Application Server Log Files Gathers application server log files. =cut debug ' Inside HCM module, gathering Application Server log files' pretoc '2:Application Server Log Files' call sort_files(3,$TAIL,\ grepDir(catDir($EPM_HOME,'deployments','WebSphere6','profile',\ 'logs','calcmgr'),'\.log$','p'),\ grepDir(catDir($EPM_HOME,'deployments','WebLogic9','servers',\ 'calcmgr','logs'),'\.log$','p'),\ grepDir(catDir($EPM_HOME,'deployment','Tomcat5','calcmgr',\ 'logs'),'\.log$','p')) unpretoc =head1 DEPLOYMENT REPORTS Available on version 11.1.2 and later. =cut if @ins = ${CUR.O_MODULE}->search('^OI') {var $CNT = 0 loop $itm (@ins) {var ($ins,$uid) = ($itm->get_first('D_HOME'),$itm->get_oid) call setSymbol('$EPM_INSTANCE',$ins) call setPrefix(concat($PRE,'i',incr($CNT))) pretoc '%SPLIT%' pretoc "1+:'",basename($ins),"' Deployment" =head2 abbr - Abbreviations Displays the RDA abbreviations defined for the Hyperion Calculation Manager instance collection. =cut debug ' Inside HCM module, collecting defined instance abbreviations' report abbr prefix {write '---+ Hyperion Calculation Manager Instance 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 diaglogs - Diagnostic Log Files Collects diagnostic log files from F<$INSTANCE_HOME/diagnostics/logs> directory. =cut report diaglogs var $log = catDir($ins,'diagnostics','logs') var %pat = (planning => '^calcmgr(deploy|execution|launch)\.log$',\ services => '^HyS9(CALC|Planning)-sys(err|out)\.log$') prefix {write '---+!! Diagnostic Log Files' write '---## From: ',$log 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 $sub (keys(%pat)) {loop $fil (grepDir(catDir($log,$sub),nvl($pat{$sub},'\.log$'),'ipt')) {var $lnk = encode($fil) var $siz = getSize($fil) if $siz {output => d,concat('L_',basename($fil)) if ${CUR.O_LAST}->write_tail($fil,$TAIL) var $lnk = concat('[[',${CUR.O_LAST}->get_raw(true),\ '][_blank][',$lnk,']]') end ${CUR.O_LAST} } write '|',$lnk,' | ',$siz,'|',getLastModify($fil,''),' |' } } if isCreated(true) toc '2:[[',getFile(),'][rda_report][Diagnostic Log Files]]' =head2 Oracle WebLogic Server Information Includes the Oracle WebLogic reports generated by the L module for the associated Oracle WebLogic Server domain. =cut if ${CUR.O_SETUP}->search(concat('^WREQ_BI_HCM_',replace($uid,'^OI','DOM'))) {var ($req) = last var $dom = $req->get_first('I_DOMAIN') var $oid = $dom->get_first('I_WL_HOME')->get_oid var $nam = $dom->get_first('T_DOMAIN_NAME') toc '%PUSH("%SPLIT%")%' toc '%PUSH("1++:Oracle WebLogic Server Overview")%' toc '%INCLUDE("OFM_WREQ_BI_HCM_',$oid,'_TF.toc",1)%' toc '%POP2%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1++:',"'",$nam,"'",' Domain")%' toc '%INCLUDE("OFM_',$req->get_oid,'_TF.toc",1)%' toc '%POP2%' } unpretoc 2 # Restore module prefix call setPrefix($PRE) } } =head1 PRODUCT REPORTS Collects the following reports on versions earlier than 11.1.2: =head2 Oracle WebLogic Server Information Includes the Oracle WebLogic Server reports generated by the L module for the associated Oracle WebLogic Server domain (on versions having a product registry). =cut elsif ?${GRP.EPM.D_DOMAIN} {var $dom = basename(last) toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Overview")%' toc '%INCLUDE("OFM_WREQ_BI_HCM_WH_TF.toc")%' toc '%POP2%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:',"'",$dom,"'",' Domain")%' toc '%INCLUDE("OFM_WREQ_BI_HCM_DOM_TF.toc")%' toc '%POP2%' } unpretoc =head1 SEE ALSO L, L =begin credits =over 10 =item RDA 4.28: Wendy Hodgetts, Chethan Kopparam. =item RDA 4.29: Krishnan Narasimha. =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