# S489CM.def: Collects Oracle Communications CM Information # $Id: S489CM.def,v 1.7 2012/01/03 13:34:47 mschenke Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_4/src/scripting/lib/modules/S489CM.def,v 1.7 2012/01/03 13:34:47 mschenke Exp $ # # Change History # 20120103 MSC Change the copyright notice. =head1 NAME S489CM - Collect Oracle Communications Configuration Management Information =head1 DESCRIPTION This module collects Oracle Communications Configuration Management-related information. The following reports can be generated and are regrouped under C: =cut echo tput('bold'),'Processing CM module ...',tput('off') # Initialization var $CM_DOMAIN = getSetting('CM_DOMAIN','') var $CM_LIMIT = getSetting('CM_LIMIT',2000) var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' toc '1:Configuration Management' =head2 domain_directories - Domain Directory Listing Lists the content of the domain. =cut macro stat_tree {var ($dir) = @arg import $TOP prefix { } call statDir('n',$dir) if hasOutput(true) write $TOP loop $pth (grepDir($dir,'^\.+$','npv')) {if testFile('dr',$pth) {next testFile('l',$pth) call stat_tree($pth) } } } debug ' Inside CM module, listing domain directory structure' report domain_directories write '---+ Adminserver Domain Listing' write '---## Recursively Searched from ',encode($CM_DOMAIN) call stat_tree($CM_DOMAIN) toc '2:[[',getFile(),'][rda_report][Domain Directory Listing]]' =head2 domain_logs - Domain Log Files Collects domain log files. =cut debug ' Inside CM module, getting domain log files' report domain_logs write '---+!! Domain Log Files (',$CM_LIMIT,' lines of each type)' write '---## From ',$CM_DOMAIN write $TOC loop $fil (grepDir($CM_DOMAIN, '.*log$', 'p')) {prefix {if isCreated() write '---' write '---+',encode($fil) } call writeTail($fil,$CM_LIMIT) if hasOutput(true) write $TOP } loop $dir (grepDir($CM_DOMAIN,'logs','dr')) {loop $log (grepDir($dir,'log$','dr')) {var $max = $CM_LIMIT loop $fil (grepDir(dirname($log),concat('^',quote(basename($log))),'tr')) {break expr('<=',$max,0) prefix {if isCreated() write '---' write '---+',encode($fil) } call writeTail($fil,$max) decr $max,getWriteLength() if hasOutput(true) write $TOP } } } toc '2:[[',getFile(),'][rda_report][Domain Log Files]]' =begin credits =over 10 =item RDA 4.19: Robert Finley =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