# IFSr2.ctl: Collects iFS Information (iFS R2) # $Id: IFSr2.ctl,v 1.4 2013/12/19 14:08:22 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/OFM/IFSr2.ctl,v 1.4 2013/12/19 14:08:22 RDA Exp $ # # Change History # 20131219 KRA Fix spell. =head1 NAME OFM:IFSr2 - Collects iFS Information (iFS R2) =head1 DESCRIPTION This module collects iFS (CMSDK, Files) information (for example, configuration and log files). It regroups the produced reports under C. =head1 REPORTS =cut echo tput('bold'),'Processing iFS R2 module ...',tput('off') # Load the common macros run RDA:library() # Initialization var $ORACLE_HOME = ${D_ORACLE_HOME/P:''} var $IFS_HOME = ${D_HOME:''} var $IFS_ROOT_HOME = ${D_ROOT:''} var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' toc '1:Internet File System' =for stopwords cron =head2 ifs_repos_info - Repository Collects the Internet File System repository information. It asks for the Internet File System repository user password. For batch/cron execution, you can encode the password in the setup file using the pseudo user C. =cut if ?${I_DB} {call setSqlTarget(last) var ($typ,$sid,$usr) = getSqlInfo() if derivePassword($typ,$sid,$usr,'IFS_REPOS_USER') call setPassword($typ,$sid,$usr,\ askPassword(concat("Enter '",$usr,"' user password:"),'')) debug ' Inside the iFS R2 module, collecting the iFS repository information' report ifs_repos_info title '---+!! Internet File System Repository Information' title $TOC # Get the repository information if testSql() {echo '' echo tput('bold'),'The database is not accessible.',tput('off') if getSqlMessage() {echo last write 'Database not accessible (',getSqlMessage(),')%BR%' } echo '' } else {prefix {write '---+ Repository Version' write '|*Value*|' } set $sql {SELECT '|' || value || ' |' " FROM odmz_RepositoryParameter " WHERE name = 'SCHEMAVERSION'; } call writeSql($sql) if hasOutput(true) write $TOP prefix {write '---+ Domain Controller Configuration' write '|*Configuration Values*|' } set $sql {SELECT '|' || p.name || '=' || " DECODE(p.datatype, 2, p.stringvalue, " 4, p.integervalue, " 5, DECODE(p.booleanvalue, 0, 'false', 1, 'true'), " 8, p.longvalue, " 11, p.publicobjectvalue, " p.bundle) || ' |' " FROM odmv_PropertyBundle pb, odmv_Property p " WHERE pb.name = 'IFS.DOMAIN.Properties' " AND p.bundle = pb.id " ORDER BY 1; } call writeSql($sql) if hasOutput(true) write $TOP prefix {write '---+ Node Configuration' write '|*Node Name*|*Property Name*|' } set $sql {SELECT '|' || " nc.name || '|' || " p.name || '=' || " DECODE(p.datatype, 2, p.stringvalue, " 4, p.integervalue, " 5, DECODE(p.booleanvalue, 0, 'false', 1, 'true'), " 8, p.longvalue) || ' |' " FROM odmv_NodeConfiguration nc, odmv_Property p " WHERE nc.propertybundle = p.bundle " ORDER BY nc.name; } call writeSql($sql) if hasOutput(true) write $TOP prefix {write '---+ Service Configuration' write '|*Service Name*|*Property Name*|' } set $sql {SELECT '|' || " sc.name || '|' || " p.name || '=' || " DECODE(p.datatype, 2, p.stringvalue, " 4, p.integervalue, " 5, DECODE(p.booleanvalue, 0, 'false', 1, 'true'), " 8, p.longvalue) || ' |' " FROM odmv_ServiceConfiguration sc, odmv_Property p " WHERE sc.id = p.bundle ORDER BY sc.name; } call writeSql($sql) if hasOutput(true) write $TOP prefix {write '---+ Server Configuration' write '|*Server Name*|*Property Name*|' } set $sql {SELECT '|' || " sc.name || '|' || " p.name || '=' || " DECODE(p.datatype, 2, p.stringvalue, " 4, p.integervalue, " 5, DECODE (p.booleanvalue, 0, 'false', 1, 'true'), " 8, p.longvalue) || ' |' " FROM odmv_ServerConfiguration sc, odmv_Property p " WHERE sc.id = p.bundle ORDER BY sc.name; } call writeSql($sql) if hasOutput(true) write $TOP } if isCreated(true) toc '2:[[',getFile(),'][rda_report][Repository]]' } =head2 Log Files Inserts the log files that are found in all subdirectories under C<$IFS_HOME> as separate reports. =cut if ?testDir('d',$IFS_HOME) {debug ' Inside the iFS R2 module, gathering iFS logs from ',$IFS_HOME var $tgt = replace($IFS_HOME,concat('^',verbatim($ORACLE_HOME),'[\/\\]')) pretoc '2:',$tgt,' Log Files' call search_files(catDir($IFS_HOME,'log'),'\.log$',0) unpretoc } =head1 SEE ALSO L =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