Add support for some NVMe temp sensors

Found on OVH's Advanced servers for example
This commit is contained in:
Daniel Berteaud 2019-07-30 14:01:35 +02:00
parent a66e9bb827
commit 1c8c99e9c9
1 changed files with 13 additions and 0 deletions

View File

@ -297,6 +297,19 @@ if ($smartctl && -x $smartctl){
print "Found a temperature sensor using smartctl: $block\n";
last;
}
# Format found on some NVMe SSD
elsif ($l =~ /Temperature:\s+(\d+(\.\d+)?)\sCelsius/){
$sensors->{$block} = {
description => "$block temperature",
threshold_low => $def_hd_temp_thres_high-$temp_hd_hyst,
threshold_high => $def_hd_temp_thres_high,
type => 'temp',
unit => '°C',
cmd => "$smartctl -A /dev/$block | grep Temperature: | awk '{ print \$2 }'"
};
print "Found a temperature sensor using smartctl: $block\n";
last;
}
}
}
# Some LSI based hardware RAID controller can report HDD temp