for (@$pds) {
chomp;
next if /^$/;
- next if /^ *array [A-Z]$/;
next if (/^\S.*in Slot $slot/);
- if (/^Error: The specified controller does not have any physical drives on it.$/) {
+ next if /^ *array [A-Z]$/;
+ if (/^ *(array [A-Z]) \(Failed\)$/) {
+ record('CRITICAL');
+ push @{$status{'Failed'}}, $1;
+ } elsif (/^Error: The specified controller does not have any physical drives on it.$/) {
$nodrives = 1;
} elsif (/^ *physicaldrive (\S+) .* (OK|Predictive Failure|Failed|Rebuilding)(?:, spare)?\)$/) {
my $drive = $1;
# Check that all drives have the proper transfer speed.
# sometimes stuff breaks and they fall back to 10mb/sec.
for my $drive (@drives) {
+ # skip drives that are known to have failed
+ next if (exists $status{'Failed'} && grep {$drive eq $_} @{$status{'Failed'}});
my $type;
if ($drive =~ /^[0-9]+:[0-9]+$/) { # scsi drives
$type = 'SCSI';
my $expected;
if ($type eq 'SCSI') {
$key = 'Transfer Speed';
- $expected = '320 MB/Sec';
+ if (!defined $value{'Transfer Mode'}) {
+ record('WARNING');
+ push @{$status{'unknown transfer mode'}}, $drive;
+ next;
+ } elsif ($value{'Transfer Mode'} eq 'Ultra 3 Wide') {
+ $expected = '160 MB/Sec';
+ } elsif ($value{'Transfer Mode'} eq 'Ultra 320 Wide') {
+ $expected = '320 MB/Sec';
+ } else {
+ record('WARNING');
+ push @{$status{'unknown transfer mode'}}, $drive."(".$value{'Transfer Mode'}.")";
+ next;
+ };
} elsif ($type eq 'SAS') {
$key = 'PHY Transfer Rate';
$expected = '3.0GBPS';