# MCssa.ctl:258: Collects SPARCstorage Array Information # $Id: MCssa.ctl,v 1.5 2013/10/30 07:18:25 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/EXPLORER/MCssa.ctl,v 1.5 2013/10/30 07:18:25 RDA Exp $ # # Change History # 20130610 MSC Improve validation. =head1 NAME EXPLORER:MCssa - 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 EXPLORER:XPLRlib('ssa') # ----------------------------------------------------------------------------- # XPLR_ssa section # ----------------------------------------------------------------------------- section XPLR_ssa # Validate the execution context if !${B_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 !?$pgm = nvl(testFile('x','/usr/sbin/luxadm'),\ testFile('x','/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 ',catCommand('/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, 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