smartd

Stefan Jakobs <[email protected]>
Newsgroups gmane.comp.log.logwatch.devel
Organization Rechenzentrum Universität Stuttgart
Message-ID <[email protected]>
Hello,

I attached a patch to the recent smartd Version from CVS which fixes the 
following unmatched entries:

Drive: DEVICESCAN, implied '-a' Directive on line 27 of file /etc/smartd.conf
 Device: /dev/hda, packet devices [this device CD/DVD] not SMART capable
 Device /dev/sda: SATA disks accessed via libata are supported by Linux kernel 
versions 2.6.15-rc1 and above. Try adding '-d ata' or '-d sat' to the 
smartd.conf config file line.
 Device /dev/sdb: SATA disks accessed via libata are supported by Linux kernel 
versions 2.6.15-rc1 and above. Try adding '-d ata' or '-d sat' to the 
smartd.conf config file line.
 Device /dev/sdc: SATA disks accessed via libata are supported by Linux kernel 
versions 2.6.15-rc1 and above. Try adding '-d ata' or '-d sat' to the 
smartd.conf config file line.


Greetings
Stefan

_______________________________________________
Logwatch-Devel mailing list
[email protected]
http://www2.list.logwatch.org:81/mailman/listinfo/logwatch-devel
smart.patch (text/x-diff, 2.5 KB)
*** smartd	2008-11-02 19:33:59.000000000 +0100
--- smartd.new	2008-11-02 19:59:08.000000000 +0100
*************** my %Failed = ();
*** 50,55 ****
--- 50,56 ----
  my @OtherList = ();
  my $DLine = 0;
  my %UnavailableDev = ();
+ my %SataDisk = ();
  
  my $Detail = $ENV{'LOGWATCH_DETAIL_LEVEL'} || 0;
  my $IgnoreUnmatched = $ENV{'smartd_ignore_unmatched'} || 0;
*************** while (defined(my $ThisLine = <STDIN>)) 
*** 108,114 ****
  	  || ($ThisLine =~ /Unable to register device (.*) \(no Directive -d removable\). Exiting/)
  	  || ($ThisLine =~ /Device (.*), SATA disks accessed via libata are not currently supported by smartmontools./) 
  	  || ($ThisLine =~ /Device: (.*), IE \(SMART\) not enabled, skip device Try '.*' to turn on SMART features/) 
! 	  || ($ThisLine =~ /Device: (.*), Bad IEC (SMART) mode page, err=-5, skip device/))
     {
         # ignore
  
--- 109,117 ----
  	  || ($ThisLine =~ /Unable to register device (.*) \(no Directive -d removable\). Exiting/)
  	  || ($ThisLine =~ /Device (.*), SATA disks accessed via libata are not currently supported by smartmontools./) 
  	  || ($ThisLine =~ /Device: (.*), IE \(SMART\) not enabled, skip device Try '.*' to turn on SMART features/) 
! 	  || ($ThisLine =~ /Device: (.*), Bad IEC (SMART) mode page, err=-5, skip device/)
! 	  || ($ThisLine =~ /Drive: DEVICESCAN, implied '-a' Directive on line [\d]+ of file/)
! 	  || ($ThisLine =~ /packet devices \[this device CD\/DVD\] not SMART capable/) )
     {
         # ignore
  
*************** while (defined(my $ThisLine = <STDIN>)) 
*** 147,152 ****
--- 150,157 ----
        $UnableToReg{"$Device,$DLine"}++  
     } elsif ( ($Device) = ($ThisLine =~ /Device ([^ ]+) not available/)) {
        $UnavailableDev{$Device}++;
+    } elsif ( my ($Device) = ($ThisLine =~ /Device (.*): SATA disks accessed via libata are supported by Linux kernel versions 2.6.15-rc1 and above/) ) {
+       $SataDisk{"$Device"}++;
     } else {
        # Report any unmatched entries...
        push @OtherList,"$ThisLine\n";
*************** if (%UnavailableDev) {
*** 282,287 ****
--- 287,300 ----
     }
  }
  
+ if (%SataDisk) {
+    print "\nSATA disk(s) supported by Linux kernel >= 2.6.15-rc1:\n";
+    foreach my $Device (sort keys %SataDisk) {
+       print "  " .$Device .": Try adding '-d ata' or '-d sat' to the smartd.conf config file line\n";
+    }
+    print "\n";
+ } 
+ 
  if (($#OtherList >= 0) and (not $IgnoreUnmatched)){
     print "\n**Unmatched Entries**\n";
     print @OtherList;
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQBJDfotBiHtkFOLX+gRAm8sAJ91V7BwmAQoS73bfj6ZmX0oe2Am3ACdFAow
bgBaK+35X9lPmUjMkEuQKLs=
=3jcM
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.