# S401OCFS.def: Collects Oracle Cluster File System Information # $Id: S401OCFS.def,v 1.17 2008/02/25 17:32:56 mschenke Exp $ # ARCS: $Header: /home/cvs/repository/RDA_4/src/scripting/lib/modules/S401OCFS.def,v 1.17 2008/02/25 17:32:56 mschenke Exp $ # # Change History # 20080225 MSC Change the copyright notice. =head1 NAME S401OCFS - Collects Oracle Cluster File System Information =head1 DESCRIPTION This module collects data that is related to the use of the Oracle Cluster File System and its configuration. This is currently restricted to Linux environments. The following reports can be generated and are regrouped under C: =cut echo tput('bold'),'Processing OCFS module ...',tput('off') # Initialization var $ORACLE_HOME = getSetting('ORACLE_HOME','') var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' # Limit its execution to Linux var $OSN = getOsName() if !match($OSN,'linux') {echo 'Platform ',$OSN,' not supported in the OCFS module.' return } toc '^1:Cluster' toc '1+:OCFS' =head2 config_status - Configuration and Status Gets the OCFS package information, collects F and F, and determines the OCFS status. =cut debug ' Inside the OCFS module, gathering configuration and status information' report config_status write '---+!! Oracle Cluster File System' write $TOC write '---+ OCFS Package Information' prefix write '' loop $lin (grepCommand('rpm -qa','ocfs')) write $lin if hasOutput(true) write '' else write 'OCFS is not installed%BR%' write $TOP prefix write '---+ /etc/ocfs.conf' call writeFile('/etc/ocfs.conf') if hasOutput(true) write $TOP prefix write '---+ /etc/ocfs2/cluster.conf' call writeFile('/etc/ocfs2/cluster.conf') if hasOutput(true) write $TOP prefix write '---+ /etc/sysconfig/o2cb' call writeFile('/etc/sysconfig/o2cb') if hasOutput(true) write $TOP prefix write '---+ /etc/fstab' call writeFile('/etc/fstab') if hasOutput(true) write $TOP prefix write '---+ /etc/init.d/ocfs' if statFile('b','/etc/init.d/ocfs') {var $lin = replace(command('/etc/init.d/ocfs status'),\ '\033\[[\d;]+[A-Za-z]','',true) if $lin {write '' write $lin write '' } } if hasOutput(true) write $TOP toc '2:[[',getFile(),'][rda_report][Configuration and Status]]' =head2 drives - Drives Identifies all OCFS drives and provides a report on the space that is available on the drives. =cut report drives debug ' Inside the OCFS module, gathering drive information' prefix {write '---+!! Oracle Cluster File System Drives' write $TOC } loop $lin (grepCommand('/bin/mount','ocfs')) {var ($dev,undef,$nam) = split('\s+',$lin,4) var $cmd = concat('/usr/sbin/ocfsextfinder ',$dev,' 2>&1') write '---+ Space on ',$nam write '---## Using: ',$cmd call writeCommand($cmd) write $TOP } if isCreated(true) toc '2:[[',getFile(),'][rda_report][Drives]]' =head2 messages - Error Messages Extracts all OCFS messages from the error log. =cut debug ' Inside the OCFS module, extracting error messages' report messages prefix {write '---+!! Oracle Cluster File System Error Messages' write '---## Using: dmesg | grep ocfs' write '' } loop $lin (grepCommand('dmesg','ocfs')) write $lin if isCreated(true) {write '' toc '2:[[',getFile(),'][rda_report][Error Messages]]' } # Disable the group title in next index toc '-:Cluster' =begin credits =over 10 =item RDA 4.0: Bernhard Cock Buning, Luc Dens. =item RDA 4.6: Guido Tijskens. =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