# M258SSA.def: Collects SPARCstorage Array Information # $Id: M258SSA.def,v 1.3 2012/05/12 23:52:37 mschenke Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_4/src/scripting/lib/modules/M258SSA.def,v 1.3 2012/05/12 23:52:37 mschenke Exp $ # # Change History # 20120512 MSC Fix RCS tag. =head1 NAME M258SSA - Collects SPARCstorage Array Information =head1 DESCRIPTION Collects SPARCstorage Array information. =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 XPLRlib('ssa') # ----------------------------------------------------------------------------- # XPLR_ssa section # ----------------------------------------------------------------------------- section XPLR_ssa # Validate the execution context if !${XPLR_GLOBAL:true} return call log_run('Processing SSA sections ...') var %tbl = () loop $dev (grepDir('/dev/rdsk','s0$','n')) {next !testFile('l',catFile('/dev/rdsk',$dev)) if match(readLink(lastFile()),'/SUNW,pln') call push($tbl{replace($dev,'t\d.*$')},$dev) } if !@tbl = keys(%tbl) return log_info('No SPARCstorage Arrays installed') if !or(testFile('x',$pgm = '/usr/sbin/luxadm'),\ testFile('x',$pgm = '/usr/sbin/ssaadm')) return log_info('Command not found') pretoc '2: SPARCstorage Array' =head2 SPARCstorage Array Information Collects information for each SPARCstorage Array, using F or F with the following arguments: =over 2 =item o C<-v display ${CONTROLLER}> =item o C =back =cut debug ' Inside SSA collection, gathering SPARCstorage Array information' loop $nam (@tbl) {report concat('ssa_',$nam) title '---+!! ',uc($nam),' Storage Array Information' title $TOC # Collect Mode Sense information call do_exec([concat('disks/ssa/ssaadm.',$nam),\ $pgm,concat('-v display ',$nam),\ '---+ Mode Sense Information']) # Collect system controller/disk information loop $dev (@{$tbl{$nam}}) call do_exec([concat('disks/ssa/',$nam,'.disk_list/',$dev),\ $pgm,concat('display ',catFile('/dev/rdsk',$dev)),\ concat('---+ System Controller/Disk ',encode($dev))]) if isCreated(true) toc '3:[[',getFile(),'][rda_report][',uc($nam),' Storage Array]]' } # Adjust the table of contents 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