# WEBCr11g.ctl: Defines Common Macros for Oracle Web Cache 11g # $Id: WEBCr11.ctl,v 1.4 2013/12/19 14:16:42 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/OFM/WEBCr11.ctl,v 1.4 2013/12/19 14:16:42 RDA Exp $ # # Change History # 20131219 KRA Fix spell. =for stopwords WEBCr =head1 NAME OFM:WEBCr11g - Defines Common Macros for Oracle Web Cache 11g =head1 DESCRIPTION This persistent submodule regroups macros that are common to Oracle Web Cache in Oracle Fusion Middleware 11g. The following macros are available: =cut # Make the module persistent and share macros keep $KEEP_BLOCK,@SHARE_MACROS var @SHARE_MACROS = ('collect_webc_generic','collect_webc_instance') # Load the common macros run RDA:library() =head2 S This macro gathers Oracle Web Cache file permissions and DTD files. =cut macro collect_webc_generic {var ($hom) = @arg import $WEBC_TAIL # Gather Web Cache file permissions debug ' Inside WEBC module, gathering Web Cache File Permissions' report perms prefix write '---+ Web Cache File Permissions' loop $fil ($hom,findDir($hom,'^[\.]+$','vr')) call statDir('an',$fil) if isCreated(true) toc '2:[[',getFile(),'][rda_report][File Permissions]]' # Collect DTD files related to Web Cache debug ' Inside WEBC module, gathering Web Cache DTD files' pretoc '2:DTD Files' call sort_files(3,$WEBC_TAIL,grepDir(catDir($hom,'dtds'),'\.dtd$','np')) unpretoc } =head2 S This macro collects Oracle Web Cache-related configuration and log files. It includes a DMS dump. =cut macro collect_webc_instance {var ($pre,$top,\%cmp) = @arg import $TOP,$WEBC_TAIL debug ' - Getting Oracle Web Cache configuration and log files' loop $key (keys(%cmp)) {var ($typ,$cmp) = split('\|',$key,2) next !match($typ,'^WebCache$',true) debug ' - ',$cmp,' component' call setPrefix(concat($pre,'_c_',$cmp)) pretoc "2:'",$cmp,"' WebCache Component" # Collect the configuration files pretoc '3:Configuration Files' call sort_files(4,$WEBC_TAIL,\ grepDir(catDir($top,'config',$typ,$cmp),'\.xml$','dir')) unpretoc # Collect the log files pretoc '3:Log Files' call sort_files(4,$WEBC_TAIL,\ grepDir(catDir($top,'diagnostics','logs',$typ,$cmp),'log$','dir')) unpretoc # Collect the DMS dump if $cmp{$key} {report dms_metrics var ($opmnctl) = grepDir(catDir($top,'bin'),'^opmnctl(\.(bat|exe))?$','fip') var $cmd = concat(quote($opmnctl),' @instance:',quote($dsc),\ ' metric op=query PROCESS_UID=',quote($cmp{$key}),\ ' dmsarg="format=raw&nountype=opmn_process" 2>&1') prefix {write '---+ Display of DMS Dump Metrics' write '---## Using: ',encode($cmd) } call writeCommand($cmd) if isCreated(true) {write $TOP toc '3:[[',getFile(),'][rda_report][DMS Dump]]' } } unpretoc } call setPrefix($pre) } =head1 SEE ALSO L =begin credits =over 10 =item RDA 4.16: Daniel Mortimer. =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