# M258DT.def: Collects StorEdge T3 Information # $Id: M258DT.def,v 1.1 2012/08/10 21:36:04 mschenke Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_4/src/scripting/lib/modules/M258DT.def,v 1.1 2012/08/10 21:36:04 mschenke Exp $ # # Change History # 20120620 PRO Initial Version # =head1 NAME M258DT - Collects StorEdge T3 Information =head1 DESCRIPTION Collects StorEdge T3 information. The following reports can be generated and are regrouped under C: =cut use Buffer 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('t3') # ----------------------------------------------------------------------------- # XPLR_t3 section # ----------------------------------------------------------------------------- section XPLR_t3 # Validate the execution context if !${XPLR_GLOBAL:true} return call log_run('Processing T3 sections...') pretoc '2: StorEdge T3' =head2 t3_cmd_scsi_${DEV} - SCSI Drives For each drive (DEV) returned by the F command, collects the command C. ${FIL} holds the format command file, which is created as part of this collection. =cut if testFile('f','/usr/sbin/format') {if !grepCommand('/usr/sbin/format','(SUN-T300)|(SUN-T4)','f') return log_info('T3 and T4 not installed') debug ' Inside T3 collection, gathering SCSI commands' pretoc '3: SCSI Drives' # Create the format command file var $fil = createTemp('FCF') call writeTemp('FCF','scsi') call writeTemp('FCF','inquiry') call writeTemp('FCF','quit') call writeTemp('FCF','quit') call closeTemp('FCF') # Get the SUN-T3 drives from the disk list loop $lin (command('/usr/sbin/echo 0 | /usr/sbin/format 2>&1')) {next !match($lin,'(\w+)\s*.SUN-T3') var ($dev) = last # Collect SCSI drive information for each drive found report concat('t3_cmd_scsi_',$dev) title '---+!! SCSI Drive ',$dev,' Information' prefix {write '---## Using: /usr/sbin/format -e -f