#!/usr/bin/perl ## ## LSVPMembers written 062606:1051 by BJP ## ## LSVPMembers displays what hdisks belong to which vpaths on a given +host. ## @vpList = `lsdev -Cc disk | grep ^vp | cut -d" " -f1`; print "\nLSVPMembers: Spinning up..\n"; foreach $item (@vpList) { $counter=0; chomp($item); chomp($LUN=`lsattr -El $item | grep disk | head -n1 | cut -d\/ -f2`) +; $lunID=substr($LUN,0,3)."-".substr($LUN,3) ; print "LSVPMembers: \"$item\" ($lunID) encompasses "; @vpMembers=split(/\s+/,`lsattr -El $item | cut -d" " -f2-3 | cut -c2 +- | grep disk | cut -d\/ -f1`); foreach $vp (@vpMembers) { print "$vp"; $counter++; if ($counter<@vpMembers) { print ", "; } else { print "."; } if ($counter+1==@vpMembers) { print "and "; } } print "\n"; } print "LSVPMembers: Spinning down..\n\n";
In reply to LSVPMembers by bpoag
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |