Skip to content

Commit

Permalink
"Failed in segment" is now considered a read failure for smart (#548)
Browse files Browse the repository at this point in the history
* add check for "Failed in segment" for self test

* minor version bump
  • Loading branch information
VVelox authored Oct 3, 2024
1 parent 04896e1 commit 3a5d2ff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions snmp/smart-v1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env perl
#Copyright (c) 2023, Zane C. Bowers-Hadley
#Copyright (c) 2024, Zane C. Bowers-Hadley
#All rights reserved.
#
#Redistribution and use in source and binary forms, with or without modification,
Expand Down Expand Up @@ -113,7 +113,7 @@ my $useSN = 1;
$Getopt::Std::STANDARD_HELP_VERSION = 1;

sub main::VERSION_MESSAGE {
print "SMART SNMP extend 0.3.1\n";
print "SMART SNMP extend 0.3.2\n";
}

sub main::HELP_MESSAGE {
Expand Down Expand Up @@ -784,6 +784,8 @@ foreach my $line (@disks) {
$IDs{'interrupted'} = scalar @interrupted;
my @read_failure = grep( /read failure/, @outputA );
$IDs{'read_failure'} = scalar @read_failure;
my @read_failure2 = grep( /Failed in segment/, @outputA );
$IDs{'read_failure'} = $IDs{'read_failure'} + scalar @read_failure2;
my @unknown_failure = grep( /unknown failure/, @outputA );
$IDs{'unknown_failure'} = scalar @unknown_failure;
my @extended = grep( /\d.*\ ([Ee]xtended|[Ll]ong).*(?![Dd]uration)/, @outputA );
Expand Down

0 comments on commit 3a5d2ff

Please sign in to comment.