# S566HCM.def: Collects Oracle Hyperion Calculation Manager Information # $Id: S566HCM.def,v 1.3 2012/08/27 14:42:37 mschenke Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_4/src/scripting/lib/modules/S566HCM.def,v 1.3 2012/08/27 14:42:37 mschenke Exp $ # # Change History # 20120824 KRA Extend diagnostic log files collection. =head1 NAME S566HCM - 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 use Buffer echo tput('bold'),'Processing HCM module ...',tput('off') # Initialization var $EPM_HOME = ${EPM_HOME:${ENV.EPM_ORACLE_HOME:${ENV.HYPERION_HOME:''}}} var $HCM_REQUESTS = ${HCM_REQUESTS} var $TAIL = ${RDA_TAIL:1000} var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' pretoc '1:Hyperion Calculation Manager' # Load the common library run library() =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 ?$HCM_REQUESTS {loop $uid (split('\|',$HCM_REQUESTS)) {next !$uid var $ins = getSetting(concat('HCM_HOME',$uid)) call setAbbr(concat('HCM_i',$uid)) pretoc '%SPLIT%' pretoc "1+:'",getSetting(concat('HCM_INSTANCE',$uid)),"' Deployment" =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')) {if $buf = new('Buffer','r',$fil) {var $lnk = encode($fil) var $siz = getSize($fil) if $siz {output d,concat('L_',basename($fil)) if ${CUR.LAST}->write_tail($buf,$TAIL,['F',$fil,'F','T']) var $lnk = concat('[[',${CUR.LAST}->get_file,'][_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 reports generated by the WREQ module for the associated Oracle WebLogic Server domain. =cut if ?getSetting(concat('HCM_DOM',$uid,'_REQ_DOMAIN')) {var $dom = basename(last) toc '%PUSH("%SPLIT%")%' toc '%PUSH("1++:Oracle WebLogic Server Overview")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_HCM_TOP',$uid,'.toc",1)%' toc '%POP2%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1++:',"'",$dom,"'",' Domain")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_HCM_DOM',$uid,'.toc",1)%' toc '%POP2%' } unpretoc 2 } } =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 WREQ module for the associated Oracle WebLogic Server domain (on versions having a product registry). =cut elsif ?${HCM_DOM_REQ_DOMAIN} {var $dom = basename(last) toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Overview")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_HCM_TOP.toc")%' toc '%POP2%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:',"'",$dom,"'",' Domain")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_HCM_DOM.toc")%' toc '%POP2%' } unpretoc =head1 SEE ALSO 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, 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