Show message if smart check failed

This commit is contained in:
Jamie Cameron
2013-06-15 19:35:21 -07:00
parent 092c10f325
commit 83aa466701
3 changed files with 10 additions and 3 deletions

View File

@@ -20,6 +20,7 @@ right_cpuinfo=Processor information
right_cputemps=CPU temperatures
right_drivetemps=Drive temperatures
right_driveerr=$1 errors!
right_drivefailed=SMART check failed!
right_cputype=$5, $8 cores
right_load=$1 (1 min) $2 (5 mins) $3 (15 mins)
right_cpuuse=CPU usage

View File

@@ -99,8 +99,13 @@ if ($level == 0) {
my $emsg;
if ($t->{'errors'}) {
$emsg .= " (<font color=red>".
&text('right_driveerr', $t->{'errors'}).
"</font>)";
&text('right_driveerr', $t->{'errors'}).
"</font>)";
}
elsif ($t->{'failed'}) {
$emsg .= " (<font color=red>".
$text{'right_drivefailed'}.
"</font>)";
}
push(@temps, $short.": ".$t->{'temp'}."&#8451;".$emsg);
}

View File

@@ -389,7 +389,8 @@ if (!$config{'collect_notemp'} &&
$a->[1] > 0) {
push(@rv, { 'device' => $d->{'device'},
'temp' => int($a->[1]),
'errors' => $st->{'errors'} });
'errors' => $st->{'errors'},
'failed' => !$st->{'check'} });
}
}
}