[pve-devel] [PATCH v3 storage 2/4] disks: use smartctl -H -A

Fabian Gr├╝nbichler f.gruenbichler at proxmox.com
Wed Sep 28 13:42:23 CEST 2016


to only list SMART health and attributes, instead of
"smartctl -a", which prints "all SMART information"
---
 PVE/Diskmanage.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/Diskmanage.pm b/PVE/Diskmanage.pm
index 5909d73..edc0ea8 100644
--- a/PVE/Diskmanage.pm
+++ b/PVE/Diskmanage.pm
@@ -78,7 +78,7 @@ sub get_smart_data {
 
     my $returncode = 0;
     eval {
-	$returncode = run_command([$SMARTCTL, '-a', '-f', 'brief', $disk], noerr => 1, outfunc => sub{
+	$returncode = run_command([$SMARTCTL, '-H', '-A', '-f', 'brief', $disk], noerr => 1, outfunc => sub{
 	    my ($line) = @_;
 
 	    if ($datastarted && $line =~ m/^[ \d]{2}\d/) {
-- 
2.1.4




More information about the pve-devel mailing list