# MCcrs.ctl:100:Performs Cluster Multi-run Collections # $Id: MCcrs.ctl,v 1.8 2015/07/27 09:33:36 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/DB/MCcrs.ctl,v 1.8 2015/07/27 09:33:36 RDA Exp $ # # Change History # 20150724 KRA Avoid environment change in OpenVMS. =head1 NAME DB:MCcrs - Performs Cluster Multi-run Collections =head1 DESCRIPTION This module regroups multi-run collections specific to the clusters. =cut use Mrc var @COMMON_SECTIONS = ('CRS_ocrdump','CRS_olrdump') keep @COMMON_SECTIONS =head1 CLUSTER MULTI-RUN COLLECTIONS =for stopwords ocrdump =head2 ocrdump - ocrdump Collects C information when requested. =cut section CRS_ocrdump if and(${SET.DB.CRS.B_OCRDUMP},\ defined(testDir('d',$hom = ${SET.DB.CRS.D_CRS_HOME}))) {debug ' Inside CRS module, requesting an ocrdump' report ocrdump if !isVms() var $env = setLocalEnv('ORACLE_HOME',$hom) var $cmd = cond(isVms(),'ocrdump',catFile($hom,'bin','ocrdump')) var $tmp = newTemp('ocrdump') if and(${SET.DB.CRS.B_XML_OCRDUMP},\ loadCommand(concat(cond(isVms(),$cmd,lastCommand()),' -xml ',$tmp)),\ testFile('s',$tmp)) {write '---+ OCR Dump in XML Format' write '---## Using: ',encode($cmd) if isFiltered() call writeFilter($tmp,'(\binterfaces\b.*?)\d{1,3}(\|d\d{1,3}){3}','%R:IP4%') else call writeFile($tmp) } elsif loadCommand(concat(cond(isVms(),$cmd,lastCommand()),' ',$tmp,' 2>&1')) {write '---+ OCR Dump' write '---## Using: ',encode($cmd) if isFiltered() call writeFilter($tmp,'(\binterfaces\b.*?)\d{1,3}(\|d\d{1,3}){3}','%R:IP4%') else call writeFile($tmp) } else {write '---+ OCR Dump Error' call writeLastFile() } call unlinkTemp('ocrdump') if isCreated(true) {call validate(true) toc '3:[[',getFile(),'][rda_report][ocrdump]]' } if !isVms() call setLocalEnv('ORACLE_HOME',$env) } =for stopwords olrdump =head2 olrdump - olrdump Collects C information when requested. =cut section CRS_olrdump if ?testDir('d',$hom = ${SET.DB.CRS.D_CRS_HOME}) {debug ' Inside CRS module, requesting an olrdump' report olrdump if !isVms() var $env = setLocalEnv('ORACLE_HOME',$hom) var $pgm = cond(isVms(),'ocrdump',catCommand($hom,'bin','ocrdump')) var $tmp = newTemp('olrdump') if and(loadCommand($cmd = concat($pgm,' -local ',$tmp)),\ testFile('s',$tmp)) {write '---+ Oracle Cluster/Local Registry Dump' write '---## Using: ',encode($cmd) call writeFile($tmp) } else {write '---+ Oracle Cluster/Local Registry Dump Error' call writeLastFile() } call unlinkTemp('olrdump') if isCreated(true) {call validate(true) toc '3:[[',getFile(),'][rda_report][olrdump]]' } if !isVms() call setLocalEnv('ORACLE_HOME',$env) } =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