# S729PSCH.def: Collects PeopleSoft Information from Process Scheduler # $Id: S729PSCH.def,v 1.5 2012/01/03 13:34:47 mschenke Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_4/src/scripting/lib/modules/S729PSCH.def,v 1.5 2012/01/03 13:34:47 mschenke Exp $ # # Change History # 20120103 MSC Change the copyright notice. =head1 NAME S729PSCH - Collects PeopleSoft Information from Process Scheduler =head1 DESCRIPTION This module collects PeopleSoft diagnostic information from process scheduler. The following reports can be generated and are regrouped under C: =cut echo tput('bold'),\ 'Processing PeopleSoft information from process scheduler ...',\ tput('off') # Initialization var $AGE = getSetting('PSFT_AGE',15) var $PSCH_HOME = getSetting('PSFT_HOME',getEnv('PS_HOME','')) var $PS1 = cond(length($PSCH_HOME),concat('^',quote($PSCH_HOME),'\b'),'^$') var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' # Initialize the table of content pretoc '^1:PeopleSoft' pretoc '1+:Process Scheduler' # Load the common macros run PSFTlib() =head1 FOR PROCESS SCHEDULER Collects PeopleSoft information from process scheduler domains. It looks for all domains containing a file F. For each of them, it collects the related configuration and log files. =cut debug ' Inside PSCH module, getting configuration and log files' # Identify the relevant domains var @dom = () loop $dom (grepDir(catDir($PSCH_HOME,'appserv','prcs'),'^\.+$','nv')) {if testFile('f',catFile($PSCH_HOME,'appserv','prcs',$dom,'psprcs.cfg')) call push(@dom,$dom) } # Get domain information loop $dom (@dom) {var $dir = catDir($PSCH_HOME,'appserv','prcs',$dom) pretoc "1++:'",$dom,"' Domain" # Collect configuration files pretoc '2:Configuration Files' call sort_psft(3,0,$PS1,'$PS_HOME',grepDir($dir,'ps.*','p'),\ grepDir($dir,'std.*','p')) unpretoc # Collect log files report concat('d_',$dom,'_log') prefix {write '---+ Collected Files' write ' * Limited to last ',$AGE,' days modified files' write ' * Links point to files that have been collected in their original \ format. Opening them directly in your browser can present \ security risks. To prevent them, access the file outside the \ browser or use the link to save them and use an adequate viewer.' write '|*File Name*| *Size*|*Last Modification*|' } loop $pth (grepDir(catDir($dir,'LOGS'),'^\.+$',concat('npvm',$AGE))) {next !testDir('f',$pth) output d,concat('d_',$dom,'_l_',$fil = basename($pth)) if ${CUR.LAST}->write_data($pth) write '|[[',${CUR.LAST}->get_file,'][_blank][',encode($fil),']]| ',\ getSize($pth),'|',getLastModify($pth,'%d-%b-%Y %H:%M:%S'),' |' call $[OUT]->end_report(${CUR.LAST}) } if hasOutput(true) {write $TOP toc '2:[[',getFile(),'][rda_report][Log Files]]' } unpretoc pretoc '%SPLIT%' } # Disable the group title in next index if isTocCreated(true) toc '-:PeopleSoft' =head1 SEE ALSO L =begin credits =over 10 =item RDA 4.19: Lucian Sadacliev. =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