# M258D25.def: Collect StorEdge 2500 Series Disk Arrays Information # $Id: M258D25.def,v 1.8 2012/08/17 14:55:20 mschenke Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_4/src/scripting/lib/modules/M258D25.def,v 1.8 2012/08/17 14:55:20 mschenke Exp $ # # Change History # 20120817 MSC Improve index entries. =head1 NAME M258D25 - Collects StorEdge 2500 Series Disk Arrays Information =head1 DESCRIPTION This module collects information for StorEdge 2500 Series disk arrays. =cut use Mrc # Initialization var @COMMON_SECTIONS=('XPLR_all') var $VALIDATE = true keep $VALIDATE,@COMMON_SECTIONS section begin 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('st25xx') # ----------------------------------------------------------------------------- # XPLR_st25xx section # ----------------------------------------------------------------------------- section XPLR_st25xx # Validate the execution context if !${XPLR_GLOBAL:true} return call log_run('Processing D25 sections ...') if !is_pkg_installed('SUNWsefms') return log_info('SUNWsefms package is not installed to collect ST25XX \ supportData') var $bas = get_pkg_base('SUNWsefms','SUNWsefms','bin') =head2 d25_log - StorEdge 2500 Series Disk Arrays Gathers the StorEdge 2500 Series disk arrays information using the following commands: =over 2 =item o C =item o C =back =cut debug ' Inside D25 collection, gathering D25 information' report d25 write '---+!! StorEdge 2500 Series Disk Arrays' write $TOC write '---+ Collection Overview' call beginBlock(true) call addBlock('E','D','disks/StorEdge/ST25XX/st25xx.log') var %lnk = () if grepDir($bas,'^(s|[^\.].*s)upportdata','ifp') {var $pgm = quote(last,'x') if !loadCommand(concat(catCommand($bas,'ras_admin'),\ ' device_detail 2>/dev/null')) {write ${RDA.GMTIME},': ',catFile($bas,'ras_admin'),\ ' did not completed successfully.' write } elsif !grepLastFile('2510|2530|2540','f') {write ${RDA.GMTIME},\ ': No ST25XX array(s) installed or configured on this system' write } else {var %dev = () loop $lin (grepLastFile('^\s*#','v')) {var $nam = lc(trim(field(':',0,$lin))) var $val = trim(field(':',1,$lin)) if match($nam,'^(devicename|device name)$') var $dev{'nam'} = $val elsif compare('eq',$nam,'type') {if match($val,'2510|2530|2540') var $dev{'typ'} = $val } elsif compare('eq',$nam,'ip address') var $dev{'adr'} = $val elsif compare('eq',$nam,'key') var $dev{'key'} = $val elsif length($nam) next elsif and(exists($dev{'nam'}),exists($dev{'typ'}),exists($dev{'key'})) {var $box = cleanBox() call command(join(' ',$pgm,'-d',$dev{'key'},'-p',quote($box,'x'),'-o',\ 'extract','2>/dev/null')) if getSize(catFile($box,'extract.zip')) {var ($lnk{$dev{'nam'}}) = collectData(\ concat('disks/StorEdge/ST25XX/',$dev{'nam'},'/',\ $dev{'nam'},'_xtract.zip'),\ lastFile(),['C','supportdata (extract.zip)']) write ${RDA.GMTIME},': ST25XX Explorer data for ',$dev{'nam'},\ ' was collected successfully.' write } var %dev = () } } var $box = cleanBox() } } else {write ${RDA.GMTIME},': ',catFile($bas,'/supportData'),' not installed' write } call endBlock() write $TOP # Include device files write '---+ Supportdata Results' write $WRN write '|*Device*|' loop $dev (keys(%lnk)) write '|[[',$lnk{$dev},'][_blank][',$dev,']]|' write $TOP toc '2:[[',getFile(),'][rda_report][StorEdge 2500 Series Disk Arrays]]' =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