# DCsta.ctl:369:Collects StorageTek Tape Analytics Information # $Id: DCsta.ctl,v 1.9 2015/08/21 15:30:22 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/OFM/DCsta.ctl,v 1.9 2015/08/21 15:30:22 RDA Exp $ # # Change History # 20150821 MSC Improve time consistency. =head1 NAME OFM:DCsta - Collects StorageTek Tape Analytics Information =head1 DESCRIPTION This module collects information related to StorageTek Tape Analytics, formerly known as Tape Business Intelligence. The following reports can be generated and are regrouped under C: =head1 REPORTS =cut echo tput('bold'),'Processing OFM.STA module ...',tput('off') # Initialization var $LOG_DIR = ${D_LOG:'/var/log/tbi'} var $TAIL = ${DFT.N_TAIL:1000} var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' pretoc '1:StorageTek Tape Analytics' # Load the common macros run RDA:library() # Excute the below script before collecting the database related files if ${I_DOMAIN} {var $tgt = addTarget(last) var $cfg = catDir($tgt->get_mw_home('.'),'mySql','scripts') call system(concat(catCommand($cfg,${AS.CMD:'diagnosticDump'}),' 2>&1')) =head2 MySQL Scripts Gathers the MySQL-related scripts. =cut debug ' Inside STA module, gathering mysql scripts' pretoc '2:MySQL Scripts' call sort_files(3,0,grepDir($cfg,'.','p')) unpretoc } =head2 Configuration Files For UNIX, gathers StorageTek Tape-related configuration files. =cut if ${RDA.B_UNIX} {debug ' Inside STA module, gathering configuration files' pretoc '2:Configuration Files' call sort_files(3,0,'/etc/my.cnf') unpretoc =head2 Installation Log Files For UNIX, gathers StorageTek Tape-related installation log files. =cut debug ' Inside STA module, gathering install log files' pretoc '2:Installation Log Files' call sort_files(3,$TAIL,grepDir(catDir($LOG_DIR,'install'),'^\.+$','drv')) unpretoc =head2 Analytics Log Files For UNIX, gathers StorageTek Tape Analytics-related log files. =cut # Macro to get the logs macro get_logs {var (\@dat,\@tbl,$dir,$pat) = @arg # Analyze the directory loop $nam (grepDir($dir,'^\.+$','nv')) {next match($nam,$pat,true) var $pth = catFile($dir,$nam) if ?testDir('d',$pth) call push(@sub,$pth) elsif ?testFile('fr',$pth) {if ?testFile('T',$pth) call push(@tbl,$pth) elsif !isFiltered() call push(@dat,$pth) } } # Treat the subdirectories loop $sub (@sub) call get_logs(\@dat,\@tbl,$sub) } debug ' Inside STA module, gathering log files' pretoc '2:Analytics Log Files' var (@dat,@tbl) = () call get_logs(\@dat,\@tbl,$LOG_DIR,'^install$') call sort_files(3,$TAIL,@tbl) =head3 bin_log - Binary Log Files For UNIX, collects StorageTek Tape Analytics binary log files, when the security filter is not enabled. =cut debug ' Inside STA module, gathering binary log files' report bin_log prefix {write '---+!! Binary Log Files' 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 (@dat) {var $bas = basename($fil) var $lnk = encode($bas) var $siz = getSize($fil) if $siz {output => b,$bas if ${CUR.O_LAST}->write_file($fil) var $lnk = concat('[[',${CUR.O_LAST}->get_raw(true),'][_blank][',$lnk,']]') end ${CUR.O_LAST} } write '|',$lnk,' | ',$siz,'|',getLastModify($fil,''),' |' } if isCreated(true) toc '3:[[',getFile(),'][rda_report][Binary Log Files]]' unpretoc } =head2 Oracle WebLogic Server Domain Information It includes all reports produced by the L module for the specified Oracle WebLogic Server domain. =cut toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Overview")%' toc '%INCLUDE("OFM_WREQ_OFM_STA_WH_TF.toc")%' toc '%POP2%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Domain")%' toc '%INCLUDE("OFM_WREQ_OFM_STA_DOM_TF.toc")%' toc '%POP2%' unpretoc =head1 SEE ALSO L, L =begin credits =over 10 =item RDA 4.24: Mark Mayernick. =item RDA 4.25: Judy Leach. =item RDA 4.27: Mark Mayernick. =item RDA 8.05: Mark Mayernick. =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