# MCcqs.ctl:230: Collects Cluster Quorum Server Information # $Id: MCcqs.ctl,v 1.5 2013/10/30 07:18:25 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/EXPLORER/MCcqs.ctl,v 1.5 2013/10/30 07:18:25 RDA Exp $ # # Change History # 20130402 PRA Enhance validations. =head1 NAME EXPLORER:MCcqs - Collects Cluster Quorum Server Information =head1 DESCRIPTION This module collects information on Cluster Quorum Server quorum device. =cut use Mrc # Initialization var $VALIDATE = true keep $VALIDATE section begin var $ERR = '---## Associated Errors' var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' run EXPLORER:XPLRlib('quorumserv') #------------------------------------------------------------------------------ # XPLR_cqs section #------------------------------------------------------------------------------ section XPLR_cqs # Validate the execution context if !${B_GLOBAL:1} return call log_run('Processing CQS sections ...') if !?testFile('d','/usr/cluster/lib/sc') return log_info('Cluster Quorum Server software not installed') if !is_pkg_installed('SUNWscqsr') return log_info('Cluster Quorum Server software not installed') pretoc '2:Cluster Quorum Server' =head2 cqs_cmd - Commands Gathers the Cluster Quorum Server device information using the following commands: =over 2 =item o C =item o C =item o C =back =cut debug ' Inside CQS collection, gathering command outputs' report cqs_cmd title '---+!! Cluster Quorum Server Commands' title $TOC var %dir = () loop $lin (grepFile('/etc/scqsd/scqsd.conf','^#','v')) {var ($ins) = match($lin,'^.*-i\s+(\S+)') var $cmd = join(' ','/usr/cluster/bin/clqs show',quote($ins)) prefix {write join(' ','---+ Configuration Information for Quorum Server',$ins) write '---## Using: ',encode($cmd) } call collectCommand({nam=>join('-','quorumserv/clqs_show',$ins),\ out=>{blk=>true,flt=>true,idx=>true,rpt=>${CUR.O_REPORT}},\ err=>{blk=>true,flt=>true,hdr=>$ERR,rpt=>${CUR.O_REPORT}}\ },$cmd) if hasOutput(true) write $TOP if ?$dir = testDir('d',match($lin,'^.*-d\s+(\S+)')) {var $cmd = concat('/usr/bin/cat ',catCommand($dir,'.scqsd_dbg_buf')) var $dir{$dir} = 1 prefix {write '---+ Content of ``',lastFile(),'`` File' write '---## Using: ',encode($cmd) } call collectCommand({nam=>'quorumserv/scqsd_dbg_buf',\ out=>{blk=>true,ext=>'',flt=>true,idx=>true,rpt=>${CUR.O_REPORT}},\ err=>{blk=>true,flt=>true,hdr=>$ERR,rpt=>${CUR.O_REPORT}}\ },$cmd) if hasOutput(true) write $TOP } } if isCreated(true) toc '3:[[',getFile(),'][rda_report][Commands]]' =head2 cqs_files - Files Gathers the following Cluster Quorum Server files: =over 2 =item o F =item o F =back =cut debug ' Inside CQS collection, collecting files' report cqs_files title '---+!! Cluster Quorum Server Files' prefix {write ' * Links point to files that have been collected in their original \ format. Opening them directly in your browser can present \ risks. To prevent them, access the file outside the browser or \ use the link to save them and use an adequate viewer.' write '|*File Path*| *Size*|*Last Modified Date*|' } call do_collect_fil(['quorumserv/scqsd.conf','/etc/scqsd/scqsd.conf']) loop $dir (keys(%dir)) call do_collect_sel('quorumserv',$dir,'\.0x') if isCreated(true) {write $TOP toc '3:[[',getFile(),'][rda_report][Files]]' } # Adjust the table of content unpretoc =head1 SEE ALSO L, 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