1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-23 06:35:42 +00:00

Added handling of parameter 190 (Airflow_Temperature), Seagate hard drives the next generation.

This commit is contained in:
Nikolay Beresnev 2011-06-27 18:20:38 +02:00 committed by Steve Schnepp
parent 37c8fd9a77
commit 6dbfc42550

View file

@ -1,4 +1,4 @@
#!/usr/local/bin/perl -w
#!/usr/local/bin/perl -w
# -*- perl -*-
=head1 NAME
@ -139,7 +139,7 @@ if ($^O eq 'linux') {
# without probing them.
} elsif ($^O eq 'freebsd') {
opendir(DEV, '/dev');
@drives = grep /^ada*[0-9]+$/, readdir DEV;
@drives = grep /^ad[0-9]+$/, readdir DEV;
closedir(DEV);
} elsif ($^O eq 'solaris') {
@drives = map { s@.*/@@ ; $_ } glob '/dev/rdsk/c*t*d*s2';
@ -175,7 +175,7 @@ if (defined $ARGV[0]) {
} elsif ($ARGV[0] eq 'config') {
print "graph_title HDD temperature\n";
print "graph_args --base 1000 -l 0\n";
print "graph_vlabel temp in °C\n";
print "graph_vlabel temp in C\n";
print "graph_category sensors\n";
print "graph_info This graph shows the temperature in degrees Celsius of the hard drives in the machine.\n";
print "$_.label $_\n" foreach @drives;
@ -215,6 +215,9 @@ foreach my $drive (@drives) {
} elsif ($output =~ /^(231 Temperature_Celsius.*)/m) {
my @F = split ' ', $1;
print "$drive.value $F[9]\n";
} elsif ($output =~ /^(190 Airflow_Temperature_Cel.*)/m) {
my @F = split ' ', $1;
print "$drive.value $F[9]\n";
} else {
print "$drive.value U\n";
print "$drive.extinfo Temperature not detected in smartctl output\n";
@ -244,4 +247,3 @@ sub command_for_drive_device {
$cmd .= $fulldev;
}