From f69b396c48652d7781c45020a14efbfdf51febcf Mon Sep 17 00:00:00 2001 From: Munzy Date: Tue, 16 Apr 2019 13:50:16 -0700 Subject: [PATCH] Added Wrapper for SAS drives. --- snmp/smart | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/snmp/smart b/snmp/smart index 1f68ccb..31afbdc 100755 --- a/snmp/smart +++ b/snmp/smart @@ -339,8 +339,42 @@ foreach my $line ( @disks ){ $IDs{$id}=$temp; } + + + } + # SAS Wrapping + # Section by Cameron Munroe (munroenet[at]gmail.com) + + # Elements in Grown Defect List. + # Marking as 5 Reallocated_Sector_Ct + + if ($line =~ "Elements in grown defect list:"){ + + my @lineA=split(/\ /, $line, 10); + my $raw=$lineA[5]; + + # Reallocated Sector Count ID + $IDs{5}=$raw; + + } + + # Current Drive Temperature + # Marking as 194 Temperature_Celsius + + if ($line =~ "Current Drive Temperature:"){ + + my @lineA=split(/\ /, $line, 10); + my $raw=$lineA[3]; + + # Temperature C ID + $IDs{194}=$raw; + + } + + # End of SAS Wrapper + $outputAint++; }