# S430DBC.def: Collects Database Control Information # $Id: S430DBC.def,v 1.22 2008/02/25 17:32:56 mschenke Exp $ # ARCS: $Header: /home/cvs/repository/RDA_4/src/scripting/lib/modules/S430DBC.def,v 1.22 2008/02/25 17:32:56 mschenke Exp $ # # Change History # 20080225 MSC Change the copyright notice. =head1 NAME S430DBC - Collects Database Control Information =head1 DESCRIPTION This module collects Database Control-related information. The following reports can be generated and are regrouped under C: =cut echo tput('bold'),'Processing Database Control module ...',tput('off') # Initialization var $O_HOME_3 = catDir(getSetting('O_HOME_3','')) var $ORACLE_HOME = dirname($O_HOME_3) var $TAIL = getSetting('RDA_TAIL',1000) var $BASE = basename($O_HOME_3) var $EMCTL = catFile($ORACLE_HOME,'bin',cond(isWindows(),'emctl.bat','emctl')) var $OC4J = catDir($ORACLE_HOME,'oc4j','j2ee',concat('OC4J_DBConsole_',$BASE)) var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' var $ERR = ' (error)' var $OH = quote($ORACLE_HOME) var $OH1 = concat('^',$OH,'\b') pretoc '1:Database Control' # Load the common macros run EMdiag() run library() # Validate the context var $CFG = get_config($EMCTL) var $DBC = match($CFG,'dbconsole|true') if !$DBC {echo 'Not a valid Database Control install' return } # Set ORACLE_SID for emctl if match($BASE,'\_([^\.]+)$') var $env = setEnv('ORACLE_SID',last) else var $env = getEnv('ORACLE_SID',undef,true) =head2 emctl - emctl Command Output Displays the output of the following F command options: =over 4 =item o C =item o C =item o C =item o C =item o C =item o C =item o C =item o C =item o C =back =cut debug ' Inside DBC module, collecting emctl information' var @opt = ('getversion',\ 'status dbconsole',\ 'status agent',\ 'upload',\ 'status agent scheduler',\ 'status agent memory',\ 'status agent jobs',\ 'config agent getTZ',\ 'secure status') var @dsc = ('Database Control version',\ 'Current Database Control status',\ 'Current status of the agent',\ 'Makes upload request to the OMS. Shows error message (if any) \ returned by the OMS in response to the request.',\ 'List of collections currently scheduled for the agent',\ 'Current memory footprint of agent',\ 'List of current jobs running in the agent',\ 'Agent time zone',\ 'Agent and DBConsole secure status') var $cmd = exec_emctl($EMCTL,\@opt,\@dsc) =head2 monitored_targets - Monitored Targets Displays the targets found in the F file of the agent and performs some pre-defined tests on target properties. It also displays the current state of the target and its blackout information. =cut debug ' Inside DBC module, collecting monitored target information' call display_targets($cmd,$O_HOME_3,\ 'v,oracle_database,UserName,.',\ 'v,oracle_database,password,.',\ 'f,oracle_listener,ListenerOraDir,.',\ 'h,oracle_ias,StatusURL,.') =head2 oms_config - OMS Configuration Displays the content of the following configuration files: =over 24 =item F This file contains all the operational parameters for the OMS. =item F This file contains all the logging and tracing parameters for the OMS. =back =cut debug ' Inside DBC module, collecting OMS configuration' var @cfg = () var @log = () call display_oms_config($O_HOME_3,\@cfg,\@log) =head2 agent_config - Agent Configuration Collects the following configuration files: =over 24 =item F This file contains all the operational parameters for the agent. =item F This file contains the logging setup for the Java fetchlets. =back It also performs some pre-defined tests on the configuration properties. It reports failures. =cut debug ' Inside DBC module, collecting agent configuration' var @cfg = ('f,emdRootCertLoc,.') var @log = () call display_agent_config($O_HOME_3,\@cfg,\@log) =head2 file_permissions - File/Directory Details Displays the details of some files and directories and checks the ownership and permissions. =cut debug ' Inside DBC module, collecting files/directories details' var %dir = (catDir($O_HOME_3,'sysman','emd','state'),'o',\ catDir($O_HOME_3,'sysman','emd','upload'),'o',\ catDir($O_HOME_3,'sysman','recv'),'o') var %fil = ($EMCTL,'xo') var @own = (catFile($ORACLE_HOME,'bin','nmhs'),\ catFile($ORACLE_HOME,'bin','nmo')) call check_permissions('File/Directory Details',\@own,\%dir,\%fil) =head2 log_errors - Log Errors Filters all the lines with C message from various Database Control log files. =cut debug ' Inside DBC module, extracting errors from OMS log files' call extract_errors('Log Errors',$TAIL,\ grepDir(catDir($O_HOME_3,'sysman','log'),'^emagent_memDump','npv')) =head2 Log Files Collects the Database Control log files. =cut debug ' Inside DBC module, collecting DBcontrol log files' pretoc '2:Log Files' call sort_files(3,$TAIL,\ grepDir(catDir($O_HOME_3,'sysman','log'),'^emagent_memDump','npv'),\ grepDir(catDir($ORACLE_HOME,'opmn','logs'),'.','np'),\ grepDir(catDir($OC4J,'log'),'.','np')) unpretoc =head2 Miscellaneous Files Collects files that are related to Database Control. Some of the important files are as follows: =over 16 =item F This file specifies the list of special integration classes to be loaded when the Enterprise Manager application starts. These integration classes define and shape which special pages and features are enabled for the various target types. =item F This file contains OPMN settings. =item F This file contains specific settings for the OC4J application. =item F This file contains specific settings for the UIX Web pages including supported languages. =item F This file contains specific settings for the user interface. =back =cut debug ' Inside DBC module, collecting miscellaneous OMS files' pretoc '2:Miscellaneous Files' call sort_files(3,undef,\ grepDir(catDir($ORACLE_HOME,'Apache','Apache','conf'),'.conf$','np'),\ grepDir(catDir($ORACLE_HOME,'cfgtoollogs'),'.','np'),\ grepDir(catDir($ORACLE_HOME,'install'),'.','np'),\ catFile($ORACLE_HOME,'inventory','ContentsXML','comps.xml'),\ catFile($ORACLE_HOME,'oc4j','j2ee','oc4j_applications','applications',\ 'em','em','WEB-INF','uix-config.xml'),\ catFile($ORACLE_HOME,'oc4j','j2ee','oc4j_applications','applications',\ 'em','em','WEB-INF','web.xml'),\ catFile($ORACLE_HOME,'opmn','conf','opmn.xml'),\ catFile($ORACLE_HOME,'sysman','admin','discover','discover.lst'),\ catFile($ORACLE_HOME,'sysman','admin','supportedtzs.lst'),\ catFile($ORACLE_HOME,'sysman','admin','tzmappings.lst'),\ catFile($ORACLE_HOME,'sysman','admin','nsupportedtzs.lst'),\ catFile($ORACLE_HOME,'sysman','setupinfo.txt'),\ grepDir(catDir($O_HOME_3,'sysman','config'),'.','np'),\ grepDir(catDir($O_HOME_3,'sysman','emd'),'.','np'),\ grepDir(catDir($OC4J,'application-deployments','default','defaultWebApp'),\ '.','np'),\ grepDir(catDir($OC4J,'application-deployments','em'),'.','np'),\ grepDir(catDir($OC4J,'application-deployments','em','em'),'.','np'),\ grepDir(catDir($OC4J,'config'),'.','np')) unpretoc # Restore the environment call setEnv('ORACLE_SID',$env) =head1 SEE ALSO See also L, L. =begin credits =over 10 =item RDA 4.9: Smitha Nath. =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