# MCd25.ctl:258: Collect StorEdge 2500 Series Disk Arrays Information # $Id: MCd25.ctl,v 1.5 2014/05/30 19:02:31 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/EXPLORER/MCd25.ctl,v 1.5 2014/05/30 19:02:31 RDA Exp $ # # Change History # 20140530 PRA Add new array types. =head1 NAME EXPLORER:MCd25 - Collects StorEdge 2500 Series Disk Arrays Information =head1 DESCRIPTION This module collects information for StorEdge 2500 Series disk arrays. =cut use Mrc # Initialization var $VALIDATE = true keep $VALIDATE 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 EXPLORER:XPLRlib('st25xx') # ----------------------------------------------------------------------------- # XPLR_st25xx section # ----------------------------------------------------------------------------- section XPLR_st25xx # Validate the execution context if !${B_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) if !loadCommand(concat(catCommand($bas,'ras_admin'),\ ' device_detail 2>/dev/null')) {write ${RDA.T_GMTIME},': ',catFile($bas,'ras_admin'),\ ' did not completed successfully.' write } elsif !grepLastFile('25[134]0|f5100|j4[245]00','f') {write ${RDA.T_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,'25[134]0|f5100|j4[245]00') 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',quote($dev{'key'}),'-p',\ quote(catDir(${CFG.D_CWD},$box)),'-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.T_GMTIME},': ST25XX Explorer data for ',$dev{'nam'},\ ' was collected successfully.' write } var %dev = () } } var $box = cleanBox() } } else {write ${RDA.T_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, 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