# DARVload.def: Collects DARV Data # $Id: DARVload.def,v 1.9 2008/02/25 17:32:54 mschenke Exp $ # ARCS: $Header: /home/cvs/repository/RDA_4/src/scripting/lib/modules/DARVload.def,v 1.9 2008/02/25 17:32:54 mschenke Exp $ # # Change History # 20080225 MSC Change the copyright notice. =head1 NAME DARVload - Collects DARV Data =head1 DESCRIPTION This module collects a copy of the Database Activity Recorder files. The following report is produced: =head2 dar_box - Database Activity Recorder When available, this module collects a copy of the Database Activity Recorder files. =cut var $ORACLE_SID = field(':',-1,getSetting('ORACLE_SID','')) if and($ORACLE_SID,isUnix()) {debug ' Inside LOAD module, gathering database activity recorder information' # Get the ps command format var $PS_EF run &{check(getOsName(),'aix', 'OSaix',\ 'darwin', 'OSdarwin',\ 'dec_osf', 'OSosf',\ 'dynixptx', 'OSptx',\ 'hpux', 'OShpux',\ 'linux', 'OSlinux',\ 'solaris', 'OSsunos',\ 'OSunix')}('PS') # Search for dar.box report dar_box prefix {write '---+ Database Activity Recorder' write '|*Oracle SID*|*Recorder Directory*|*Data*|' } var $alt = '' var $ext = catDir(getSetting('RPT_DIRECTORY'),'extern') var $flg = true var $grp = getSetting('RPT_GROUP') var $pat = undef loop $sid ($ORACLE_SID,getSetting('ASM_ORACLE_SID')) {if $sid var $pat = join('|',$pat,concat('^',quote($sid),'$')) } loop $lin (grepCommand($PS_EF,'\bdar\s')) {var ($dir,$sid) = match($lin,'\s(\S+/(\+?\w+))/dar\s') next !$sid var $dat = '' if match($sid,$pat,true) {var $dst = concat($grp,'_dar',uc($sid),'.box') if transfer($dir,'dar.box',$ext,$dst,true) var ($flg,$dat) = (false,concat('[[extern/',$dst,'][_blank][dar.box]]')) } elsif and($flg,match($lin,'\s\-m')) {var $dst = concat($grp,'_dar.box') if transfer($dir,'dar.box',$ext,$dst,true) var $alt = $dir } write '|',$sid,' |',$dir,' |',$dat,' |' } if and($flg,$alt) write '| |',$alt,' |[[extern/',$grp,'_dar.box][_blank][dar.box]]|' if isCreated(true) toc '2:[[',getFile(),'][rda_report][Database Activity Recorder]]' } =head1 SEE ALSO See also L, L, L, L, L, L, L, L, L, L. =begin credits =over 10 =item RDA 4.3: Michel Villette. =back =end credits =head1 COPYRIGHT NOTICE Copyright (c) 2002-2008, Oracle. All rights reserved. =head1 TRADEMARK NOTICE Oracle, JD Edwards, PeopleSoft, and Siebel are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. =cut