From 48964a6ea25ef135afc6a8672486dc384648c0b1 Mon Sep 17 00:00:00 2001 From: ballen4705 <ballen4705@4ea69e1a-61f1-4043-bf83-b5c94c648137> Date: Thu, 24 Oct 2002 10:53:50 +0000 Subject: [PATCH] Revised smartd documentation to include some sample output git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@107 4ea69e1a-61f1-4043-bf83-b5c94c648137 --- sm5/CHANGELOG | 5 ++++- sm5/VERSION | 2 +- sm5/smartd.8 | 40 ++++++++++++++++++++++++++++++---------- sm5/smartd.c | 6 +++--- sm5/smartd.cpp | 6 +++--- sm5/smartmontools.spec | 2 ++ 6 files changed, 43 insertions(+), 18 deletions(-) diff --git a/sm5/CHANGELOG b/sm5/CHANGELOG index 4972d691f..80b93c6f9 100644 --- a/sm5/CHANGELOG +++ b/sm5/CHANGELOG @@ -1,6 +1,6 @@ CHANGELOG for smartmontools -$Id: CHANGELOG,v 1.17 2002/10/24 07:50:45 ballen4705 Exp $ +$Id: CHANGELOG,v 1.18 2002/10/24 10:53:50 ballen4705 Exp $ Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net> @@ -29,6 +29,9 @@ NOTES FOR NEXT RELEASE: smartmontools-5.0-11 + smartd now prints the name of a failed or changed attribute + into logfile, not just ID number + Changed name of -p (print version) option to -V Minor change in philosophy: if a SMART command fails or the device diff --git a/sm5/VERSION b/sm5/VERSION index 48082f72f..b4de39476 100644 --- a/sm5/VERSION +++ b/sm5/VERSION @@ -1 +1 @@ -12 +11 diff --git a/sm5/smartd.8 b/sm5/smartd.8 index 5bb6c5b66..dc4610d14 100644 --- a/sm5/smartd.8 +++ b/sm5/smartd.8 @@ -13,7 +13,7 @@ \# at the Concurrent Systems Laboratory (now part of the Storage Systems \# Research Center), Jack Baskin School of Engineering, University of \# California, Santa Cruz. http://ssrc.soe.ucsc.edu/ -.TH SMARTD 8 "$Date: 2002/10/24 07:50:45 $" "smartmontools-5.0" +.TH SMARTD 8 "$Date: 2002/10/24 10:53:50 $" "smartmontools-5.0" .SH NAME smartd \- S.M.A.R.T. Daemon .SH SYNOPSIS @@ -60,15 +60,15 @@ messages are harmless.] .SH OPTIONS .TP -p -Version: Prints license, copyright, and CVS version information onto STDOUT or into the SYSLOG -log (normally /var/log/messages) and then exits. Please include this information if you are reporting bugs. +.B V +Version: Prints license, copyright, and CVS version information onto +STDOUT or into the SYSLOG log (normally /var/log/messages) and then +exits. Please include this information if you are reporting bugs. .TP -X +.B X eXamine: Runs smartd in "debug" mode. In this mode, it does not fork and displays status information to STDOUT. - .SH EXAMPLES .B @@ -93,9 +93,9 @@ and stop it by using .B '/etc/rc.d/init.d/smartd stop'. If you want -.B -smartd -to start running whenever your machine is booted, this can be enabled by using the command: +.B smartd +to start running whenever your machine is booted, this can be enabled +by using the command: .nf .B '/sbin/chkconfig --add smartd' .fi @@ -103,7 +103,27 @@ and disabled using the command: .nf .B '/sbin/chkconfig --del smartd' +.SH NOTES +.B smartd +will make log entries if SMART attribute values have changed, +for example: +.nf +.B 'Device: /dev/hda, SMART Attribute: 194 Temperature_Centigrade changed from 94 to 93' +.fi +Note that in this message, the value given is the 'Normalized' not +the 'Raw' Attribute value (the disk temperature in this case is about 22 +centigrade). See the +.B smartctl +manual page for further explanation. +.B smartd +will also make log entries if a SMART attribute has failed, for example: +.nf +.B 'Device: /dev/hdc, Failed SMART attribute: 5 Reallocated_Sector_Ct. Use smartctl -v /dev/hdc.' +.fi +Such entries should not be ignored - they mean that the disk is failing. Use the +.B smartctl +utility to investigate. .PP .SH AUTHOR Bruce Allen @@ -178,4 +198,4 @@ Please let us know if there is an on\-line source for this document. .SH CVS ID OF THIS PAGE: -$Id: smartd.8,v 1.8 2002/10/24 07:50:45 ballen4705 Exp $ +$Id: smartd.8,v 1.9 2002/10/24 10:53:50 ballen4705 Exp $ diff --git a/sm5/smartd.c b/sm5/smartd.c index 6491080f6..b7d7825f8 100644 --- a/sm5/smartd.c +++ b/sm5/smartd.c @@ -37,7 +37,7 @@ #include "ataprint.h" extern const char *CVSid1, *CVSid2; -const char *CVSid3="$Id: smartd.c,v 1.22 2002/10/24 10:23:29 ballen4705 Exp $" +const char *CVSid3="$Id: smartd.c,v 1.23 2002/10/24 10:53:50 ballen4705 Exp $" CVSID1 CVSID4 CVSID7; int daemon_init(void){ @@ -250,8 +250,8 @@ int ataCheckDevice( atadevices_t *drive){ loc=attributename; while (*loc && *loc==' ') loc++; - printout(LOG_CRIT,"Device: %s, Failed SMART attribute: %s. Use smartctl -v.\n", - drive->devicename,loc); + printout(LOG_CRIT,"Device: %s, Failed SMART attribute: %s. Use smartctl -v %s.\n", + drive->devicename,loc,drive->devicename); } // WHEN IT WORKS, we should here add a call to ataSmartStatus2() diff --git a/sm5/smartd.cpp b/sm5/smartd.cpp index c32af03b6..639a751fe 100644 --- a/sm5/smartd.cpp +++ b/sm5/smartd.cpp @@ -37,7 +37,7 @@ #include "ataprint.h" extern const char *CVSid1, *CVSid2; -const char *CVSid3="$Id: smartd.cpp,v 1.22 2002/10/24 10:23:29 ballen4705 Exp $" +const char *CVSid3="$Id: smartd.cpp,v 1.23 2002/10/24 10:53:50 ballen4705 Exp $" CVSID1 CVSID4 CVSID7; int daemon_init(void){ @@ -250,8 +250,8 @@ int ataCheckDevice( atadevices_t *drive){ loc=attributename; while (*loc && *loc==' ') loc++; - printout(LOG_CRIT,"Device: %s, Failed SMART attribute: %s. Use smartctl -v.\n", - drive->devicename,loc); + printout(LOG_CRIT,"Device: %s, Failed SMART attribute: %s. Use smartctl -v %s.\n", + drive->devicename,loc,drive->devicename); } // WHEN IT WORKS, we should here add a call to ataSmartStatus2() diff --git a/sm5/smartmontools.spec b/sm5/smartmontools.spec index 8c382839a..0ec3418fb 100644 --- a/sm5/smartmontools.spec +++ b/sm5/smartmontools.spec @@ -102,6 +102,8 @@ fi %define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`) %changelog * Thu Oct 24 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net> +- smartd now prints the name of a failed or changed attribute into logfile, + not just ID number - Changed name of -p (print version) option to -V - Minor change in philosophy: if a SMART command fails or the device appears incapable of a SMART command that the user has asked for, -- GitLab