# S909RDSP.def: Produces the Remote Data Collection Reports # $Id: S909RDSP.def,v 2.5 2012/01/03 13:34:47 mschenke Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_4/src/scripting/lib/modules/S909RDSP.def,v 2.5 2012/01/03 13:34:47 mschenke Exp $ # # Change History # 20120103 MSC Change the copyright notice. =head1 NAME S909RDSP - Produces the Remote Data Collection Reports =head1 DESCRIPTION This module produces the remote data collection reports. =head1 REMOTE DATA COLLECTION =cut echo tput('bold'),'Processing RDSP module ...',tput('off') # Initialization if !getSetting('REMOTE_NODES') return var @nod = split(',',last) var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' pretoc '1:Remote Data Collection' # Step description var %sta = ('-','Data collection done',\ 'I','Software installation pending',\ 'N','New',\ 'P','RDA post treatment pending',\ 'R','RDA execution pending',\ 'T','Data transfer pending',\ 'c','Installation check error',\ 'd','Remote collection disabled',\ 'i','Software installation error',\ 'n','Remote connection error',\ 'p','RDA post treatment error',\ 'r','RDA execution error',\ 't','Data transfer error') # Get a remote setting macro get_node return getSetting(concat('REMOTE_',$arg[0],$arg[1]),$arg[2]) # Recover step information for aborted sessions debug ' Inside RDSP module, gathering collection status' if initSteps(true) call endSteps() =head2 overview - Node Information Gets node information. =cut debug ' Inside RDSP module, gathering node information' report overview prefix {write '---+!! Node Information' write $TOC write '---+ Node Overview' write '|*ID*|*Prefix*|*Host*|*Description*|' } loop $nod (@nod) write '|',$nod,' |',\ get_node($nod,'_PREFIX',$nod),' |',\ get_node($nod,'_HOSTNAME'), ' |',\ get_node($nod,'_DESCRIPTION'),' |' if isCreated(true) {write $TOP toc '2:[[',getFile(),'][rda_report][Node Information]]' # Get initial properties loop $nod (@nod) {var (%key,%tbl) = () loop $lin (grepFile(getGroupFile('D_CWD',getRemoteSetup($nod,true)),'^\w+=')) var $tbl{key($lin)} = value($lin) loop $key ('ORACLE_HOME','ORACLE_SID',\ split(':',$tbl{'REMOTE_COMMON_SETTINGS'}),\ split(':',$tbl{'REMOTE_NODE_SETTINGS'})) {if exists($tbl{$key}) var $key{$key} = 1 } prefix {write '---+ Initial Settings for ',$nod write '|*Name*|*Value*|' } loop $key (keys(%key)) write '|',$key,' |',$tbl{$key},' |' if hasOutput(true) write $TOP } } =head2 results - Collected Data Gets the remote data collection results. =cut # Get all collected report package var $flg = $[RDA]->get_info('RDA_CASE') loop $rpt (grepDir(${OUT.P},concat('^',${CUR.GROUP},'\_'),'i')) {next !match($rpt,concat('^',${CUR.GROUP},'\_(.*)\.'),true) var ($nod) = (last) if !$flg var ($rpt,$nod) = (lc($rpt),uc($nod)) var $lnk{$nod} = concat('[[remote/',$rpt,'][',encode($rpt),']]') } # Produce the report debug ' Inside RDSP module, processing the data collection results' report results prefix {write '---+ Collected Data' write '|*Node*|*Description*|*Status*|*File*|' } loop $nod (@nod) write '|',join(' |',$nod,\ get_node($nod,'_DESCRIPTION'),\ $sta{get_node($nod,'_STEP','N')},\ nvl($lnk{$nod},' ')\ ),' |' if isCreated() toc '2:[[',getFile(),'][rda_report][Collected Data]]' =begin credits =over 10 =item RDA 4.5: Bob Caldwell. =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