From e661ed7b14a24211589255029e0ee932674a3deb Mon Sep 17 00:00:00 2001 From: ballen4705 <ballen4705@4ea69e1a-61f1-4043-bf83-b5c94c648137> Date: Tue, 29 Oct 2002 14:19:11 +0000 Subject: [PATCH] Updated documentation. Noted additional commands for SCSI are at least in the code -- but do they work?? git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@155 4ea69e1a-61f1-4043-bf83-b5c94c648137 --- sm5/CHANGELOG | 11 +++- sm5/README | 148 +++++++++-------------------------------------- sm5/TODO | 10 +++- sm5/smartctl.8 | 14 ++--- sm5/smartctl.c | 14 ++--- sm5/smartctl.cpp | 14 ++--- sm5/smartd.8 | 18 +++--- 7 files changed, 74 insertions(+), 155 deletions(-) diff --git a/sm5/CHANGELOG b/sm5/CHANGELOG index 0a14ae130..379a7ce88 100644 --- a/sm5/CHANGELOG +++ b/sm5/CHANGELOG @@ -1,6 +1,6 @@ CHANGELOG for smartmontools -$Id: CHANGELOG,v 1.26 2002/10/29 10:16:13 ballen4705 Exp $ +$Id: CHANGELOG,v 1.27 2002/10/29 14:19:10 ballen4705 Exp $ Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net> @@ -26,6 +26,15 @@ NOTES FOR FUTURE RELEASES: see TODO file. CURRENT RELEASE (see VERSION file in this directory): +smartmontools-5.0-19 + + smartd: prints warning message when it gets SIGHUP, saying that it + is NOT re-reading the config file. + + smartctl: updated man page to say self-test commands -O,x,X,s,S,A + appear to be supported in the code. [I can't test these, can anyone + report?] + smartmontools-5.0-18 smartctl: smartctl would previously print the LBA of a self-test diff --git a/sm5/README b/sm5/README index 2694b6c4e..023aff8c6 100644 --- a/sm5/README +++ b/sm5/README @@ -4,10 +4,13 @@ SMARTMONTOOLS - SMART utility toolset for Linux == HOME == The home for smartmontools is located at: -http://smartmontools.sourceforge.net -Please see this web site -for updates, documentation, and for submitting patches and bug -reports. + http://smartmontools.sourceforge.net +Please see this web site for updates, documentation, and for +submitting patches and bug reports. + +You will find a mailing list for support and other questions at: +http://lists.sourceforge.net/lists/listinfo/smartmontools-support + == COPYING == Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net> @@ -21,12 +24,14 @@ You should have received a copy of the GNU General Public License (for example COPYING); if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + == CREDITS == This code was originally developed as a Senior Thesis by Michael Cornwell 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/ + == OVERVIEW == SMARTMONTOOLS contains utilities that control and monitor storage devices using the Self-Monitoring, Analysis and Reporting Technology @@ -52,13 +57,15 @@ smartctl is a command line utility designed to perform smartd is a daemon that periodically monitors S.M.A.R.T. status and reports errors and changes in S.M.A.R.T. attributes to syslog. -You can read about these commands using the man pages. Within this +If you have just downloaded smartmontools from the URL above, then +you can read about these commands using the man pages. Within this directory the commands: man ./smartctl.8 and man ./smartd.8 -will display the manual pages for the two commands. If you install the package on -your system, then + +will display the manual pages for the two commands. If you have +already installed the package on your system, then: man smartctl and man smartd @@ -72,120 +79,19 @@ To install, use the commands: The tools require Linux kernel 2.2.14 or greater in order to run. Any recent Linux distribution should support this package. -Ten files are installed: -/usr/sbin/smartd [Executable daemon] -/usr/sbin/smartctl [Executable command-line utility] -/etc/rc.d/init.d/smartd [Init/Startup script for smartd] -/usr/share/man/man8/smartctl.8.gz [Manual page] -/usr/share/man/man8/smartd.8.gz [Manual page] -/usr/share/doc/smartmontools-5.0/README [What you are reading!] -/usr/share/doc/smartmontools-5.0/TODO [Things that need to be done/fixed] -/usr/share/doc/smartmontools-5.0/CHANGELOG [A log of changes -- but we'll use CVS] -/usr/share/doc/smartmontools-5.0/COPYING [GNU Public License.] -/usr/share/doc/smartmontools-5.0/VERSION [Version number -- don't ask!] +Eleven files are installed: +/usr/sbin/smartd [Executable daemon] +/usr/sbin/smartctl [Executable command-line utility] +/etc/rc.d/init.d/smartd [Init/Startup script for smartd] +/usr/share/man/man8/smartctl.8.gz [Manual page] +/usr/share/man/man8/smartd.8.gz [Manual page] +/usr/share/doc/smartmontools-5.0/README [What you are reading!] +/usr/share/doc/smartmontools-5.0/TODO [Things that need to be done/fixed] +/usr/share/doc/smartmontools-5.0/CHANGELOG [A log of changes. Also see CVS] +/usr/share/doc/smartmontools-5.0/COPYING [GNU Public License.] +/usr/share/doc/smartmontools-5.0/VERSION [Version number] +/usr/share/doc/smartmontools-5.0/smartd.conf [Sample Configuration file for /etc/] Source and binary RPM files are available at the website listed above. - -== USAGE == -SMARTMONTOOLS contains two utilities: - -smartctl - A command line control utility -smartd - A monitoring daemon - -to run smartctl, use the syntax - -./smartctl [options] [device] - -See the man page for full details. A summary of the options is: - -Read only: -V Print License/Copyright information. -i Checks if the device supports S.M.A.R.T, and prints drive model - information. -c Checks if device has any S.M.A.R.T. Warranty Failures. This means - that the device is predicting failure in the next 24 hours. -g Prints only the generic S.M.A.R.T. attributes -v Prints only the vendor specific S.M.A.R.T. attributes & thresholds -l Prints only the S.M.A.R.T. error log -L Prints only the S.M.A.R.T. self-test log -a Prints all parameters for i,c,g,v,t,l,L -q Quiet operation; only show errors in error log, or self-test log, or smart status -Q Very quiet operation: only output is via the returned status - -Modify Display for Vendor-specific S.M.A.R.T. Raw Attribute Data: -m Converts Raw Attribute-009 from minutes to hours (Hitachi) - -Enable/Disable commands: -e Enables S.M.A.R.T. on device -d Disables S.M.A.R.T. on device -f Enables S.M.A.R.T. attributes auto-save on device -F Disables S.M.A.R.T. attributes auto-save on device -t Enables S.M.A.R.T. automatic offline self test timer which scans the - drive every four hours for disk defects. -T Disables S.M.A.R.T. automatic offline self test timer - -Test Commands: -O Runs S.M.A.R.T. Immediate offline Test -S Runs S.M.A.R.T. Short Self Test (usually under ten minutes) -s Runs S.M.A.R.T. Short Self Test in Captive Mode. (WARNING this test - will busy out drive for length of test ) -X Runs S.M.A.R.T. Extended Self Test (tens of minutes) -x Runs S.M.A.R.T. Extended Self Test in Captive Mode. (WARNING this - test will busy out the drive for the length of the test) -A Aborts Non-Captive S.M.A.R.T. Tests. - -devices are IDE devices which usually are: - -/dev/hda Primary Master -/dev/hdb Primary Slave -/dev/hdc Secondary Master -/dev/hdd Secondary Slave - -for SCSI the devices are usually - -/dev/sda First SCSI Disk -/dev/sdb second SCSI disl - -Examples: - smartctl -e /dev/hda - enables SMART on hard drive - smartctl -c /dev/sda - checks status of hard drive. - - -smartd will scan for all devices that support SMART and poll them very -thirty minutes for errors or for changes in attribute values. When an -error or attribute value change occurs, it sends log information to -the SYSLOG facility. Typically these messages and warnings appear in -/var/log/messages. - -smartd - starts background daemon to - monitor hard drive status -You can read about the options using man smartd. - - -== REFERENCES == -If you need help in understanding the output of smartctl, a good place -to start is to read Section 8.41 of the AT Attachment with Packet -Interface-5 (ATA/ATAPI-5) specification. This documents the -S.M.A.R.T. functionality which the smartmontools utilities provide -access to. You can find Revision 1 of this document at: -http://www.t13.org/project/d1321r1c.pdf - -Future versions of the specifications (ATA/ATAPI-6 and ATA/ATAPI-7) -can be obtained from: -http://www.t13.org/#FTP_site -Later revisions (2, 3) of the ATA/ATAPI-5 specification are also -available there. - - -The functioning of S.M.A.R.T. is also described by the SFF-8035i -revision 2 specification. This is a publication of the Small Form -Factors Committee, and can be obtained from SFF Committee, 14426 Black -Walnut Ct., Saratoga, CA 95070, USA. -SFF FaxAccess: (408) 741-1600 -Ph: (408) 867-6630 -Fax: (408) 867-2115 -E-Mail: 250-1752@mcimail.com. - - -$Id: README,v 1.9 2002/10/24 07:50:45 ballen4705 Exp $ +PLEASE READ THE MANUAL PAGES FOR SMARTCTL AND SMARTD FOR MORE INFORMATION. diff --git a/sm5/TODO b/sm5/TODO index dc0bdf1d9..162c8ece2 100644 --- a/sm5/TODO +++ b/sm5/TODO @@ -4,7 +4,7 @@ Home page of code is: http://smartmontools.sourceforge.net Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net> -$Id: TODO,v 1.17 2002/10/29 13:38:49 ballen4705 Exp $ +$Id: TODO,v 1.18 2002/10/29 14:19:10 ballen4705 Exp $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -35,7 +35,7 @@ Modifications ------------- smartctl: - +--------- Handle extended error and self-test logs gracefully. Can someone tell me a disk that supports more than log pages 1 and 6? I need to get a disk so I can test this functionality, when I add it. @@ -51,12 +51,16 @@ Parse and print more attribute flag meanings (IBM ones, eg performance etc). smartd: - +------- Perhaps change smartd to look in /proc/ide and /proc/scsi to see what exists? If something doesn't exit then don't try to open it? This should probably be the default option if there is no configuration file. +Add following config file directives: + -m USER@ADDRESS send email to user if critical problems found + -f enable autosave of attributes + -o enable automatic offline testing General Fixes diff --git a/sm5/smartctl.8 b/sm5/smartctl.8 index f7b94878c..cd73e87a7 100644 --- a/sm5/smartctl.8 +++ b/sm5/smartctl.8 @@ -1,6 +1,6 @@ \# Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net> \# -\# $Id: smartctl.8,v 1.21 2002/10/28 23:46:59 ballen4705 Exp $ +\# $Id: smartctl.8,v 1.22 2002/10/29 14:19:10 ballen4705 Exp $ \# \# This program is free software; you can redistribute it and/or modify it \# under the terms of the GNU General Public License as published by the Free @@ -15,7 +15,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 SMARTCTL 8 "$Date: 2002/10/28 23:46:59 $" "smartmontools-5.0" +.TH SMARTCTL 8 "$Date: 2002/10/29 14:19:10 $" "smartmontools-5.0" .SH NAME smartctl \- S.M.A.R.T. control and monitor utility .SH SYNOPSIS @@ -57,10 +57,10 @@ The second argument is the device to be controlled or interrogated. ATA devices use the form "/dev/hd*" and SCSI devices use the form "/dev/sd*". -SCSI devices only accept the options a,i,c,e,d, and p. For SCSI Tape -Drives and Changers with TapeAlerts support use the devices "/dev/st*" -and "/dev/sg*". TapeAlerts devices accept the options a,i,c,e,d, and -p. +SCSI devices only accept the options a,i,c,e,d,O,s,S,x,X,A and V. For +SCSI Tape Drives and Changers with TapeAlerts support use the +devices "/dev/st*" and "/dev/sg*". TapeAlerts devices accept the options +a,i,c,e,d, and V. The options are grouped below into several categories. .B smartctl @@ -471,4 +471,4 @@ Please let us know if there is an on\-line source for this document. .SH CVS ID OF THIS PAGE: -$Id: smartctl.8,v 1.21 2002/10/28 23:46:59 ballen4705 Exp $ +$Id: smartctl.8,v 1.22 2002/10/29 14:19:10 ballen4705 Exp $ diff --git a/sm5/smartctl.c b/sm5/smartctl.c index f030db67a..6e917dc60 100644 --- a/sm5/smartctl.c +++ b/sm5/smartctl.c @@ -39,7 +39,7 @@ #include "extern.h" extern const char *CVSid1, *CVSid2, *CVSid3, *CVSid4; -const char* CVSid5="$Id: smartctl.c,v 1.22 2002/10/28 23:46:59 ballen4705 Exp $" +const char* CVSid5="$Id: smartctl.c,v 1.23 2002/10/29 14:19:11 ballen4705 Exp $" CVSID1 CVSID2 CVSID3 CVSID4 CVSID5 CVSID6; // This is a block containing all the "control variables". We declare @@ -98,12 +98,12 @@ void Usage ( void){ printf(" %c Enable SMART Attribute Autosave (ATA Only)\n", SMARTAUTOSAVEENABLE); printf(" %c Disable SMART Attribute Autosave (ATA Only)\n", SMARTAUTOSAVEDISABLE); printf("\nTest Options (no more than one):\n"); - printf(" %c Execute Off-line data collection (ATA Only)\n", SMARTEXEOFFIMMEDIATE); - printf(" %c Execute Short Self Test (ATA Only)\n", SMARTSHORTSELFTEST ); - printf(" %c Execute Short Self Test (Captive Mode) (ATA Only)\n", SMARTSHORTCAPSELFTEST ); - printf(" %c Execute Extended Self Test (ATA Only)\n", SMARTEXTENDSELFTEST ); - printf(" %c Execute Extended Self Test (Captive) (ATA Only)\n", SMARTEXTENDCAPSELFTEST ); - printf(" %c Execute Self Test Abort (ATA Only)\n", SMARTSELFTESTABORT ); + printf(" %c Execute Off-line data collection (ATA/SCSI)\n", SMARTEXEOFFIMMEDIATE); + printf(" %c Execute Short Self Test (ATA/SCSI)\n", SMARTSHORTSELFTEST ); + printf(" %c Execute Short Self Test (Captive Mode) (ATA/SCSI)\n", SMARTSHORTCAPSELFTEST ); + printf(" %c Execute Extended Self Test (ATA/SCSI)\n", SMARTEXTENDSELFTEST ); + printf(" %c Execute Extended Self Test (Captive) (ATA/SCSI)\n", SMARTEXTENDCAPSELFTEST ); + printf(" %c Execute Self Test Abort (ATA/SCSI)\n", SMARTSELFTESTABORT ); printf("\nExamples:\n"); printf(" smartctl -etf /dev/hda (Enables SMART on first disk)\n"); printf(" smartctl -a /dev/hda (Prints all SMART information)\n"); diff --git a/sm5/smartctl.cpp b/sm5/smartctl.cpp index 26e39dbef..7f0dfbe8e 100644 --- a/sm5/smartctl.cpp +++ b/sm5/smartctl.cpp @@ -39,7 +39,7 @@ #include "extern.h" extern const char *CVSid1, *CVSid2, *CVSid3, *CVSid4; -const char* CVSid5="$Id: smartctl.cpp,v 1.22 2002/10/28 23:46:59 ballen4705 Exp $" +const char* CVSid5="$Id: smartctl.cpp,v 1.23 2002/10/29 14:19:11 ballen4705 Exp $" CVSID1 CVSID2 CVSID3 CVSID4 CVSID5 CVSID6; // This is a block containing all the "control variables". We declare @@ -98,12 +98,12 @@ void Usage ( void){ printf(" %c Enable SMART Attribute Autosave (ATA Only)\n", SMARTAUTOSAVEENABLE); printf(" %c Disable SMART Attribute Autosave (ATA Only)\n", SMARTAUTOSAVEDISABLE); printf("\nTest Options (no more than one):\n"); - printf(" %c Execute Off-line data collection (ATA Only)\n", SMARTEXEOFFIMMEDIATE); - printf(" %c Execute Short Self Test (ATA Only)\n", SMARTSHORTSELFTEST ); - printf(" %c Execute Short Self Test (Captive Mode) (ATA Only)\n", SMARTSHORTCAPSELFTEST ); - printf(" %c Execute Extended Self Test (ATA Only)\n", SMARTEXTENDSELFTEST ); - printf(" %c Execute Extended Self Test (Captive) (ATA Only)\n", SMARTEXTENDCAPSELFTEST ); - printf(" %c Execute Self Test Abort (ATA Only)\n", SMARTSELFTESTABORT ); + printf(" %c Execute Off-line data collection (ATA/SCSI)\n", SMARTEXEOFFIMMEDIATE); + printf(" %c Execute Short Self Test (ATA/SCSI)\n", SMARTSHORTSELFTEST ); + printf(" %c Execute Short Self Test (Captive Mode) (ATA/SCSI)\n", SMARTSHORTCAPSELFTEST ); + printf(" %c Execute Extended Self Test (ATA/SCSI)\n", SMARTEXTENDSELFTEST ); + printf(" %c Execute Extended Self Test (Captive) (ATA/SCSI)\n", SMARTEXTENDCAPSELFTEST ); + printf(" %c Execute Self Test Abort (ATA/SCSI)\n", SMARTSELFTESTABORT ); printf("\nExamples:\n"); printf(" smartctl -etf /dev/hda (Enables SMART on first disk)\n"); printf(" smartctl -a /dev/hda (Prints all SMART information)\n"); diff --git a/sm5/smartd.8 b/sm5/smartd.8 index a6729f06e..2933aa2fb 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/28 23:47:00 $" "smartmontools-5.0" +.TH SMARTD 8 "$Date: 2002/10/29 14:19:11 $" "smartmontools-5.0" .SH NAME smartd \- S.M.A.R.T. Daemon .SH SYNOPSIS @@ -32,15 +32,15 @@ is compatible with ATA/ATAPI-5 and earlier standards (see .B REFERENCES below) -.B smartd -will notify users of S.M.A.R.T. errors and changes of -S.M.A.R.T. attributes via the SYSLOG interface. These notifications -and warnings normally appear in +.B smartd +will attempt to enable S.M.A.R.T. monitoring on devices, and will then +notify users of S.M.A.R.T. errors and changes of S.M.A.R.T. attributes +via the SYSLOG interface. These notifications and warnings normally +appear in .B /var/log/messages. -It can be configured at start-up -using the file +It can be configured at start-up using the file .B /etc/smartd.conf. -Note that +Note that .B smartd only reads the configuration file at start-up. Changes to the configuration file only take effect after the @@ -403,4 +403,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.14 2002/10/28 23:47:00 ballen4705 Exp $ +$Id: smartd.8,v 1.15 2002/10/29 14:19:11 ballen4705 Exp $ -- GitLab