aix lspv tester

This commit is contained in:
Doug MacEachern 2005-02-22 21:30:43 +00:00
parent 14147fbb63
commit d061f66eb1
1 changed files with 26 additions and 0 deletions

26
exp/lspv.pl Normal file
View File

@ -0,0 +1,26 @@
#!/usr/bin/perl
use strict;
my $lspv = "/usr/sbin/lspv";
open LSPV, "$lspv|" or die;
my(@lspv) = <LSPV>;
close LSPV;
my $dlm = ("-" x 25) . "\n";
print "$lspv\n", @lspv;
print $dlm;
for my $line (@lspv) {
my $disk = (split /\s+/, $line)[0];
next unless $disk;
next if $line =~ / None/;
my $cmd = "$lspv -l $disk";
open LSPV, "$cmd|" or die;
my(@pv) = <LSPV>;
close LSPV;
print "$cmd\n", @pv;
print $dlm;
}