# S369STA.def: Collects StorageTek Tape Analytics Information # $Id: S369STA.def,v 1.9 2012/01/23 12:30:50 mschenke Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_4/src/scripting/lib/modules/S369STA.def,v 1.9 2012/01/23 12:30:50 mschenke Exp $ # # Change History # 20120120 KRA Improve documentation and TOC generation. =head1 NAME S369STA - 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 STA module ...',tput('off') # Initialization var $TAIL = getSetting('RDA_TAIL',1000) var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' pretoc '1:StorageTek Tape Analytics' # Load the common macros run library() # Excute the below script before collecting the database related files if testDir('d',$dom = getSetting('STA_DOM_REQ_DOMAIN','')) {var $tgt = addTarget('DOM_Req$$',{DOMAIN_HOME=>$dom}) 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.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 from the F directory structure. =cut debug ' Inside STA module, gathering install log files' pretoc '2:Installation Log Files' call sort_files(3,$TAIL,grepDir('/var/log/tbi/install','^\.+$','drv')) unpretoc =head2 Analytics Log Files For UNIX, gathers StorageTek Tape Analytics-related log files from the F directory structure. =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,'/var/log/tbi','^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.LAST}->write_file($fil) var $lnk = concat('[[',${CUR.LAST}->get_file,'][_blank][',$lnk,']]') call $[OUT]->end_report(${CUR.LAST}) } write '|',$lnk,' | ',$siz,'|',\ getLastModify($fil,'%d-%b-%Y %H:%M:%S'),' |' } 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 WREQ module for the specified Oracle WebLogic Server domain. =cut toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Overview")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_STA_TOP.toc")%' toc '%POP2%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Domain")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_STA_DOM.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. =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