# DCoid.ctl:340:Collects Oracle Internet Directory Information # $Id: DCoid.ctl,v 1.8 2015/07/03 12:04:44 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/OFM/DCoid.ctl,v 1.8 2015/07/03 12:04:44 RDA Exp $ # # Change History # 20150703 MSC Improve the documentation. =head1 NAME OFM:DCoid - Collects Oracle Internet Directory Information =head1 DESCRIPTION This module collects Oracle Internet Directory-related information. The following reports can be generated and are regrouped under C: =cut echo tput('bold'),'Processing OFM.OID module ...',tput('off') # Initialization var $ORACLE_HOME = ${D_ORACLE_HOME/P:''} var $TAIL = ${DFT.N_TAIL:1000} var $LDAP_HOME = catDir($ORACLE_HOME,'ldap') var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' # Set the required environment var $bkp = setContext({PERL5LIB => ${ENV.PERL5LIB},\ PERL5OPT => ${ENV.PERL5OPT}}) # Collect the Oracle Internet Directory information if !?${B_PRIMARY} {# Collect the generic information pretoc $MNU = '1:Oracle Internet Directory' run OFM:OIDinfo(false,false) # Load the common macros run RDA:library() # Collect log files related to Oracle Internet Directory var $dir = catDir($LDAP_HOME,'log') =for stopwords oidmon =head2 oidmon.log Displays the last lines of the monitor log. =cut debug ' Inside OID module, tail the monitor log' call tail_report($dir,'oidmon.log',$TAIL) =for stopwords oidstack =head2 oidstack.log Displays the last lines of the stack logs. =cut debug ' Inside OID module, tail the stack logs' loop $nam (grepDir($dir,'^oidstack.*\.log$','in')) call tail_report($dir,$nam,$TAIL) =for stopwords oidldapd =head2 oidldapd.log Displays the last lines of the LDAP logs. =cut debug ' Inside OID module, tail the LDAP logs' loop $nam (grepDir($dir,'^oidldapd.*\.log$','in')) call tail_report($dir,$nam,$TAIL) =for stopwords oidrepld =head2 oidrepld.log Displays the last lines of the replication logs. =cut debug ' Inside OID module, tail the replication logs' loop $nam (grepDir($dir,'^oidrepld.*\.log$','in')) call tail_report($dir,$nam,$TAIL) =for stopwords odisrv =head2 odisrv.log Displays the last lines of the server logs. =cut debug ' Inside OID module, tail the server logs' loop $nam (grepDir($dir,'^odisrv.*\.log$','in')) call tail_report($dir,$nam,$TAIL) =head2 stack.dmp Displays the last lines of the stack dumps. =cut debug ' Inside OID module, tail the stack dumps' loop $nam (grepDir($dir,'.*_stack.*\.dmp$','in')) call tail_report($dir,$nam,$TAIL) =for stopwords ldap =head2 $OH/ldap/odi/log Displays the contents of the files in the F<$ORACLE_HOME/ldap/odi/log> directory. =cut debug ' Inside OID module, listing the files in $OH/ldap/odi/log directory' call sort_files(3,$TAIL,grepDir(catDir($LDAP_HOME,'odi','log'),'.','p')) =head2 $OH/ldap/load Displays the contents of the files in the F<$ORACLE_HOME/ldap/load> directory. =cut debug ' Inside OID module, listing the files in $OH/ldap/load directory' call sort_files(3,$TAIL,grepDir(catDir($LDAP_HOME,'load'),'.','p')) =head2 $OH/ldap/das Displays the contents of the files in the F<$ORACLE_HOME/ldap/das> directory except for the F file. =cut debug ' Inside OID module, listing the files in $OH/ldap/das directory' call sort_files(3,$TAIL,\ grepDir(catDir($LDAP_HOME,'das'),'^oiddas\.ear$','vip')) unpretoc =head2 not_found - Not found Used as a warning when none of the Oracle Internet Directory files are found. =cut if !isTocCreated(true) {debug ' Inside OID module, no file found' report not_found write 'No Oracle Internet Directory configuration files were found and all \ files were optional. This does not mean there was necessarily a \ problem with RDA, but it should be investigated.' toc $MNU toc '2:[[',getFile(),'][rda_report][Not found]]' } } =head1 IDENTITY MANAGEMENT INFORMATION FOR ORACLE FUSION MIDDLEWARE Includes the reports generated by the L module about the Oracle instances and their associated Oracle homes. =cut elsif or(${B_REQ_IREQ},${B_REQ_WREQ}) {# Analyze the instance requests var %tbl = () loop $req (${CUR.O_SETUP}->search('^IREQ_OFM_OID_OI')) {var $ins = $req->get_first('I_ORACLE_INSTANCE') if ?$ins->get_first('I_ORACLE_HOME')->get_prime('I_COMMON_HOME') var $tbl{last->get_oid,$req->get_oid} = $ins->get_first('D_ORACLE_INSTANCE') else var $tbl{'CH',$req->get_oid} = $ins->get_first('D_ORACLE_INSTANCE') } # Collect the OID 11g information toc '%PUSH("0: * Oracle Internet Directory")%' loop $oid (keys(%tbl)) {toc '%PUSH("1+:Common Product Home")%' toc '%INCLUDE("OFM_IREQ_OFM_OID_',$oid,'_TF.toc")%' toc '%POP%' loop $tid (keys($tbl = $tbl{$oid})) {toc '%PUSH("0: * ',"'",basename($tbl->{$tid}),"'",' Instance")%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1++:Associated Oracle Home")%' toc '%INCLUDE("OFM_',replace($tid,'_OI','_OH'),'_TF.toc",1)%' toc '%POP2%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1++:Instance Home")%' toc '%INCLUDE("OFM_',$tid,'_TF.toc")%' toc '%POP3%' } } =head2 Oracle WebLogic Server Domain Information Includes the reports generated by the L module for the specified Oracle WebLogic Server domain. =cut toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Overview")%' toc '%INCLUDE("OFM_WREQ_OFM_OID_WH_TF.toc")%' toc '%POP2%' toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Domain")%' toc '%INCLUDE("OFM_WREQ_OFM_OID_DOM_TF.toc")%' toc '%POP3%' } # Restore the previous environment call restoreContext($bkp) =head1 SEE ALSO L, L, L, L, L =begin credits =over 10 =item RDA 4.4: Wes Root. =item RDA 4.9: Irina Donaldson, Anita Hegde, Satheesan Vettahil. =item RDA 4.12: Raju Channabasappa, Wes Root, Jerry Smith, Satheesan Vettahil. =item RDA 4.15: Greg Cook, Andrew Salt, Olaf Stullich. =item RDA 4.20: Hector Viveros. =item RDA 4.21: Hector Viveros. =item RDA 4.22: Daniel Mortimer. =item RDA 4.24: Greg Cook, Andrew Salt. =item RDA 8.07: Christopher Hearne. =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