# TMalert.ctl: Analyzes Alert Log # $Id: TMalert.ctl,v 1.10 2015/05/29 06:11:26 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/DB/TMalert.ctl,v 1.10 2015/05/29 06:11:26 RDA Exp $ # # Change History # 20150527 KRA Improve the documentation. =head1 NAME DB:TMalert - Analyzes Alert Log =head1 DESCRIPTION This test module analyzes the alert log and provides a summary of finding in the final report. The alert log file can be specified in two ways: =over 3 =item a) Runs interactively. It requests the user to enter the absolute path of the alert log file. -vT alert -v run alert =item b) Runs from the command line. The input can be given in the command line using the following syntax: -vT alert:absolute_path_of_alert_log -v run alert absolute_path_of_alert_log If the file does not have a C<.xml> extension, then RDA assumes that the alert log is in a format earlier than Oracle Database 11g. Times are always truncated at second level. =back =cut options 'p:z:' section tool call unshift(@{CUR.W_NEXT},'test') section test echo tput('bold'),'Analyzing alert log ... (can take time)',tput('off') # Initialization var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' # Load the common macros run DB:DBalert() # When requested, set a virtual context if isArchived($opt{'z'}) call selectIndex(last,$opt{'p'}) # Obtain the input alert log file if $arg[0] var $fil = last else {call requestInput('TMalert') var $fil = ${RUN.REQUEST.F_LOG} } # Treat the file if !length($fil) echo 'Missing input file' elsif !?testVirtualFile('r',$fil) echo 'The input file does not exist or is not readable' else {call setAbbr('DB_ALERT_') report alert_summary call analyze_alert($fil,check($fil,'\.xml$',true,false)) if isCreated() {call getGroupFile('D_CWD',renderFile()) echo 'Result file: ',last } else echo 'The input file does not contain a valid alert log' } =head1 SEE ALSO L =begin credits =over 10 =item RDA 4.8: Jeff Gregory, Anatoli Karol. =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