# M230FLNK.def: Collects Sun Fire Link Cluster Interconnect Information # $Id: M230FLNK.def,v 1.3 2012/08/17 14:35:32 mschenke Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_4/src/scripting/lib/modules/M230FLNK.def,v 1.3 2012/08/17 14:35:32 mschenke Exp $ # # Change History # 20120816 JGS Fix accessibility of controller dumps =head1 NAME M230FLNK - Collects Sun Fire Link Cluster Interconnect Information =head1 DESCRIPTION This module collects information about Sun Fire Link Cluster Interconnect. Gathers information for both the Fabric Manager and the Remote Shared Memory controllers. =cut use Mrc # Initialization var $VALIDATE = true keep $VALIDATE section begin var $ERR = '---## Associated Errors' var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' var $WRN = '* 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.' run XPLRlib('firelink') #------------------------------------------------------------------------------ # XPLR_firelink section #------------------------------------------------------------------------------ section XPLR_firelink # Validate the execution context if !${XPLR_GLOBAL:true} return call log_run('Processing FLNK sections ...') if !or(is_pkg_installed('SUNWwcfmr'),\ is_pkg_installed('SUNWrsmpr')) return log_info('Sun Firelink Interconnect not installed') pretoc '2:Sun Fire Link Cluster Interconnect' =head2 flnk_fm - Fabric Manager information Gathers Fabric Manager information using the following commands: =over 2 =item o C<${JAVA_BIN}/java -version> =item o C<${FM_BIN}/listfabrics> =item o C<${FM_BIN}/wcfmstat ${FABRICS}> =item o C<${FM_BIN}/wcfmstat -p ${PARTITION} ${FABRICS}> =back Collects the following files: =over 2 =item o F<${FM_BASE_DATA_DIR}/*> =back =cut if is_pkg_installed('SUNWwcfmr') {debug ' Inside FLNK collection, collecting Fabric Manager information' report flnk_fm title '---+!! Fabric Manager' title $TOC if ?$top = get_pkg_base('SUNWwcfmu','SUNWwcfm') {var $bin = catDir($top,'bin') var $jre = replace(value(grepFile(catFile($top,'config','jre_home.cfg'),\ '^\s*JAVA_BIN=','f')),'\"','',true) var ($dir) = grepFile(catFile($top,'config','wcfm_base_data_dir.cfg'),'.','f') # Collect command outputs var @cmd = (\ ['firelink/FM/java-version',\ catFile($jre,'java'),'-version 2>&1',\ '---+ Java Version Information'],\ ['firelink/FM/list-fabrics',\ catFile($bin,'listfabrics'),undef,\ '---+ Fabrics Currently Running']) loop $fab (grepDir($dir,'^\.+$','nv')) {call push(@cmd,\ [concat('firelink/FM/wcfmstat-',$fab),\ catFile($bin,'wcfmstat'),$fab,\ concat('---+ Members of Fabric ',$fab,' Status')]) loop $par (grepCommand(join(' ',catFile($bin,'wcfmstat'),$fab),' RSM')) {var $par = field('\s',0,$par) call push(@cmd,\ [concat('firelink/FM/wcfmstat-p-',$par,'-',$fab),\ catFile($bin,'wcfmstat'),concat('-p ',$par,' ',$fab),\ concat('---++ Partition ',$par,' Status')]) } } call do_exec(@cmd) # Collect files if ?$dir {prefix {write '---+ Collected Files' write $WRN write '|*File Path*| *Size*|*Last Modified Date*|' } call do_collect_dir('firelink/FM/fabrics',$dir,true) if hasOutput(true) write $TOP } } # Update the table of content if isCreated() toc '3:[[',getFile(),'][rda_report][Fabric Manager]]' } =head2 flnk_rsm - Remote Shared Memory controller information Gathers Remote Shared Memory controller information using the following commands: =over 2 =item o C =item o C =item o C =item o C =item o C =item o C =back Collects the following files: =over 2 =item o F =item o F =item o F =back =cut if grepDir('/dev','^wci','f') {debug ' Inside FLNK collection, collecting remote shared memory information' report flnk_rsm title '---+!! Remote Shared Memory Controller' title $TOC # Collect command outputs var $pgm = '/usr/platform/sun4u/sbin/wrsmconf' var @cmd = (\ ['firelink/cnodes/wrsmconf-check',\ $pgm,'check',\ '---+ Remote Shared Memory Controllers Check'],\ ['firelink/cnodes/wrsmconf-info',\ $pgm,'info',\ '---+ Remote Shared Memory Controllers Information'],\ ['firelink/cnodes/wrsmconf-topology',\ $pgm,'topology',\ '---+ Remote Shared Memory Controllers Topology Information'],\ ['firelink/cnodes/wrsmstat-route',\ '/usr/platform/sun4u/sbin/wrsmstat','route',\ '---+ Routes to Nodes'],\ ['firelink/cnodes/wrsmstat-controller',\ '/usr/platform/sun4u/sbin/wrsmstat','controller',\ '---+ Controller State'],\ ['firelink/cnodes/wrsmstat-wrsm',\ '/usr/platform/sun4u/sbin/wrsmstat','wrsm',\ '---+ Remote Shared Memory WCIs State']) if get_pkg_base('SUNWrsmpu','SUNWwrsmp') {var $jre = replace(value(grepFile(catFile(last,'jre_home.cfg'),\ '^\s*JAVA_BIN=','f')),'\"','',true) call push(@cmd,\ ['firelink/cnodes/java-version',\ catFile($jre,'java'),'-version 2>&1',\ '---+ Java Version Information']) } call do_exec(@cmd) # Collect files prefix {write '---+ Collected Files' write $WRN write '|*File Path*| *Size*|*Last Modified Date*|' } call do_collect_dir('firelink/cnodes/etc-wrsm' ,'/etc/wrsm',true) call do_collect_dir('firelink/cnodes/wrsmp-logs','/var/opt/SUNWwrsmp',true) if hasOutput(true) write $TOP prefix {write '---+ Controller Dumps' write $WRN write '|*Controller*|' } loop $lin (grepCommand(join(' ',$pgm,'info'),'controller')) {var $ctr = field('\s+',1,$lin) var $tmp = getTemp('TMP') call command(join(' ',$pgm,'dump','-c',$ctr,'-f',quote($tmp,'x'))) if testFile('fT',$tmp) {if collectFile(concat('firelink/cnodes/wrsmconf-dump.c',$ctr),$tmp,\ ['C',concat($pgm,' -dump -c ',$ctr)]) write '|[[',last,'][_blank][',$ctr,']]|' } call unlinkTemp('TMP') } if hasOutput(true) write $TOP # Update the table of content if isCreated() toc '3:[[',getFile(),'][rda_report][Remote Shared Memory Controller]]' } # Adjust the table of content unpretoc =head1 SEE ALSO L, L =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