===============================================


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.





You will find a mailing list for support and other questions at:


http://lists.sourceforge.net/lists/listinfo/smartmontools-support








== COPYING ==


Copyright (C) 2002-3 Bruce Allen <smartmontools-support@lists.sourceforge.net>





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


Software Foundation; either version 2, or (at your option) any later


version.





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


(S.M.A.R.T.) system build into ATA and SCSI Hard Drives. This is used


to check the reliability of the hard drive and to predict drive


failures.  SMARTMONTOOLS Version 5.x is designed to comply to the


ATA/ATAPI-5 specification (Revision 1).  Future releases of


SMARTMONTOOLS (Versions 6.x and 7.x) will comply with the ATA/ATAPI-6


and ATA/ATAPI-7 specifications.





This package is meant to be an up-to-date replacement for the


ucsc-smartsuite and smartsuite packages, and is derived from that


code.








== CONTENTS ==


The suite contains two utilities:





smartctl is a command line utility designed to perform


         S.M.A.R.T. tasks.such as disk self-checks, and to


         report the S.M.A.R.T. status of the disk.





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.





SEE THE FILE "WARNINGS" FOR REPORTS OF HARDWARE WHERE THESE UTILITIES MIGHT


CAUSE SERIOUS PROBLEMS SUCH AS LOCKUPS.





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 have


already installed the package on your system, then:


  man smartctl


and


  man smartd


will display the same information.








== INSTALLATION ==


To install, use the commands:


  make


  make install





Any recent Linux distribution should support this package.  Note that


smartmontools requires Linux kernel 2.2.14 or greater in order to run


at all.  But to give the ATA RETURN SMART STATUS command, the kernel


needs to support the HDIO_DRIVE_TASK ioctl().  Any 2.4 series kernel


should provide this support.  I am told that some of the 2.2.20 and


later kernels also provide this support if they are properly


patched/configured.





Seventeen 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/man/man5/smartd.conf.5.gz            [Manual page]


/usr/share/doc/smartmontools-5.1/README         [What you are reading!]


/usr/share/doc/smartmontools-5.1/TODO           [Things that need to be done/fixed]


/usr/share/doc/smartmontools-5.1/CHANGELOG      [A log of changes. Also see CVS]


/usr/share/doc/smartmontools-5.1/COPYING        [GNU Public License.] 


/usr/share/doc/smartmontools-5.1/VERSION        [Version number]


/usr/share/doc/smartmontools-5.1/WARNINGS       [Systems where lockups or other serious problems reported]


/usr/share/doc/smartmontools-5.1/smartd.conf    [Example Configuration file for /etc/]


/usr/share/doc/smartmontools-5.1/examplescripts [Executable scripts for -M exec of smartd.conf (4 files)]





Source and binary RPM files are available at the website listed above.





PLEASE READ THE MANUAL PAGES FOR SMARTCTL AND SMARTD FOR MORE INFORMATION.








STARTING WITH SMARTMONTOOLS 5.1.X, THE COMMAND LINE OPTIONS AND THE


SMARTD.CONF DIRECTIVES HAVE BEEN RENAMED.  WHAT FOLLOWS IS A SUMMARY


TABLE SHOWING THE COMPARISON BETWEEN THE OLD AND THE NEW OPTION AND


DIRECTIVE NAMES.





== NEW OPTION NAMES FOR SMARTCTL 5.1 ==


The following is a synopsis of the new options in smartctl 5.1 -- please see the


man pages for more information.





  -h, --help, --usage


        Show usage and syntax help





  -V, --version, --copyright, --license


        Show version, copyright, and license info then exit





  -q MODE, --quietmode=MODE


        Set the quiet mode to one of: errorsonly, silent





  -d TYPE, --device=TYPE


        Set the device type to one of: ata, scsi





  -T TYPE, --tolerance=TYPE


        Set tolerance level to one of:


                normal       - Exit if a mandatory SMART command fails [DEFAULT]


                conservative - Exit if any SMART command fails


                permissive   - Continue even if a mandatory SMART command fails





  -b TYPE, --badsum=TYPE


        Action to take on a bad checksum.  TYPE and its meaning are:


                warn   - Issue a warning, but continue [DEFAULT] 


                exit   - Exit smartctl


                ignore - Continue silently without issuing a warning [NEW]





  -s VALUE, --smart=VALUE


        Enable/disable SMART.  VALUE is one of: on, off 





  -o VALUE, --offlineauto=VALUE


        Enable/disable automatic offline testing.  VALUE is one of: on, off 





  -S VALUE, --saveauto=VALUE


        Enable/disable attribute autosave.  VALUE is one of: on, off 





  -H, --health


        Show SMART health status





  -c, --capabilities


        Show SMART capabilities





  -A, --attributes


        Show SMART vendor-specific attributes and values.





  -l TYPE, --log=TYPE


        Show device log. Type is one of: error, selftest





  -i, --info


        Show drive information





  -a, --all


        Show all SMART information.  Equivalent to -HcAi -l error -l selftest





  -v N,OPTION , --vendorattribute=N,OPTION


        Set vendor specific OPTION for attribute N.  Currently supported are:





                  N     OPTION          Effect


                -----------------------------------------------------------


                009     minutes         Display in minutes instead of hours





        Note that in the future this option may be used multiple times


        with different arguments, to modify options for different


        attributes.





  -t TEST, --test=TEST


        Perform TEST immediately.  TEST is one of: offline, short, long





  -C, --captive


        When used with -t, performs test in captive mode.  Has no effect on


        offline test, or when used without -t option.





  -X, --abort


        Abort any non-captive test





The following table shows the mapping of old to new smartctl options and of


old to new smartd.conf directives:





  -------------------------------------------------------------------------------------------------------------------


  smartctl      smartctl options        smartctl options                  smartd.conf               smartd.conf


  options       Versions >= 5.1         Versions >= 5.1                   DIRECTIVES                DIRECTIVES


  Versons<=5.0  (short options)         (long options)                    Versions <= 5.0           Versions >= 5.1


  -------------------------------------------------------------------------------------------------------------------


  -h, -?        -h, -?                  --help


  -V            -V                      --version, --copyright, --license


  -i            -i                      --info                                                          CONFLICT


  -q            -q errorsonly           --quietmode=errorsonly


  -Q            -q silent               --quietmode=silent


  -n            -d ata                  --device=ata                       -A				-d ata


  -N            -d scsi                 --device=scsi                      -S                           -d scsi


  -P            -T permissive           --tolerance=permissive             -P                           -T permissive


  -U            -T conservative         --tolerance=conservative


  -W            -b                      --badsum=exit


                -r                      --report=TYPE


  -e            -s on                   --smart=on


  -d            -s off                  --smart=off


  -t            -o on                   --offlineauto=on                   -T 1                         -o on


  -T            -o off                  --offlineauto=off                  -T 0                         -o off


  -f            -S on                   --saveauto=on                      -s 1                         -S on


  -F            -S off                  --saveauto=off                     -s 0                         -S off


  -c            -H                      --health                           -c                           -H


  -g            -c                      --capabilities


  -v            -A                      --attributes                       -p, -u, -f, -t               -p, -u, -t


  -l            -l error                --log=error                        -l                           -l error


  -L            -l selftest             --log=selftest                     -L                           -l selftest


  -a            -a                      --all                              -a                           -a


  -m            -v 9,minutes            --vendorattribute=9,minutes


  -O            -t offline              --test=offline


  -S            -t short                --test=short


  -s            -t short -C             --test=short --captive


  -X            -t long                 --test=long


  -x            -t long -C              --test=long --captive


  -A            -X                      --abort








 NOW A COMMAND-LINE OPTION (-i N, --interval N) =======>                   -C N    Set checktime        CMD LINE: -i N


                                                                           -f      usage attributes     -f


                                                                           -M ADD  Email addresses     -m ADD


                                                                           -m -3   Email mode          -M diminishing -M test


                                                                           -m -2   Email mode          -M daily -M test


                                                                           -m -1   Email mode          -M once -M test


                            If no -M is given, this is the DEFAULT =====>  -m 0    Email mode          -M once


                                                                           -m 1    Email mode          -M once


                                                                           -m 2    Email mode          -M daily


                                                                           -m 3    Email mode          -M diminishing


                            New feature (see man page) =====>                                          -M exec SCRIPT


                                                                           -i N    Ignore              -i N


                                                                           -I N    Ignore              -I N


                                                                            #      Comment              #


                                                                            \      Line continuation    \


  -------------------------------------------------------------------------------------------------------------------





Changes to smartd options:





  ----------------------------------------------------------------------------------------------------------


  5.0 short     5.0 long                                     5.1 short     5.1 long


  option        option                                       option        option


  ----------------------------------------------------------------------------------------------------------


  -h, -?        --help                                       -h, -?        --help


  -V            --version, --copyright, --license            -V            --version, --copyright, --license


  -X            --debug                                      -d            --debug


                                                             -i N          --interval=N


                                                             -D            --showdirectives


                                                             -r            --report=TYPE


  ----------------------------------------------------------------------------------------------------------





		    GNU GENERAL PUBLIC LICENSE


		       Version 2, June 1991





 Copyright (C) 1989, 1991 Free Software Foundation, Inc.


                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA


 Everyone is permitted to copy and distribute verbatim copies


 of this license document, but changing it is not allowed.





			    Preamble





  The licenses for most software are designed to take away your


freedom to share and change it.  By contrast, the GNU General Public


License is intended to guarantee your freedom to share and change free


software--to make sure the software is free for all its users.  This


General Public License applies to most of the Free Software


Foundation's software and to any other program whose authors commit to


using it.  (Some other Free Software Foundation software is covered by


the GNU Library General Public License instead.)  You can apply it to


your programs, too.





  When we speak of free software, we are referring to freedom, not


price.  Our General Public Licenses are designed to make sure that you


have the freedom to distribute copies of free software (and charge for


this service if you wish), that you receive source code or can get it


if you want it, that you can change the software or use pieces of it


in new free programs; and that you know you can do these things.





  To protect your rights, we need to make restrictions that forbid


anyone to deny you these rights or to ask you to surrender the rights.


These restrictions translate to certain responsibilities for you if you


distribute copies of the software, or if you modify it.





  For example, if you distribute copies of such a program, whether


gratis or for a fee, you must give the recipients all the rights that


you have.  You must make sure that they, too, receive or can get the


source code.  And you must show them these terms so they know their


rights.





  We protect your rights with two steps: (1) copyright the software, and


(2) offer you this license which gives you legal permission to copy,


distribute and/or modify the software.





  Also, for each author's protection and ours, we want to make certain


that everyone understands that there is no warranty for this free


software.  If the software is modified by someone else and passed on, we


want its recipients to know that what they have is not the original, so


that any problems introduced by others will not reflect on the original


authors' reputations.





  Finally, any free program is threatened constantly by software


patents.  We wish to avoid the danger that redistributors of a free


program will individually obtain patent licenses, in effect making the


program proprietary.  To prevent this, we have made it clear that any


patent must be licensed for everyone's free use or not licensed at all.





  The precise terms and conditions for copying, distribution and


modification follow.





		    GNU GENERAL PUBLIC LICENSE


   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION





  0. This License applies to any program or other work which contains


a notice placed by the copyright holder saying it may be distributed


under the terms of this General Public License.  The "Program", below,


refers to any such program or work, and a "work based on the Program"


means either the Program or any derivative work under copyright law:


that is to say, a work containing the Program or a portion of it,


either verbatim or with modifications and/or translated into another


language.  (Hereinafter, translation is included without limitation in


the term "modification".)  Each licensee is addressed as "you".





Activities other than copying, distribution and modification are not


covered by this License; they are outside its scope.  The act of


running the Program is not restricted, and the output from the Program


is covered only if its contents constitute a work based on the


Program (independent of having been made by running the Program).


Whether that is true depends on what the Program does.





  1. You may copy and distribute verbatim copies of the Program's


source code as you receive it, in any medium, provided that you


conspicuously and appropriately publish on each copy an appropriate


copyright notice and disclaimer of warranty; keep intact all the


notices that refer to this License and to the absence of any warranty;


and give any other recipients of the Program a copy of this License


along with the Program.





You may charge a fee for the physical act of transferring a copy, and


you may at your option offer warranty protection in exchange for a fee.





  2. You may modify your copy or copies of the Program or any portion


of it, thus forming a work based on the Program, and copy and


distribute such modifications or work under the terms of Section 1


above, provided that you also meet all of these conditions:





    a) You must cause the modified files to carry prominent notices


    stating that you changed the files and the date of any change.





    b) You must cause any work that you distribute or publish, that in


    whole or in part contains or is derived from the Program or any


    part thereof, to be licensed as a whole at no charge to all third


    parties under the terms of this License.





    c) If the modified program normally reads commands interactively


    when run, you must cause it, when started running for such


    interactive use in the most ordinary way, to print or display an


    announcement including an appropriate copyright notice and a


    notice that there is no warranty (or else, saying that you provide


    a warranty) and that users may redistribute the program under


    these conditions, and telling the user how to view a copy of this


    License.  (Exception: if the Program itself is interactive but


    does not normally print such an announcement, your work based on


    the Program is not required to print an announcement.)





These requirements apply to the modified work as a whole.  If


identifiable sections of that work are not derived from the Program,


and can be reasonably considered independent and separate works in


themselves, then this License, and its terms, do not apply to those


sections when you distribute them as separate works.  But when you


distribute the same sections as part of a whole which is a work based


on the Program, the distribution of the whole must be on the terms of


this License, whose permissions for other licensees extend to the


entire whole, and thus to each and every part regardless of who wrote it.





Thus, it is not the intent of this section to claim rights or contest


your rights to work written entirely by you; rather, the intent is to


exercise the right to control the distribution of derivative or


collective works based on the Program.





In addition, mere aggregation of another work not based on the Program


with the Program (or with a work based on the Program) on a volume of


a storage or distribution medium does not bring the other work under


the scope of this License.





  3. You may copy and distribute the Program (or a work based on it,


under Section 2) in object code or executable form under the terms of


Sections 1 and 2 above provided that you also do one of the following:





    a) Accompany it with the complete corresponding machine-readable


    source code, which must be distributed under the terms of Sections


    1 and 2 above on a medium customarily used for software interchange; or,





    b) Accompany it with a written offer, valid for at least three


    years, to give any third party, for a charge no more than your


    cost of physically performing source distribution, a complete


    machine-readable copy of the corresponding source code, to be


    distributed under the terms of Sections 1 and 2 above on a medium


    customarily used for software interchange; or,





    c) Accompany it with the information you received as to the offer


    to distribute corresponding source code.  (This alternative is


    allowed only for noncommercial distribution and only if you


    received the program in object code or executable form with such


    an offer, in accord with Subsection b above.)





The source code for a work means the preferred form of the work for


making modifications to it.  For an executable work, complete source


code means all the source code for all modules it contains, plus any


associated interface definition files, plus the scripts used to


control compilation and installation of the executable.  However, as a


special exception, the source code distributed need not include


anything that is normally distributed (in either source or binary


form) with the major components (compiler, kernel, and so on) of the


operating system on which the executable runs, unless that component


itself accompanies the executable.





If distribution of executable or object code is made by offering


access to copy from a designated place, then offering equivalent


access to copy the source code from the same place counts as


distribution of the source code, even though third parties are not


compelled to copy the source along with the object code.





  4. You may not copy, modify, sublicense, or distribute the Program


except as expressly provided under this License.  Any attempt


otherwise to copy, modify, sublicense or distribute the Program is


void, and will automatically terminate your rights under this License.


However, parties who have received copies, or rights, from you under


this License will not have their licenses terminated so long as such


parties remain in full compliance.





  5. You are not required to accept this License, since you have not


signed it.  However, nothing else grants you permission to modify or


distribute the Program or its derivative works.  These actions are


prohibited by law if you do not accept this License.  Therefore, by


modifying or distributing the Program (or any work based on the


Program), you indicate your acceptance of this License to do so, and


all its terms and conditions for copying, distributing or modifying


the Program or works based on it.





  6. Each time you redistribute the Program (or any work based on the


Program), the recipient automatically receives a license from the


original licensor to copy, distribute or modify the Program subject to


these terms and conditions.  You may not impose any further


restrictions on the recipients' exercise of the rights granted herein.


You are not responsible for enforcing compliance by third parties to


this License.





  7. If, as a consequence of a court judgment or allegation of patent


infringement or for any other reason (not limited to patent issues),


conditions are imposed on you (whether by court order, agreement or


otherwise) that contradict the conditions of this License, they do not


excuse you from the conditions of this License.  If you cannot


distribute so as to satisfy simultaneously your obligations under this


License and any other pertinent obligations, then as a consequence you


may not distribute the Program at all.  For example, if a patent


license would not permit royalty-free redistribution of the Program by


all those who receive copies directly or indirectly through you, then


the only way you could satisfy both it and this License would be to


refrain entirely from distribution of the Program.





If any portion of this section is held invalid or unenforceable under


any particular circumstance, the balance of the section is intended to


apply and the section as a whole is intended to apply in other


circumstances.





It is not the purpose of this section to induce you to infringe any


patents or other property right claims or to contest validity of any


such claims; this section has the sole purpose of protecting the


integrity of the free software distribution system, which is


implemented by public license practices.  Many people have made


generous contributions to the wide range of software distributed


through that system in reliance on consistent application of that


system; it is up to the author/donor to decide if he or she is willing


to distribute software through any other system and a licensee cannot


impose that choice.





This section is intended to make thoroughly clear what is believed to


be a consequence of the rest of this License.





  8. If the distribution and/or use of the Program is restricted in


certain countries either by patents or by copyrighted interfaces, the


original copyright holder who places the Program under this License


may add an explicit geographical distribution limitation excluding


those countries, so that distribution is permitted only in or among


countries not thus excluded.  In such case, this License incorporates


the limitation as if written in the body of this License.





  9. The Free Software Foundation may publish revised and/or new versions


of the General Public License from time to time.  Such new versions will


be similar in spirit to the present version, but may differ in detail to


address new problems or concerns.





Each version is given a distinguishing version number.  If the Program


specifies a version number of this License which applies to it and "any


later version", you have the option of following the terms and conditions


either of that version or of any later version published by the Free


Software Foundation.  If the Program does not specify a version number of


this License, you may choose any version ever published by the Free Software


Foundation.





  10. If you wish to incorporate parts of the Program into other free


programs whose distribution conditions are different, write to the author


to ask for permission.  For software which is copyrighted by the Free


Software Foundation, write to the Free Software Foundation; we sometimes


make exceptions for this.  Our decision will be guided by the two goals


of preserving the free status of all derivatives of our free software and


of promoting the sharing and reuse of software generally.





			    NO WARRANTY





  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY


FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN


OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES


PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED


OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF


MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS


TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE


PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,


REPAIR OR CORRECTION.





  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING


WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR


REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,


INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING


OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED


TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY


YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER


PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE


POSSIBILITY OF SUCH DAMAGES.





		     END OF TERMS AND CONDITIONS





	    How to Apply These Terms to Your New Programs





  If you develop a new program, and you want it to be of the greatest


possible use to the public, the best way to achieve this is to make it


free software which everyone can redistribute and change under these terms.





  To do so, attach the following notices to the program.  It is safest


to attach them to the start of each source file to most effectively


convey the exclusion of warranty; and each file should have at least


the "copyright" line and a pointer to where the full notice is found.





    <one line to give the program's name and a brief idea of what it does.>


    Copyright (C) 19yy  <name of author>





    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 Software Foundation; either version 2 of the License, or


    (at your option) any later version.





    This program is distributed in the hope that it will be useful,


    but WITHOUT ANY WARRANTY; without even the implied warranty of


    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the


    GNU General Public License for more details.





    You should have received a copy of the GNU General Public License


    along with this program; if not, write to the Free Software


    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA








Also add information on how to contact you by electronic and paper mail.





If the program is interactive, make it output a short notice like this


when it starts in an interactive mode:





    Gnomovision version 69, Copyright (C) 19yy name of author


    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.


    This is free software, and you are welcome to redistribute it


    under certain conditions; type `show c' for details.





The hypothetical commands `show w' and `show c' should show the appropriate


parts of the General Public License.  Of course, the commands you use may


be called something other than `show w' and `show c'; they could even be


mouse-clicks or menu items--whatever suits your program.





You should also get your employer (if you work as a programmer) or your


school, if any, to sign a "copyright disclaimer" for the program, if


necessary.  Here is a sample; alter the names:





  Yoyodyne, Inc., hereby disclaims all copyright interest in the program


  `Gnomovision' (which makes passes at compilers) written by James Hacker.





  <signature of Ty Coon>, 1 April 1989


  Ty Coon, President of Vice





This General Public License does not permit incorporating your program into


proprietary programs.  If your program is a subroutine library, you may


consider it more useful to permit linking proprietary applications with the


library.  If this is what you want to do, use the GNU Library General


Public License instead of this License.


CHANGELOG for smartmontools



$Id: CHANGELOG,v 1.1 2006/04/03 20:19:54 brett Exp $



Copyright (C) 2002-3 Bruce Allen <smartmontools-support@lists.sourceforge.net>



Home page of code is: http://smartmontools.sourceforge.net



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

Software Foundation; either version 2, or (at your option) any later

version.



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.



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/



Maintainers/Developers Key:

[BA] Bruce Allen            <smartmontools-support@lists.sourceforge.net>

[EB] Erik Inge Bols        <knan@mo.himolde.no>

[SB] Stanislav Brabec       <sbrabec@suse.cz>

[PC] Peter Cassidy          <pcassidy@mac.com>

[FM] Frederic L. W. Meunier <0@pervalidus.net>

[PW] Phil Williams          <phil@subbacultcha.demon.co.uk>

[DG] Douglas Gilbert        <dougg@torque.net>

[GG] Guido Guenther         <agx@sigxcpu.org>

[KM] Kai Mkisara           <kai.makisara@kolumbus.fi>

[GF] Guilhem Frzou         <guilhem.frezou@catii.fr>



NOTES FOR FUTURE RELEASES: see TODO file.



CURRENT DEVELOPMENT VERSION (see VERSION file in this directory):

 

  <ADDITIONS TO THE CHANGE LOG SHOULD BE ADDED HERE, PLEASE>



smartmontools-5.1-14



  [BA] smartctl: added column to -A output to show if Attributes are

       updated only during off-line testing or also during normal

       operation.



smartmontools-5.1-13



  [BA] smartd: attempt to enable/disable automatic offline testing even

       if the disk appears not to support it.  Now the same logic

       as smartctl.



  [BA] Added definition of Attribute 201, soft read error rate.



  [BA] Added IBM/Hitachi IC35L120AVV207-1 (GXP-180) and corresponding

       8MB Cache GXP-120 to drive database.



  [BA] smartd: if DEVICESCAN Directive used in smartd.conf, and

       -I, -R or -r Directives used in conjunction with this, got

       segv errors.  Fixed by correcting memory allocation calls.



  [BA] smartd: enable automatic offline testing was broken due

       to cut-and-paste error that disabled it instead of

       enabling it.  Thanks to Maciej W. Rozycki for pointing

       out the problem and solution.



  [BA] Fixed "spelling" of some Attribute names to replace spaces

       in names by underscores. (Fixed field width easier for awk

       style parsing.)



  [BA,GF] Added mods submitted by [GF] to support Attribute 193 being

       load/unload cycles. Add -v 193,loadunload option, useful for

       Hitachi drive DK23EA-30, and add this drive to knowndrive.c

       Add meaning of attribute 250 : Read error retry rate



smartmontools-5.1-12



  [BA] Added another entry for Samsung drives to knowndrive table.



  [DG] Refine SCSI log sense command to do a double fetch in most cases

       (but not for the TapeAlert log page). Fix TapeAlert and Self Test

       log pgae response truncation.



  [PW] Added 'removable' argument to -d Directive for smartd.  This indicates

       that smartd should continue (rather than exit) if the device does not 

       appear to be present.



  [BA] Modified smartmontools.spec [Man pages location] and

       smartd.initd [Extra space kills chkconfig!] for Redhat 6.x

       compatibility (thanks to Gerald Schnabel).



smartmontools-5.1-11



  [EB] Add another Fujitsu disk to knowndrives.c



  [GG] match for scsi/ and ide/ in case of devfs to exclude false postives



  [BA] If SCSI device listed in /etc/smartd.conf fails to open or do

       SMART stuff correctly, or not enough space

       to list all SCSI devices, fail with error unless

       -DSCSIDEVELOPMENT set during compile-time.



  [BA] Added automatic recognition of /dev/i* (example: /dev/ide/...)

       as an ATA device.



  [DG] Add "Device type: [disk | tape | medium changer | ...] line to

       smartctl -i output for SCSI devices.



  [PW] Fixed bug in smartd where test email would be sent regularly (for

       example, daily if the user had specified -M daily) instead of just

       once on startup.



  [KM] More TapeAlert work. Added translations for media changer

       alerts. TapeAlert support reported according to the log page

       presence. ModeSense not attempted for non-ready tapes (all

       drives do not support this after all). Get peripheral type from

       Inquiry even if drive info is not printed. Add QUIETON()

       QUIETOFF() to TapeAlert log check.



  [BA] Stupid bug in atacmds.c minor_str[] affected ataVersionInfo().

       Two missing commas meant that minor_str[] had two few elements,

       leading to output like this:

       Device Model:     Maxtor 6Y120L0

       Serial Number:    Y40BF74E

       Firmware Version: YAR41VW0

       Device is:        Not in smartctl database [for details use: -P showall]

       ATA Version is:   7

       ATA Standard is:  9,minutes

                         ^^^^^^^^^

       Missing commas inserted.



  [BA] Fixed smartd bug.  On device registration, if ATA device did

       not support SMART error or self-test logs but user had asked to

       monitor them, an attempt would be made to read them anyway,

       possibly generating "Drive Seek" errors.  We now check that

       the self-test and error logs are supported before trying to

       access them the first time.



  [GG/BA] Fixed bug where if SMART ATA error log not supported,

       command was tried anyway. Changed some error printing to use

       print handlers.



  [GG] Makefile modifications to ease packaging



  [DG] Did work for TapeAlerts (SCSI). Now can detect /dev/nst0 as a

       SCSI device. Also open SCSI devices O_NONBLOCK so they don't

       hang on open awaiting media. The ATA side should worry about

       this also: during a DEVICESCAN a cd/dvd device without media

       will hang. Added some TapeAlert code suggested by Kai Makisara.



smartmontools-5.1-10



  [PW] Extended the -F option/Directive to potentially fix other firmware

       bugs in addition to the Samsung byte-order bug.  Long option name is

       now --firmwarebug and the option/Directive accepts an argument

       indicating the type of firmware bug to fix.



  [BA] Fixed a bug that prevented the enable automatic off-line

       test feature from enabling.  It also prevented the enable Attribute

       autosave from working.  See CVS entry for additional details.



  [PW] Modified the -r/--report option (smartctl and smartd) to allow the

       user to specify the debug level as a positive integer.



  [BA] Added --log directory option to smartctl.  If the disk

       supports the general-purpose logging feature set (ATA-6/7)

       then this option enables the Log Directory to be printed.

       This Log Directory shows which device logs are available, and

       their lengths in sectors.



  [PW] Added -P/--presets option to smartctl and -P Directive to smartd.



  [GG] Introduce different exit codes indicating the type of problem

       encountered for smartd.



  [DG] Add non-medium error count to '-l error' and extended self test

       duration to '-l selftest'. Get scsi IEs and temperature changes

       working in smartd. Step over various scsi disk problems rather

       than abort smartd startup.



  [DG] Support -l error for SCSI disks (and tapes). Output error counter

       log pages.



  [BA] Added -F/--fixbyteorder option to smartctl.  This allows us to read

       SMART data from some disks that have byte-reversed two- and four-

       byte quantities in their SMART data structures.



  [BA] Fixed serious bug: the -v options in smartd.conf were all put

       together and used together, not drive-by-drive.



  [PW] Added knowndrives.h and knowndrives.c.  The knowndrives array

       supersedes the drivewarnings array.



  [GG] add {-p,--pidfile} option to smartd to write a PID file on

       startup. Update the manpage accordingly.



  [DG] Fix scsi smartd problem detecting SMART support. More cleaning

       and fix (and rename) scsiTestUnitReady(). More scsi renaming.



  [BA] Fixed smartd so that if a disk that is explictily listed is not

       found, then smartd will exit with nonzero status BEFORE forking.

       If a disk can't be registered, this will also be detected before

       forking, so that init scripts can react correctly.



  [BA] Replaced all linux-specific ioctl() calls in atacmds.c with

       a generic handler smartcommandhandler().  Now the only routine

       that needs to be implemented for a given OS is os_specific_handler().

       Also implemented the --report ataioctl. This provides 

       two levels of reporting.  Using the option once gives a summary

       report of device IOCTL transactions.  Using the option twice give

       additional info (a printout of ALL device raw 512 byte SMART

       data structures).  This is useful for debugging.



  [DG] more scsi cleanup. Output scsi device serial number (VPD page

       0x80) if available as part of '-i'. Implement '-t offline' as

       default self test (only self test older disks support).



  [BA] Changed crit to info in loglevel of smartd complaint to syslog

       if DEVICESCAN enabled and device not found.



  [BA] Added -v 194,10xCelsius option/Directive. Raw Attribute number

       194 is ten times the disk temperature in Celsius.



  [DG] scsicmds.[hc] + scsiprint.c: clean up indentation, remove tabs.

       Introduce new intermediate interface based on "struct scsi_cmnd_io"

       to isolate SCSI generic commands + responses from Linux details;

       should help port to FreeBSD of SCSI part of smartmontools.

       Make SCSI command builders more parametric.



smartmontools-5.1-9

  

  [BA] smartctl: if HDIO_DRIVE_TASK ioctl() is not implemented (no

       kernel support, then try to assess drive health by examining

       Attribute values/thresholds directly.



  [BA] smartd/smartctl: added -v 200,writeerrorcount option/Directive

       for Fujitsu disks.



  [BA] smartd: Now send email if any of the SMART commands fails,

       or if open()ing the device fails.  This is often noted

       as a common disk failure mode.



  [BA] smartd/smartctl: Added -v N,raw8 -v N,raw16 and -v N,raw48

       Directives/Options for printing Raw Attributes in different

       Formats.



  [BA] smartd: Added -r ID and -R ID for reporting/tracking Raw

       values of Attributes.



  [BA] smartd/smartctl: Changed printing of spin-up-time attribute

       raw value to reflect current/average as per IBM standard.



  [BA] smartd/smartctl: Added -v 9,seconds option for disks which

       use Attribute 9 for power-on lifetime in seconds.



  [BA] smartctl: Added a warning message so that users of some IBM

       disks are warned to update their firmware.  Note: we may want

       to add a command-line flag to disable the warning messages.

       I have done this in a general way, using regexp, so that we

       can add warnings about any type of disk that we wish...



smartmontools-5.1-7



  [BA] smartd: Created a subdirectory examplescripts/ of source

       directory that contains executable scripts for the -M exec PATH

       Directive of smartd.



smartmontools-5.1-5



  [BA] smartd: DEVICESCAN in /etc/smartd.conf

       can now be followed by all the same Directives as a regular

       device name like /dev/hda takes.  This allows one to use

       (for example):

       DEVICESCAN -m root@yoyodyne.com

       in the /etc/smartd.conf file.



  [BA] smartd: Added -c (--checkonce) command-line option. This checks

       all devices once, then exits.  The exit status can be

       used to learn if devices were detected, and if smartd is

       functioning correctly. This is primarily for Distribution

       scripters.



  [BA] smartd: Implemented -M exec Directive for

       smartd.conf.  This makes it possible to run an

       arbitrary script or mailing program with the

       -m option.



  [PW] smartd: Modified -M Directive so that it can be given

       multiple times.  Added -M exec Directive.



smartmontools-5.1-4



  [BA] Fixed bug in smartctl pointed out by Pierre Gentile.

       -d scsi didn't work because tryata and tryscsi were

       reversed -- now works on /devfs SCSI devices.



  [BA] Fixed bug in smartctl pointed out by Gregory Goddard

       <ggoddard@ufl.edu>.  Manual says that bit 6 of return

       value turned on if errors found in smart error log.  But

       this wasn't implemented.



smartmontools-5.1-3



  [BA] Modified printing format for 9,minutes to read

       Xh+Ym not X h + Y m, so that fields are fixed width.



  [BA] Added Attribute 240 "head flying hours"



smartmontools-5.1.1



  [BA] As requested, local time/date now printed by smartctl -i



  [PW] Added "help" argument to -v for smartctl



  [PW] Added -D, --showdirectives option to smartd



  [DG] add '-l selftest' capability for SCSI devices (update smartctl.8)



  [BA] smartd,smartctl: added additional Attribute modification option

       -v 220,temp and -v 9,temp.



  [PW] Renamed smartd option -X to -d



START OF SMARTMONTOOLS 5.1 series



smartmontools-5.0.50



  [PW] Changed smartd.conf Directives -- see man page



  [BA/DG] Fixed uncommented comment in smartd.conf



  [DG] Correct 'Recommended start stop count' for SCSI devices



  [PW] Replaced smartd.conf directive -C with smartd option -i



  [PW] Changed options for smartctl -- see man page.



  [BA] Use strerror() to generate system call error messages.



  [BA] smartd: fflush() all open streams before fork().



  [BA] smartctl, smartd simplified internal handling of checksums

  for simpler porting and less code.



smartmontools-5.0.49



  [PW] smartd --debugmode changed to --debug



  [BA] smartd/smartctl added attribute 230 Head Amplitude from

  IBM DPTA-353750.



  [PW] Added list of proposed new options for smartctl to README.



  [PW] smartd: ParseOpts() now uses getopt_long() if HAVE_GETOPT_LONG is

  defined and uses getopt() otherwise.  This is controlled by CPPFLAGS in

  the Makefile.



  [BA] smartd: Fixed a couple of error messages done with perror()

  to redirect them as needed.



smartmontools-5.0.48



  [BA] smartctl: The -O option to enable an Immediate off-line test

  did not print out the correct time that the test would take to

  complete.  This is because the test timer is volatile and not

  fixed.  This has been fixed, and the smartctl.8 man page has been

  updated to explain how to track the Immediate offline test as it

  progresses, and to further emphasize the differences between the

  off-line immediate test and the self-tests.



  [BA] smartd/smartctl: Added new attribute (200) Multi_Zone_Error_Rate



  [BA] smartctl: modified so that arguments could have either a single -

  as in -ea or multiple ones as in -e -a.  Improved warning message for

  device not opened, and fixed error in redirection of error output of

  HD identity command.



  [PW] smartd: added support for long options.  All short options are still

  supported; see manpage for available long options.



  [BA] smartctl.  When raw Attribute value was 2^31 or larger, did

  not print correctly.



smartmontools-5.0.46



  [BA] smartd: added smartd.conf Directives -T and -s.  The -T Directive

  enables/disables Automatic Offline Testing.  The -s Directive

  enables/disables Attribute Autosave. Documentation and

  example configuration file updated to agree.



  [BA] smartd: user can make smartd check the disks at any time

  (ie, interrupt sleep) by sending signal SIGUSR1 to smartd.  This

  can be done for example with:

  kill -USR1 <pid>

  where <pid> is the process ID number of smartd.



  [EB] scsi: don't trust the data we receive from the drive too

  much. It very well might have errors (like zero response length).

  Seen on Megaraid logical drive, and verified in the driver source.



  [BA] smartd: added Directive -m for sending test email and

  for modifying email reminder behavior.  Updated manual, and sample

  configuration file to illustrate & explain this.



  [BA] smartd: increased size of a continued smartd.conf line to

  1023 characters.



  [BA] Simplified Directive parsers and improved warning/error

  messages.



smartmontools-5.0.45



  [EB] Fixed bug in smartd where testunitready logic inverted

  prevented functioning on scsi devices.

  The bug in question only affects smartd users with scsi devices.

  To see if your version of smartd has the testunitready() bug, do

     smartd -V

  If the version of the module smartd.c in a line like:

     Module: smartd.c      revision: 1.66   date: 2002/11/17

  has a revision greater than or equal to 1.30, and less than or equal to

  1.64, then your version of the code has this problem.

  This problem affected releases starting with RELEASE_5_0_16 up to and

  including RELEASE_5_0_43.



  [BA] Added testunitnotready to smartctl for symmetry with smartd.



  [SB] added Czech descriptions to .spec file

  [SB]  corrected comment in smartd.conf example



  [BA] Changed way that entries in the ATA error log are printed,

  to make it clearer which is the most recent error and

  which is the oldest one.



  NOTE: All changes made prior to this point were done by Bruce Allen

  [BA] although several of them had been suggested by earlier postings

  by Stanislav Brabec [SB].



smartmontools-5.0.43



  Changed Temperature_Centigrade to Temperature_Celsius.

  The term "Centigrade" ceased to exist in 1948.  (c.f

  http://www.bartleby.com/64/C004/016.html).



smartmontools-5.0.42



  Modified SCSI device check to also send warning emails if

  requested in directives file.



  Added a new smartd configuration file Directive: -M ADDRESS.

  This sends a single warning email to ADDRESS for failures or

  errors detected with the -c, -L, -l, or -f Directives.



smartmontools-5.0.38



  Modified perror() statements in atacmds.c so that printout for SMART

  commands errors is properly suppressed or queued depending upon users

  choices for error reporting modes.



  Added Italian descriptions to smartmontools.spec file.



  Started impementing send-mail-on-error for smartd; not yet enabled.



  Added -P (Permissive) Directive to smartd.conf file to allow SMART

  monitoring of pre-ATA-3 Rev 4 disks that have SMART but do not have

  a SMART capability bit.

 

  Removed charset encodings from smartmontools.spec file for non-English

  fields.



smartmontools-5.0.32



  Added manual page smartd.conf.5 for configuration file.



  smartctl: Missing ANSI prototype in failuretest(); fixed.



  smartctl: Checksum warnings now printed on stdout, or are silent,

  depending upon -q and -Q settings.



smartmontools-5.0.31



  Changed Makefile so that the -V option does not reflect file state

  before commit!



  smartctl: added new options -W, -U, and -P to control if and how the

  smartctl exits if an error is detected in either a SMART data

  structure checksum, or a SMART command returns an error.



  modified manual page to break options into slightly more logical

  categories.



  reformatted 'usage' message order to agree with man page ordering



  modified .spec file so that locale information now contains

  character set definition.   Changed pt_BR to pt since we do not use any

  aspect other than language.  See man setlocale.



smartmontools-5.0.30

  smartctl: added new options -n and -N to force device to be ATA or SCSI

  smartctl: no longer dies silently if device path does not start/dev/X

  smartctl: now handles arbitrary device paths



smartmontools-5.0.29

  Modified .spec file and Makefile to make them more compliant with

  the "right" way of doing things.



smartmontools-5.0.26

  Fixed typesetting error in man page smartd.8



  Removed redundant variable (harmless) from smartd.c



smartmontools-5.0.25



  Added a new directive for the configuration file.  If the word

  DEVICESCAN appears before any non-commented material in the

  configuration file, then the confi file will be ignored and the

  devices wil be scanned.



smartmontools-5.0.24



    Note: it has now been confirmed that the code modifications between

    5.0.23 and 5.0.24 have eliminated the GCC 3.2 problems.  Note that

    there is a GCC bug howerver, see #848 at

    http://gcc.gnu.org/cgi-bin/gnatsweb.pl?database=gcc&cmd=query



      Added new Directive for Configuration file:

-C <N> This sets the time in between disk checks to be <N>

      seconds apart.  Note that  although  you  can  give

       this Directive multiple times on different lines of

       the configuration file, only the final  value  that

       is  given  has  an  effect,  and applies to all the

       disks.  The default value of <N> is 1800  sec,  and

       the minimum allowed value is ten seconds.



    Problem wasn't the print format. F.L.W. Meunier <0@pervalidus.net>

    sent me a gcc 3.2 build and I ran it under a debugger.  The

    problem seems to be with passing the very large (2x512+4) byte

    data structures as arguments.  I never liked this anyway; it was

    inherited from smartsuite.  So I've changed all the heavyweight

    functions (ATA ones, anyone) to just passing pointers, not hideous

    kB size structures on the stack.  Hopefully this will now build OK

    under gcc 3.2 with any sensible compilation options.



smartmontools-5.0.23



    Because of reported problems with GCC 3.2 compile, I have gone

    thorough the code and explicitly changed all print format

    parameters to correspond EXACTLY to int unless they have to be

    promoted to long longs.  To quote from the glibc bible: [From

    GLIBC Manual: Since the prototype doesn't specify types for

    optional arguments, in a call to a variadic function the default

    argument promotions are performed on the optional argument

    values. This means the objects of type char or short int (whether

    signed or not) are promoted to either int or unsigned int, as

    appropriate.]



smartmontools-5.0.22



    smartd, smartctl now warn if they find an attribute whose ID

    number does not match between Data and Threshold structures.



    Fixed nasty bug which led to wrong number of arguments for a

    varargs statement, with attendent stack corruption.  Sheesh!

    Have added script to CVS attic to help find such nasties in the

    future.



smartmontools-5.0.21



    Eliminated some global variables out of header files and other

    minor cleanup of smartd.



smartmontools-5.0.20



    Did some revision of the man page for smartd and made the usage

    messages for Directives 100% consistent.



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

    if it completed, and the LBA was not 0 or 0xff...f However

    according to the specs this is not correct.  According to the

    specs, if the self-test completed without error then LBA is

    undefined.  This version fixes that.  LBA value only printed if

    self-test encountered an error.



smartmontools-5.0-17



    smartd has changed significantly. This is the first CVS checkin of

    code that extends the options available for smartd.  The following

    options can be placed into the /etc/smartd.conf file, and control the

    behavior of smartd.

    Configuration file Directives (following device name):

    -A     Device is an ATA device

    -S     Device is a SCSI device

    -c     Monitor SMART Health Status

    -l     Monitor SMART Error Log for changes

    -L     Monitor SMART Self-Test Log for new errors

    -f     Monitor for failure of any 'Usage' Attributes

    -p     Report changes in 'Prefailure' Attributes

    -u     Report changes in 'Usage' Attributes

    -t     Equivalent to -p and -u Directives

    -a     Equivalent to -c -l -L -f -t Directives

    -i ID  Ignore Attribute ID for -f Directive

    -I ID  Ignore Attribute ID for -p, -u or -t Directive

    #      Comment: text after a hash sign is ignored

    \      Line continuation character



    cleaned up functions used for printing CVS IDs.  Now use string

    library, as it should be.



    modified length of device name string in smartd internal structure

    to accomodate max length device name strings



    removed un-implemented (-e = Email notification) option from

    command line arg list.  We'll put it back on when implemeneted.



    smartd now logs serious (fatal) conditions in its operation at

    loglevel LOG_CRIT rather than LOG_INFO before exiting with error.



    smartd used to open a file descriptor for each SMART enabled

    device, and then keep it open the entire time smartd was running.

    This meant that some commands, like IOREADBLKPART did not work,

    since the fd to the device was open.  smartd now opens the device

    when it needs to read values, then closes it.  Also, if one time

    around it can't open the device, it simply prints a warning

    message but does not give up.  Have eliminated the .fd field from

    data structures -- no longer gets used.



    smartd now opens SCSI devices as well using O_RDONLY rather than

    O_RDWR.  If someone can no longer monitor a SCSI device that used

    to be readable, this may well be the reason why.



    smartd never checked if the number of ata or scsi devices detected

    was greater than the max number it could monitor.  Now it does.



smartmontools-5.0-16



    smartd on startup now looks in the configuration file /etc/smartd.conf for

    a list of devices which to include in its monitoring list.  See man page

    (man smartd) for syntax.



    smartd: close file descriptors of SCSI device if not SMART capable

    Closes ALL file descriptors after forking to daemon.



    added new temperature attribute (231, temperature)



    smartd: now open ATA disks using O_RDONLY



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

    appears incapable of a SMART command that the user has asked for,

    complain by printing an error message, but go ahead and try

    anyway.  Since unimplemented SMART commands should just return an

    error but not cause disk problems, this should't cause any

    difficulty.



    Added two new flags: q and Q.  q is quiet mode - only print: For

    the -l option, errors recorded in the SMART error log; For the -L

    option, errors recorded in the device self-test log; For the -c

    SMART "disk failing" status or device attributes (pre-failure or

    usage) which failed either now or in the past; For the -v option

    device attributes (pre-failure or usage) which failed either now

    or in the past.  Q is Very Quiet mode: Print no ouput.  The only

    way to learn about what was found is to use the exit status of

    smartctl.



    smartctl now returns sensible values (bitmask).  See smartctl.h

    for the values, and the man page for documentation.



    The SMART status check now uses the correct ATA call.  If failure

    is detected we search through attributes to list the failed ones.

    If the SMART status check shows GOOD, we then look to see if their

    are any usage attributes or prefail attributes have failed at any

    time.  If so we print them.



    Modified function that prints vendor attributes to say if the

    attribute has currently failed or has ever failed.



    -p option now prints out license info and CVS strings for all

    modules in the code, nicely formatted.



    Previous versions of this code (and Smartsuite) only generate

    SMART failure errors if the value of an attribute is below the

    threshold and the prefailure bit is set.  However the ATA Spec

    (ATA4 <=Rev 4) says that it is a SMART failure if the value of an

    attribute is LESS THAN OR EQUAL to the threshold and the

    prefailure bit is set.  This is now fixed in both smartctl and

    smartd.  Note that this is a troubled subject -- the original

    SFF 8035i specification defining SMART was inconsistent about

    this.  One section says that Attribute==Threshold is pass,

    and another section says it is fail.  However the ATA specs are

    consistent and say Attribute==Threshold is a fail.



    smartd did not print the correct value of any failing SMART attribute.  It

    printed the index in the attribute table, not the attribute

    ID. This is fixed.



    when starting self-tests in captive mode ioctl returns EIO because

    the drive has been busied out.  Detect this and don't return an eror

    in this case.  Check this this is correct (or how to fix it?)

 

    fixed possible error in how to determine ATA standard support

    for devices with no ATA minor revision number.



    device opened only in read-only not read-write mode.  Don't need R/W 

    access to get smart data. Check this with Andre.



    smartctl now handles all possible choices of "multiple options"

    gracefully.  It goes through the following phases of operation,

    in order: INFORMATION, ENABLE/DISABLE, DISPLAY DATA, RUN/ABORT TESTS.

    Documentation has bee updated to explain the different phases of

    operation.  Control flow through ataPrintMain()

    simplified.



    If reading device identity information fails, try seeing if the info

    can be accessed using a "DEVICE PACKET" command.  This way we can

    at least get device info.



    Modified Makefile to automatically tag CVS archive on issuance of

    a release



    Modified drive detection so minor device ID code showing ATA-3 rev

    0 (no SMART) is known to not be SMART capable.



    Now verify the checksum of the device ID data structure, and of the

    attributes threshold structure.  Before neither of these

    structures had their checksums verified.



    New behavior vis-a-vis checksums.  If they are wrong, we log

    warning messages to stdout, stderr, and syslog, but carry on

    anyway.  All functions now call a checksumwarning routine if the

    checksum doesn't vanish as it should.



    Changed Read Hard Disk Identity function to get fresh info from

    the disk on each call rather than to use the values that were read

    upon boot-up into the BIOS.  This is the biggest change in this

    release.  The ioctl(device, HDIO_GET_IDENTITY, buf ) call should

    be avoided in such code.  Note that if people get garbled strings

    for the model, serial no and firmware versions of their drives,

    then blame goes here (the BIOS does the byte swapping for you,

    apparently!)

    

    Function ataSmartSupport now looks at correct bits in drive

    identity structure to verify first that these bits are valid,

    before using them.

    

    Function ataIsSmartEnabled() written which uses the Drive ID state

    information to tell if SMART is enabled or not.  We'll carry this

    along for the moment without using it.



    Function ataDoesSmartWork() guaranteed to work if the device

    supports SMART.



    Replace some numbers by #define MACROS



    Wrote Function TestTime to return test time associated with each

    different type of test.



    Thinking of the future, have added a new function called

    ataSmartStatus2().  Eventually when I understand how to use the

    TASKFILE API and am sure that this works correctly, it will

    replace ataSmartStatus().  This queries the drive directly to

    see if the SMART status is OK, rather than comparing thresholds to

    attribute values ourselves. But I need to get some drives that fail

    their SMART status to check it.





smartmontools-5.0-10

    Removed extraneous space before printing in some error messages

    Fixed additional typos in documentation

    Fixed some character buffers that were too short for their contents.



smartmontools-5.0-9



    Put project home path into all source files near the top

    Corrected typos in the documentation

    Modified Makefile so that Mandrake Cooker won't increment version number

    (unless they happen to be working on my machine, which I doubt!)



smartmontools-5.0-8:



    For IBM disks whose raw temp data includes three temps. print all

    three



    print timestamps for error log to msec precision



    added -m option for Hitachi disks that store power on life in

    minutes



    added -L option for printing self-test error logs



    in -l option, now print power on lifetime, so that one can see

    when the error took place



    updated SMART structure definitions to ATA-5 spec



    added -p option



    added -f and -F options to enable/disable autosave threshold

    parameters



    changed argv parsing to use getops -- elminate buffer overflow

    vulnerability



    expanded and corrected documentation



    fixed problem with smartd.  It did not actually call

    ataSmartEnable()!  Since the argument was left out, the test

    always suceeded because it evaluated to a pointer to the function.



    smartd: closed open file descriptors if device does not support

    smart. Note: this still needs to be fixed for SCSI devices





smartmontools-5.0-0  STARTED with smartsuite-2.1-2

