# MCd61.ctl:258: Collects StorEdge 6100 Series Disk Arrays Information # $Id: MCd61.ctl,v 1.5 2014/05/30 19:05:27 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/EXPLORER/MCd61.ctl,v 1.5 2014/05/30 19:05:27 RDA Exp $ # # Change History # 20140530 PRA Add new array types. =head1 NAME EXPLORER:MCd61 - Collects StorEdge 6100 Series Disk Arrays Information =head1 DESCRIPTION This module collects information on StorEdge 6100 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('se61xx') # ----------------------------------------------------------------------------- # XPLR_se61xx section # ----------------------------------------------------------------------------- section XPLR_se61xx # Validate the execution context if !${B_GLOBAL:true} return call log_run('Processing D61 sections ...') if $STADE = is_pkg_installed('SUNWstade') var ($bas,$ver) = (get_pkg_base('SUNWstade','SUNWstade','bin'),\ get_pkg_version('SUNWstade')) elsif is_pkg_installed('SUNWsefms') var ($bas,$ver) = (get_pkg_base('SUNWsefms','SUNWsefms','bin'),'2.4') else return log_info('SUNWstade and SUNWsefms packages are not installed to \ collect SE61XXSupportData') =head2 d61 - StorEdge 6100 Series disk arrays information Gathers the StorEdge 6100 Series disk arrays information using the following commands: =over 2 =item o C =item o C =item o C =item o C =back =cut debug ' Inside D61 collection, gathering D61 information' report d61 write '---+!! StorEdge 6100 Series Disk Arrays' write $TOC write '---+ Collection Overview' call beginBlock(true) call addBlock('E','D','disks/StorEdge/SE61XX/se61xx.log') if !compare('valid',$ver,'2.4') {write ${RDA.T_GMTIME},': Installed SUNWstade version ',$ver,\ ' does not support SE61XX data collection.' write } elsif 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('61[348]0|65[48]0|6780','f') {write ${RDA.T_GMTIME},\ ': No SE61XX array(s) installed or configured on this system' write } else {var ($lnk,%dev) = (true) 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,'61[348]0|65[48]0|6780') 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() if $STADE $cmd = join(' ',$pgm,quote($dev{'key'}),quote(catDir(${CFG.D_CWD},$box)),\ 'extract','2>/dev/null') else $cmd = join(' ',$pgm,'-d',quote($dev{'key'}),'-p',\ quote(catDir(${CFG.D_CWD},$box)),'-o','extract',\ '2>/dev/null') call command($cmd) if getSize(catFile($box,'extract.zip')) {var ($lnk{$dev{'nam'}}) = collectData(\ concat('disks/StorEdge/ST61XX/',$dev{'nam'},'/',\ $dev{'nam'},'_xtract.zip'),\ lastFile(),['C','supportdata (extract.zip)']) write ${RDA.T_GMTIME},': ST61XX Explorer data for ',$dev{'nam'},\ ' was collected successfully.' write if and($lnk,match($dev{'typ'},'6130')) {call addEntry('E','L','disks/StorEdge/SE6130','SE61XX') $lnk = false } } 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 6100 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