# PDAlog.ctl: Collects Portal Configuration and Log Information # $Id: PDAlog.ctl,v 1.3 2015/05/29 07:44:27 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/OFM/PDAlog.ctl,v 1.3 2015/05/29 07:44:27 RDA Exp $ # # Change History # 20150527 KRA Improve the documentation. =head1 NAME OFM:PDAlog - Collects Portal Configuration and Log Information =head1 DESCRIPTION This module collects Portal configuration and log-related information. =cut # Initialization var ($OC4J_USED,$VERSION) = @arg import $TOC,$TOP,%HTTPDCONF,%HTTPDERRLOG var $APACHE_TOP = ${GRP.IAS.D_APACHE_TOP:''} var $J2EE_TOP = ${GRP.J2EE.D_TOP:''} var $ORACLE_HOME = ${GRP.PDA.D_ORACLE_HOME/P:''} var $TAIL = ${DFT.N_TAIL:1000} # Load the common macros run OFM:IAS() run RDA:library() # Define a macro to group linked files macro group_shares {var ($lvl,$shr,$mod,$bas,$flg) = @arg var $grp = '' var $det = $lvl incr $det loop $id (findShares($shr,$mod)) {# Share the report var $fil = getShare($id) var $lnk = setShare($id) # Check for a new section var $dir = dirname($fil) if compare('ne',$dir,$grp) {if $flg toc $lvl,':',cond($bas,catDir(splitDir($dir,$bas)),$dir),' ' var $grp = $dir } # Create the toc index associated with the file toc $det,':[[',$lnk,'][rda_report][',\ cond($flg,basename($fil),catDir(splitDir($dir,$bas))),']]' } } =head2 Performance Analysis Provides a summary of the performance information logged by C. It collects the information from the latest Apache error file. For the 10.1.4 version, it captures information from all the C files. =cut debug ' Inside PDA module, analyzing performance from the log files' if $OC4J_USED {# Get application logs for analysis var $dir = catDir($J2EE_TOP,'OC4J_Portal','application-deployments','portal') if grepDir($dir,'^application\.log$','ir') run OFM:PDAperf(2,$OC4J_USED,$VERSION,last) } else {# Get the Apache error file (more recent complete one in case of rotation) call httpServer_getListenerConf(true) call httpServer_getListenerLogs(true) var ($max,$fil) = (0) loop $log (keys(%HTTPDERRLOG)) {if expr('>',$HTTPDERRLOG{$log},$max) var ($fil,$max) = ($log,$HTTPDERRLOG{$log}) } if $fil run OFM:PDAperf(2,$OC4J_USED,$VERSION,$fil) } =head2 Configuration Files Gathers Portal-related configuration files. =cut debug ' Inside PDA module, collecting the configuration files' pretoc '2:Configuration Files' call sort_files(3,$TAIL,\ catFile($ORACLE_HOME,'Apache','Apache','setupinfo.txt'),\ catFile($ORACLE_HOME,'portal','conf','cache.xml'),\ catFile($ORACLE_HOME,'portal','conf','iasconfig.xml'),\ catFile($ORACLE_HOME,'webcache','webcache.xml'),\ catFile($ORACLE_HOME,'webcache','internal.xml'),\ catFile($ORACLE_HOME,'webcache','internal_admin.xml'),\ catFile($ORACLE_HOME,'ultrasearch','webapp','config',\ 'ultrasearch.properties'),\ catFile($ORACLE_HOME,'ldap','das','das.properties'),\ catFile($ORACLE_HOME,'ldap','das','oiddas.properties'),\ catFile($ORACLE_HOME,'xdk','admin','xml.properties')) unpretoc =head2 Log Files Gathers Portal-related log files. =cut debug ' Inside PDA module, collecting the log files' pretoc '2:Log Files' call sort_files(3,$TAIL,\ catFile($ORACLE_HOME,'assistants','opca','install.log'),\ catFile($ORACLE_HOME,'opmn','logs','midtier.log'),\ catFile($ORACLE_HOME,'webcache','logs','event_log')) unpretoc =head2 OC4J_Portal Files Gathers OC4J_Portal configuration and log files. =cut debug ' Inside PDA module, linking portal configuration files' var $dir = catDir($J2EE_TOP,'OC4J_Portal') pretoc '2:OC4J_Portal Config Dir Structure' call group_shares(3,'J2EE_CFG','J2EE',$dir,true) unpretoc debug ' Inside PDA module, linking portal log files' pretoc '2:OC4J_Portal Log Dir Structure' call group_shares(3,'J2EE_LOG','J2EE',$dir,true) unpretoc debug ' Inside PDA module, linking portal application configuration files' var $dir = catDir($J2EE_TOP,'OC4J_Portal','applications') pretoc '2:OC4J_Portal Applications Dir' pretoc '3:Configuration Files' call group_shares(4,'J2EE_ACFG','J2EE',$dir,true) unpretoc debug ' Inside PDA module, linking portal application log files' pretoc '3:Application.log Files' call group_shares(4,'J2EE_ALOG','J2EE',$dir,false) unpretoc 2 debug ' Inside PDA module, linking portal deployment configuration files' var $dir = catDir($J2EE_TOP,'OC4J_Portal','application-deployments') pretoc '2:OC4J_Portal Application-deployments Dir' pretoc '3:Configuration Files' call group_shares(4,'J2EE_DCFG','J2EE',$dir,true) unpretoc debug ' Inside PDA module, linking portal deployment log files' pretoc '3:Application.log Files' call group_shares(4,'J2EE_DLOG','J2EE',$dir,false) unpretoc 2 =head1 SEE ALSO L, L, L =begin credits =over 10 =item RDA 4.5: Ersan Eser, Krishna Kumar, Rishi Mehrotra, Meraj Mohammed. =item RDA 4.6: Ersan Eser. =item RDA 4.12: Meraj Mohammed. =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