(no subject)

Kristian Duus Østergaard <[email protected]>
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I have modified the smartd script as the delivered script doesn't detect
the temperature of my harddrive.
 
The below patch is from an older version, so the linenumbers do not
match in release 7.4.0 it's line 142.


- --- usr/share/logwatch/scripts/services/smartd.old      2013-01-29
07:02:01.000000000 +0100
+++ usr/share/logwatch/scripts/services/smartd  2013-01-30
07:48:44.000000000 +0100
@@ -137,7 +137,7 @@
 #      $ParamChanges{$Device}{$Msg}++;
    } elsif ( ($Device) = ($ThisLine =~ /^Device: ([^,]+), not found in
smartd database./ )) {
       $NotInDatabase{$Device}++;
- -   } elsif ( my
($Device,$AttribType,$Code,$Name,undef,undef,undef,$RawVal) = ($ThisLine
=~ /^Device: ([^,]+), SMART ([A-Za-z]+) Attribute: ([0-9]+)
(Temperature_Celsius) changed from ([0-9]+) (\[Raw [0-9]+\]) to ([0-9]+)
\[Raw ([0-9]+)\]/)) {
+        } elsif ( my
($Device,$AttribType,$Code,$Name,undef,undef,undef,$RawVal) = ($ThisLine
=~ /^Device: ([^,]+), SMART ([A-Za-z]+) Attribute: ([0-9]+)
(Temperature_Celsius) changed from ([0-9]+) (\[Raw [0-9]+(?:
\([0-9]+\s[0-9]+\s[0-9]+\s[0-9]+(?:\s[0-9])?\))?\]) to ([0-9]+) \[Raw
([0-9]+)(?: \([0-9]+\s[0-9]+\s[0-9]+\s[0-9]+(?:\s[0-9])?\))?\]/)) {
       push @{$TempChanges{$Device}}, $RawVal;
    # smartd reports temperature changes this way only for SCSI disks
    } elsif ( my ($Device,$AttribType,$Code,$Name,undef,undef,$NewVal) =
($ThisLine =~ /^Device: ([^,]+), SMART ([A-Za-z]+) Attribute: ([0-9]+)
([A-Za-z_]+) changed from ([0-9]+) (\[Raw [0-9]+\] )?to ([0-9]+)/)) {

- -- 
Mvh.
 Kristian Duus Østergaard
 Kristian Duus Consult
 email: [email protected]
 mobil: +45 22114772
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlJ54TYACgkQIfWQiCIq83oHxwCeJxjtFG1cF94BnAcJ6baON3Tv
jjQAn2VRaI88vZGJE1GwOFPXLeCAhP3B
=dfK9
-----END PGP SIGNATURE-----


------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Logwatch-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/logwatch-devel
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.