diff --git a/sm5/CHANGELOG b/sm5/CHANGELOG index bc61824e3af6d22d34d93238f7532af5aa545f13..8cdd03694097125624fa8f7cbb4b1327bb6135e5 100644 --- a/sm5/CHANGELOG +++ b/sm5/CHANGELOG @@ -1,6 +1,6 @@ CHANGELOG for smartmontools -$Id: CHANGELOG,v 1.399 2004/04/16 13:23:47 ballen4705 Exp $ +$Id: CHANGELOG,v 1.400 2004/04/17 11:57:43 ballen4705 Exp $ The most recent version of this file is: http://cvs.sourceforge.net/viewcvs.py/smartmontools/sm5/CHANGELOG?sortby=date&view=markup @@ -27,6 +27,9 @@ NOTES FOR FUTURE RELEASES: see TODO file. <ADDITIONS TO THE CHANGE LOG SHOULD BE ADDED JUST BELOW HERE, PLEASE> + [BA] smartctl: printing of the selective self-test log is now + controlled by a new option: -l selective + [BA] Added entries for Samsung firmware versions -25 to -39 based on latest info about firmware bug fixes. diff --git a/sm5/ataprint.c b/sm5/ataprint.c index d5b395627b7d22db12bcbb787a1c331721a9e668..d4dfade27cc1c071f2ec0c430740e0015ac233b7 100644 --- a/sm5/ataprint.c +++ b/sm5/ataprint.c @@ -35,7 +35,7 @@ #include "knowndrives.h" #include "config.h" -const char *ataprint_c_cvsid="$Id: ataprint.c,v 1.150 2004/04/10 00:24:14 ballen4705 Exp $" +const char *ataprint_c_cvsid="$Id: ataprint.c,v 1.151 2004/04/17 11:57:43 ballen4705 Exp $" ATACMDNAMES_H_CVSID ATACMDS_H_CVSID ATAPRINT_H_CVSID CONFIG_H_CVSID EXTERN_H_CVSID INT64_H_CVSID KNOWNDRIVES_H_CVSID SMARTCTL_H_CVSID UTILITY_H_CVSID; // for passing global control variables @@ -1663,16 +1663,26 @@ int ataPrintMain (int fd){ PRINT_OFF(con); pout("\n"); } - if (isSupportSelectiveSelfTest(&smartval)){ - struct ata_selective_self_test_log log; + } + + // Print SMART selective self-test log + if (con->selectivetestlog){ + struct ata_selective_self_test_log log; + + if (!isSupportSelectiveSelfTest(&smartval)) + pout("Device does not support Selective Self Tests/Logging\n"); + else if(ataReadSelectiveSelfTestLog(fd, &log)) { + pout("Smartctl: SMART Selective Self Test Log Read Failed\n"); + failuretest(OPTIONAL_CMD, returnval|=FAILSMART); + } + else { PRINT_ON(con); - if (!(ataReadSelectiveSelfTestLog(fd, &log))) - ataPrintSelectiveSelfTestLog(&log, &smartval); + ataPrintSelectiveSelfTestLog(&log, &smartval); PRINT_OFF(con); pout("\n"); } } - + // START OF THE TESTING SECTION OF THE CODE. IF NO TESTING, RETURN if (con->testcase==-1) return returnval; diff --git a/sm5/ataprint.cpp b/sm5/ataprint.cpp index 8db0f1cf8ffa80ef264df7414198f6d482dcd30d..a028c5bfda51ee581cb479fe876a6e575a9ec4bd 100644 --- a/sm5/ataprint.cpp +++ b/sm5/ataprint.cpp @@ -35,7 +35,7 @@ #include "knowndrives.h" #include "config.h" -const char *ataprint_c_cvsid="$Id: ataprint.cpp,v 1.150 2004/04/10 00:24:14 ballen4705 Exp $" +const char *ataprint_c_cvsid="$Id: ataprint.cpp,v 1.151 2004/04/17 11:57:43 ballen4705 Exp $" ATACMDNAMES_H_CVSID ATACMDS_H_CVSID ATAPRINT_H_CVSID CONFIG_H_CVSID EXTERN_H_CVSID INT64_H_CVSID KNOWNDRIVES_H_CVSID SMARTCTL_H_CVSID UTILITY_H_CVSID; // for passing global control variables @@ -1663,16 +1663,26 @@ int ataPrintMain (int fd){ PRINT_OFF(con); pout("\n"); } - if (isSupportSelectiveSelfTest(&smartval)){ - struct ata_selective_self_test_log log; + } + + // Print SMART selective self-test log + if (con->selectivetestlog){ + struct ata_selective_self_test_log log; + + if (!isSupportSelectiveSelfTest(&smartval)) + pout("Device does not support Selective Self Tests/Logging\n"); + else if(ataReadSelectiveSelfTestLog(fd, &log)) { + pout("Smartctl: SMART Selective Self Test Log Read Failed\n"); + failuretest(OPTIONAL_CMD, returnval|=FAILSMART); + } + else { PRINT_ON(con); - if (!(ataReadSelectiveSelfTestLog(fd, &log))) - ataPrintSelectiveSelfTestLog(&log, &smartval); + ataPrintSelectiveSelfTestLog(&log, &smartval); PRINT_OFF(con); pout("\n"); } } - + // START OF THE TESTING SECTION OF THE CODE. IF NO TESTING, RETURN if (con->testcase==-1) return returnval; diff --git a/sm5/extern.h b/sm5/extern.h index 1c95cbd5c10a347ee1cd84ac4f3a5529f65b781b..256b8d3e2f94a141cc0b5cdad5e596e2a6032755 100644 --- a/sm5/extern.h +++ b/sm5/extern.h @@ -25,7 +25,7 @@ #ifndef EXTERN_H_ #define EXTERN_H_ -#define EXTERN_H_CVSID "$Id: extern.h,v 1.36 2004/03/25 15:39:25 ballen4705 Exp $\n" +#define EXTERN_H_CVSID "$Id: extern.h,v 1.37 2004/04/17 11:57:43 ballen4705 Exp $\n" // Possible values for fixfirmwarebug. If use has NOT specified -F at // all, then value is 0. @@ -56,6 +56,7 @@ typedef struct smartmonctrl_s { unsigned char generalsmartvalues; unsigned char smartlogdirectory; unsigned char smartselftestlog; + unsigned char selectivetestlog; unsigned char smarterrorlog; unsigned char smartdisable; unsigned char smartenable; diff --git a/sm5/smartctl.8.in b/sm5/smartctl.8.in index 9ea01103955865691a32212c1af5c4ad50c60274..5dac617569b73ea5159cec98bb81742f384b6944 100644 --- a/sm5/smartctl.8.in +++ b/sm5/smartctl.8.in @@ -1,7 +1,7 @@ .ig Copyright (C) 2002-4 Bruce Allen <smartmontools-support@lists.sourceforge.net> - $Id: smartctl.8.in,v 1.45 2004/04/11 17:13:38 chrfranke Exp $ + $Id: smartctl.8.in,v 1.46 2004/04/17 11:57:43 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 @@ -32,18 +32,18 @@ CURRENT_CVS_VERSION released CURRENT_CVS_DATE at CURRENT_CVS_TIME .SH DESCRIPTION -\fBsmartctl\fP controls the Self-Monitoring, Analysis and Reporting -Technology (SMART) system built into many ATA-3 and later ATA, IDE and -SCSI-3 hard drives. The purpose of SMART is to monitor the reliability +\fBsmartctl\fP controls the Self\-Monitoring, Analysis and Reporting +Technology (SMART) system built into many ATA\-3 and later ATA, IDE and +SCSI\-3 hard drives. The purpose of SMART is to monitor the reliability of the hard drive and predict drive failures, and to carry out -different types of drive self-tests. This version of \fBsmartctl\fP -is compatible with ATA/ATAPI-5 and earlier standards (see REFERENCES +different types of drive self\-tests. This version of \fBsmartctl\fP +is compatible with ATA/ATAPI\-5 and earlier standards (see REFERENCES below) \fBsmartctl\fP is a command line utility designed to perform SMART -tasks such as printing the SMART self-test and error logs, enabling +tasks such as printing the SMART self\-test and error logs, enabling and disabling SMART automatic testing, and initiating device -self-tests. Note: if the user issues a SMART command that is +self\-tests. Note: if the user issues a SMART command that is (apparently) not implemented by the device, \fBsmartctl\fP will print a warning message but issue the command anyway (see the \fB\-T, \-\-tolerance\fP option below). This should not cause problems: on @@ -56,32 +56,32 @@ from SCSI tape drives and changers. The user must specify the device to be controlled or interrogated as the final argument to \fBsmartctl\fP. Device paths are as follows: .IP \fBLINUX\fP: 9 -Use the forms \fB"/dev/hd[a-t]"\fP for IDE/ATA -devices, and \fB"/dev/sd[a-z]"\fP for SCSI devices. For +Use the forms \fB"/dev/hd[a\-t]"\fP for IDE/ATA +devices, and \fB"/dev/sd[a\-z]"\fP for SCSI devices. For SCSI Tape Drives and Changers with TapeAlert support use the devices \fB"/dev/nst*"\fP and \fB"/dev/sg*"\fP. More general paths (such as devfs ones) may also be specified. .IP \fBFREEBSD\fP: 9 -Use the forms \fB"/dev/ad[0-9]+"\fP for IDE/ATA -devices and \fB"/dev/da[0-9]+"\fP for SCSI devices. +Use the forms \fB"/dev/ad[0\-9]+"\fP for IDE/ATA +devices and \fB"/dev/da[0\-9]+"\fP for SCSI devices. .IP \fBNETBSD\fP: 9 -Use the form \fB"/dev/wd[0-9]+[cd]"\fP for IDE/ATA +Use the form \fB"/dev/wd[0\-9]+[cd]"\fP for IDE/ATA devices. Be sure to specify correct "whole disk" partition letter for your architecture. .IP \fBSOLARIS\fP: 9 Use the forms \fB"/dev/rdsk/c?t?d?s?"\fP for IDE/ATA and SCSI disk devices, and \fB"/dev/rmt/*"\fP for SCSI tape devices. .IP \fBWINDOWS\fP: 9 -Use the forms \fB"/dev/hd[a-j]"\fP for IDE/ATA devices -"\\\\.\\PhysicalDisk[0-9]" on WinNT4/2000/XP, -\fB"/dev/hd[a-d]"\fP for standard IDE/ATA devices on Win95/98/98SE/ME, -and \fB"/dev/scsi[0-9][0-f]"\fP for SCSI devices on ASPI adapter 0-9, ID 0-15. +Use the forms \fB"/dev/hd[a\-j]"\fP for IDE/ATA devices +"\\\\.\\PhysicalDisk[0\-9]" on WinNT4/2000/XP, +\fB"/dev/hd[a\-d]"\fP for standard IDE/ATA devices on Win95/98/98SE/ME, +and \fB"/dev/scsi[0\-9][0\-f]"\fP for SCSI devices on ASPI adapter 0\-9, ID 0\-15. The prefix \fB"/dev/"\fP is optional. .IP \fBCYGWIN\fP: 9 See "WINDOWS" above. .PP Based on the device path, \fBsmartctl\fP will guess the device type -(ATA or SCSI). If necessary, the \'\-d\' option can be used to over-ride +(ATA or SCSI). If necessary, the \'\-d\' option can be used to over\-ride this guess Note that the printed output of \fBsmartctl\fP displays most numerical @@ -114,7 +114,7 @@ to see the available options. Prints a usage message to STDOUT and exits. .TP .B \-V, \-\-version, \-\-copyright, \-\-license -Prints version, copyright, license, home page and CVS-id information +Prints version, copyright, license, home page and CVS\-id information for your copy of \fBsmartctl\fP to STDOUT and then exits. Please include this information if you are reporting bugs or problems. .TP @@ -124,13 +124,21 @@ version/revision information. Says if the device supports SMART, and if so, whether SMART support is currently enabled or disabled. .TP .B \-a, \-\-all -Prints all SMART information about the disk or TapeAlert information -about the tape drive or changer. This is equivalent to \'\-H \-i \-c -\-A \-l error \-l selftest\' -(for SCSI, \'\-H \-i \-A \-l error \-l selftest\'). +Prints all SMART information about the disk, or TapeAlert information +about the tape drive or changer. For ATA devices this is equivalent +to +.nf +\'\-H \-i \-c \-A \-l error \-l selftest -l selective\' +.fi +and for SCSI, this is equivalent to +.nf +\'\-H \-i \-A \-l error \-l selftest\'. +.fi +Note that for ATA disks this does \fBnot\fP enable the \'\-l +directory\' option. .TP -.B RUN-TIME BEHAVIOR OPTIONS: +.B RUN\-TIME BEHAVIOR OPTIONS: .TP .B \-q TYPE, \-\-quietmode=TYPE Specifies that \fBsmartctl\fP should run in one of the two quiet modes @@ -138,11 +146,11 @@ described here. The valid arguments to this option are: .I errorsonly \- only print: For the \'\-l error\' option, if nonzero, the number -of errors recorded in the SMART error log and the power-on time when +of errors recorded in the SMART error log and the power\-on time when they occurred; For the \'\-l selftest\' option, errors recorded in the device -self-test log; For the \'\-H\' option, SMART "disk failing" status or device -Attributes (pre-failure or usage) which failed either now or in the -past; For the \'\-A\' option, device Attributes (pre-failure or usage) +self\-test log; For the \'\-H\' option, SMART "disk failing" status or device +Attributes (pre\-failure or usage) which failed either now or in the +past; For the \'\-A\' option, device Attributes (pre\-failure or usage) which failed either now or in the past. .I silent @@ -158,7 +166,7 @@ the device name. To look at ATA disks behind 3ware SCSI RAID controllers, use syntax such as: .fi -\fBsmartctl -a -d 3ware,2 /dev/sda\fP +\fBsmartctl \-a \-d 3ware,2 /dev/sda\fP .fi where in the argument \fI3ware,N\fP, the integer N is the disk number (3ware \'port\') within the 3ware ATA RAID controller. The allowed @@ -183,14 +191,14 @@ disk attached to it, the behavior of \fBsmartctl\fP depends upon the specific controller model, firmware, Linux kernel and platform. In some cases you will get a warning message that the device does not exist. In other cases you will be presented with \'void\' data for a -non-existent device. +non\-existent device. -Note that older 3w-xxxx drivers do not pass the "Enable Autosave" -(\'\fB-S on\fP\') and "Enable Automatic Offline" (\'\fB-o on\fP\') +Note that older 3w\-xxxx drivers do not pass the "Enable Autosave" +(\'\fB\-S on\fP\') and "Enable Automatic Offline" (\'\fB\-o on\fP\') commands to the disk, and produce these types of harmless syslog error -messages instead: "\fB3w-xxxx: tw_ioctl(): Passthru size (123392) too +messages instead: "\fB3w\-xxxx: tw_ioctl(): Passthru size (123392) too big\fP". This can be fixed by upgrading to version 1.02.00.037 or -later of the 3w-xxxx driver, or by applying a patch to older +later of the 3w\-xxxx driver, or by applying a patch to older versions. See \fBhttp://smartmontools.sourceforge.net/\fP for instructions. @@ -203,9 +211,9 @@ failures. The behavior of \fBsmartctl\fP depends upon whether the command is "\fBoptional\fP" or "\fBmandatory\fP". Here "\fBmandatory\fP" means -"required by the ATA/ATAPI-5 Specification if the device implements +"required by the ATA/ATAPI\-5 Specification if the device implements the SMART command set" and "\fBoptional\fP" means "not required by the -ATA/ATAPI-5 Specification even if the device implements the SMART +ATA/ATAPI\-5 Specification even if the device implements the SMART command set." The "\fBmandatory\fP" ATA and SMART commands are: (1) ATA IDENTIFY DEVICE, (2) SMART ENABLE/DISABLE ATTRIBUTE AUTOSAVE, (3) SMART ENABLE/DISABLE, and (4) SMART RETURN STATUS. @@ -240,7 +248,7 @@ Please see the note above. .TP .B \-b TYPE, \-\-badsum=TYPE Specifies the action \fBsmartctl\fP should take if a checksum error is -detected in the: (1) Device Identity Structure, (2) SMART Self-Test +detected in the: (1) Device Identity Structure, (2) SMART Self\-Test Log Structure, (3) SMART Attribute Value Structure, (4) SMART Attribute Threshold Structure, or (5) ATA Error Log Structure. @@ -259,7 +267,7 @@ default. .TP .B \-r TYPE, \-\-report=TYPE Intended primarily to help \fBsmartmontools\fP developers understand -the behavior of \fBsmartmontools\fP on non-conforming or poorly +the behavior of \fBsmartmontools\fP on non\-conforming or poorly conforming hardware. This option reports details of \fBsmartctl\fP transactions with the device. The option can be used multiple times. When used just once, it shows a record of the ioctl() transactions @@ -302,9 +310,9 @@ the corresponding disable command. Enables or disables SMART on device. The valid arguments to this option are \fIon\fP and \fIoff\fP. Note that the command \'\-s on\' (perhaps used with with the \'\-o on\' and \'\-S on\' options) should be placed -in a start-up script for your machine, for example in rc.local or rc.sysinit. +in a start\-up script for your machine, for example in rc.local or rc.sysinit. In principle the SMART feature settings are preserved over -power-cycling, but it doesn\'t hurt to be sure. It is not necessary (or +power\-cycling, but it doesn\'t hurt to be sure. It is not necessary (or useful) to enable SMART to see the TapeAlert messages. .TP .B \-o VALUE, \-\-offlineauto=VALUE @@ -315,13 +323,13 @@ and \fIoff\fP. Note that the SMART automatic offline test command is listed as "Obsolete" in every version of the ATA and ATA/ATAPI Specifications. -It was originally part of the SFF-8035i Revision 2.0 specification, +It was originally part of the SFF\-8035i Revision 2.0 specification, but was never part of any ATA specification. However it is implemented and used by many vendors. [Good documentation can be found in IBM\'s Official Published Disk Specifications. For example the IBM Travelstar 40GNX Hard Disk Drive Specifications (Revision 1.1, 22 -April 2002, Publication # 1541, Document S07N-7715-02) page 164. You -can also read the SFF-8035i Specification -- see REFERENCES below.] +April 2002, Publication # 1541, Document S07N\-7715\-02) page 164. You +can also read the SFF\-8035i Specification \-\- see REFERENCES below.] You can tell if automatic offline testing is supported by seeing if this command enables and disables it, as indicated by the \'Auto Offline Data Collection\' part of the SMART capabilities report @@ -337,12 +345,12 @@ type of test can, in principle, degrade the device performance. The automatically, on a regular scheduled basis. Normally, the disk will suspend offline testing while disk accesses are taking place, and then automatically resume it when the disk would otherwise be idle, so in -practice it has little effect. Note that a one-time offline test can +practice it has little effect. Note that a one\-time offline test can also be carried out immediately upon receipt of a user command. See -the \'\-t offline\' option below, which causes a one-time offline test +the \'\-t offline\' option below, which causes a one\-time offline test to be carried out immediately. -The choice (made by the SFF-8035i and ATA specification authors) of +The choice (made by the SFF\-8035i and ATA specification authors) of the word \fItesting\fP for these first two categories is unfortunate, and often leads to confusion. In fact these first two categories of online and offline testing could have been more accurately described @@ -355,9 +363,9 @@ Attributes will go below their failure thresholds; some types of errors may also appear in the SMART error log. These are visible with the \'\-A\' and \'\-l error\' options respectively. -Some SMART attribute values are updated only during off-line data +Some SMART attribute values are updated only during off\-line data collection activities; the rest are updated during normal operation of -the device or during both normal operation and off-line testing. The +the device or during both normal operation and off\-line testing. The Attribute value table produced by the \'\-A\' option indicates this in the UPDATED column. Attributes of the first type are labeled "Offline" and Attributes of the second type are labeled "Always". @@ -366,20 +374,20 @@ The \fBthird\fP category of testing (and the \fIonly\fP category for which the word \'testing\' is really an appropriate choice) is "self" testing. This third type of test is only performed (immediately) when a command to run it is issued. The \'\-t\' and \'\-X\' options can be -used to carry out and abort such self-tests; please see below for +used to carry out and abort such self\-tests; please see below for further details. Any errors detected in the self testing will be shown in the -SMART self-test log, which can be examined using the \'\-l selftest\' +SMART self\-test log, which can be examined using the \'\-l selftest\' option. \fBNote:\fP in this manual page, the word \fB"Test"\fP is used in connection with the second category just described, e.g. for the -"offline" testing. The words \fB"Self-test"\fP are used in +"offline" testing. The words \fB"Self\-test"\fP are used in connection with the third category. .TP .B \-S VALUE, \-\-saveauto=VALUE -Enables or disables SMART autosave of device vendor-specific +Enables or disables SMART autosave of device vendor\-specific Attributes. The valid arguments to this option are \fIon\fP and \fIoff\fP. Note that this feature is preserved across disk power cycles, so you should only need to issue it once. @@ -387,11 +395,11 @@ cycles, so you should only need to issue it once. For SCSI devices this toggles the value of the Global Logging Target Save Disabled (GLTSD) bit in the Control Mode Page. Some disk manufacturers set this bit by default. This prevents error counters, -power-up hours and other useful data from being placed in non-volatile +power\-up hours and other useful data from being placed in non\-volatile storage, so these values may be reset to zero the next time the device -is power-cycled. If the GLTSD bit is set then \'smartctl \-a\' will +is power\-cycled. If the GLTSD bit is set then \'smartctl \-a\' will issue a warning. Use \fIon\fP to clear the GLTSD bit and thus enable -saving counters to non-volatile storage. For extreme streaming-video +saving counters to non\-volatile storage. For extreme streaming\-video type applications you might consider using \fIoff\fP to set the GLTSD bit. @@ -403,7 +411,7 @@ Check: Ask the device to report its SMART health status or pending TapeAlert messages. SMART status is based on information that it has gathered from online and offline tests, which were used to determine/update its -SMART vendor-specific Attribute values. TapeAlert status is obtained +SMART vendor\-specific Attribute values. TapeAlert status is obtained by reading the TapeAlert log page. If the device reports failing health status, this means @@ -419,10 +427,10 @@ Prints only the generic SMART capabilities. These show what SMART features are implemented and how the device will respond to some of the different SMART commands. For example it shows if the device logs errors, if it supports offline surface -scanning, and so on. If the device can carry out self-tests, this +scanning, and so on. If the device can carry out self\-tests, this option also shows the estimated time required to run those tests. -Note that the time required to run the Self-tests (listed in minutes) +Note that the time required to run the Self\-tests (listed in minutes) are fixed. However the time required to run the Immediate Offline Test (listed in seconds) is variable. This means that if you issue a command to perform an Immediate Offline test with the \'\-t offline\' option, @@ -439,9 +447,9 @@ disk been powered up. Each Attribute has a "Raw" value, printed under the heading "RAW_VALUE", and a "Normalized" value printed under the heading -"VALUE". [Note: \fBsmartctl\fP prints these values in base-10.] In +"VALUE". [Note: \fBsmartctl\fP prints these values in base\-10.] In the example just given, the "Raw Value" for Attribute 12 would be the -actual number of times that the disk has been power-cycled, for +actual number of times that the disk has been power\-cycled, for example 365 if the disk has been turned on once per day for exactly one year. Each vendor uses their own algorithm to convert this "Raw" value to a "Normalized" value in the range from 1 to 254. Please keep @@ -455,27 +463,27 @@ not specified by the SMART standard. In most cases, the values printed by \fBsmartctl\fP are sensible. For example the temperature Attribute generally has its raw value equal to the temperature in Celsius. However in some cases vendors use unusual conventions. For example -the Hitachi disk on my laptop reports its power-on hours in minutes, +the Hitachi disk on my laptop reports its power\-on hours in minutes, not hours. Some IBM disks track three temperatures rather than one, in their raw values. And so on. Each Attribute also has a Threshold value (whose range is 0 to 255) which is printed under the heading "THRESH". If the Normalized value is \fBless than or equal to\fP the Threshold value, then the Attribute -is said to have failed. If the Attribute is a pre-failure Attribute, +is said to have failed. If the Attribute is a pre\-failure Attribute, then disk failure is imminent. Each Attribute also has a "Worst" value shown under the heading "WORST". This is the smallest (closest to failure) value that the disk has recorded at any time during its lifetime when SMART was enabled. [Note however that some vendors firmware may actually -\fBincrease\fP the "Worst" value for some "rate-type" Attributes.] +\fBincrease\fP the "Worst" value for some "rate\-type" Attributes.] The Attribute table printed out by \fBsmartctl\fP also shows the -"TYPE" of the Attribute. Pre-failure Attributes are ones which, if +"TYPE" of the Attribute. Pre\-failure Attributes are ones which, if less than or equal to their threshold values, indicate pending disk failure. Old age, or usage Attributes, are ones which indicate -end-of-product life from old-age or normal aging and wearout, if the +end\-of\-product life from old\-age or normal aging and wearout, if the Attribute value is less than or equal to the threshold. If the Attribute\'s current Normalized value is less than or equal to @@ -485,15 +493,15 @@ equal to the threshold value, then this column will display "In_the_past". The table column labeled "UPDATED" shows if the SMART Attribute values -are updated during both normal operation and off-line testing, or only +are updated during both normal operation and off\-line testing, or only during offline testing. The former are labeled "Always" and the latter are labeled "Offline". So to summarize: the Raw Attribute values are the ones that might have a real physical interpretation, such as "Temperature Celsius", -"Hours", or "Start-Stop Cycles". Each manufacturer converts these, +"Hours", or "Start\-Stop Cycles". Each manufacturer converts these, using their detailed knowledge of the disk\'s operations and failure -modes, to Normalized Attribute values in the range 1-254. The current +modes, to Normalized Attribute values in the range 1\-254. The current and worst (lowest measured) of these Normalized Attribute values are stored on the disk, along with a Threshold value that the manufacturer has determined will indicate that the disk is going to fail, or that @@ -501,19 +509,19 @@ it has exceeded its design age or aging limit. \fBsmartctl\fP does not calculate any of these values, it merely reports them from the SMART data on the disk. -Note that starting with ATA/ATAPI-4, revision 4, the meaning of these -Attribute fields has been made entirely vendor-specific. However most -ATA/ATAPI-5 disks seem to respect their meaning, so we have retained +Note that starting with ATA/ATAPI\-4, revision 4, the meaning of these +Attribute fields has been made entirely vendor\-specific. However most +ATA/ATAPI\-5 disks seem to respect their meaning, so we have retained the option of printing the Attribute values. .TP .B \-l TYPE, \-\-log=TYPE -Prints either the SMART error log or the SMART self-test log. The +Prints either the SMART error log or the SMART self\-test log. The valid arguments to this option are: .I error \- prints only the SMART error log. SMART disks maintain a log of the -most recent five non-trivial errors. For each of these errors, the -disk power-on lifetime at which the error occurred is recorded, as is +most recent five non\-trivial errors. For each of these errors, the +disk power\-on lifetime at which the error occurred is recorded, as is the device status (idle, standby, etc) at the time of the error. For some common types of errors, the Error Register (ER) and Status Register (SR) values are decoded and printed as text. The meanings of these @@ -525,7 +533,7 @@ are: \fBEOM\fP: \fBE\fPnd \fBO\fPf \fBM\fPedia \fBICRC\fP: \fBI\fPnterface \fBC\fPyclic \fBR\fPedundancy \fBC\fPode (CRC) error \fBIDNF\fP: \fBID\fPentity \fBN\fPot \fBF\fPound - \fBILI\fP: (packet command-set specific) + \fBILI\fP: (packet command\-set specific) \fBMC\fP: \fBM\fPedia \fBC\fPhanged \fBMCR\fP: \fBM\fPedia \fBC\fPhange \fBR\fPequest \fBNM\fP: \fBN\fPo \fBM\fPedia @@ -541,18 +549,18 @@ Dd+HH:MM:SS.msec where D is the number of days, HH is hours, MM is minutes, SS is seconds and msec is milliseconds. [Note: this time stamp wraps after 2^32 milliseconds, or 49 days 17 hours 2 minutes and 47.296 seconds.] The key ATA disk registers are also recorded in the -log. The final column of the error log is a text-string description +log. The final column of the error log is a text\-string description of the ATA command defined by the Command Register (CR) and Feature Register (FR) values. Commands that are obsolete in the most current -(ATA-7) spec are listed like this: \fBREAD LONG (w/ retry) [OBS-4]\fP, -indicating that the command became obsolete with or in the ATA-4 -specification. Similarly, the notation \fB[RET-\fP\fIN\fP\fB]\fP is -used to indicate that a command was retired in the ATA-\fIN\fP +(ATA\-7) spec are listed like this: \fBREAD LONG (w/ retry) [OBS\-4]\fP, +indicating that the command became obsolete with or in the ATA\-4 +specification. Similarly, the notation \fB[RET\-\fP\fIN\fP\fB]\fP is +used to indicate that a command was retired in the ATA\-\fIN\fP specification. Some commands are not defined in any version of the ATA specification but are in common use nonetheless; these are marked -\fB[NS]\fP, meaning non-standard. +\fB[NS]\fP, meaning non\-standard. -The ATA Specification (ATA-5 Revision 1c, Section 8.41.6.8.2) says: +The ATA Specification (ATA\-5 Revision 1c, Section 8.41.6.8.2) says: \fB"Error log structures shall include UNC errors, IDNF errors for which the address requested was valid, servo errors, write fault errors, etc. Error log data structures shall not include errors @@ -565,20 +573,21 @@ to data which as been read from the disk, but for which the Error Checking and Correction (ECC) codes are inconsistent. In effect, this means that the data can not be read. .br -\fBIDNF\fP (\fBID N\fPot \fBF\fPound): user-accessible address could +\fBIDNF\fP (\fBID N\fPot \fBF\fPound): user\-accessible address could not be found. For READ LOG type commands, \fBIDNF\fP can also indicate that a device data log structure checksum was incorrect. If the command that caused the error was a READ or WRITE command, then the Logical Block Address (LBA) at which the error occured will be printed in base 10 and base 16. The LBA is a linear address, which -counts 512-byte sectors on the disk, starting from zero. (Because of +counts 512\-byte sectors on the disk, starting from zero. (Because of the limitations of the SMART error log, if the LBA is greater than 0xfffffff, then either no error log entry will be made, or the error log entry will have an incorrect LBA. This may happen for drives with a capacity greater than 128 GiB or 137 GB.) On Linux systems the smartmontools web page has instructions about how to convert the LBA -address to the name of the disk file containing the erroneous block. +address to the name of the disk file containing the erroneous disk +sector. Please note that some manufacturers \fBignore\fP the ATA specifications, and make entries in the error log if the device @@ -589,11 +598,11 @@ receives a command which is not implemented or is not valid. The verify row is only output if it has an element other than zero. .I selftest -\- prints only the SMART self-test log. The disk maintains a log +\- prints the SMART self\-test log. The disk maintains a self\-test log showing the results of the self tests, which can be run using the \'\-t\' option described below. For each of the most recent -twenty-one self-tests, the log shows the type of test (short or -extended, off-line or captive) and the final status of the test. If +twenty\-one self\-tests, the log shows the type of test (short or +extended, off\-line or captive) and the final status of the test. If the test did not complete successfully, then the percentage of the test remaining is shown. The time at which the test took place, measured in hours of disk lifetime, is also printed. If any errors @@ -602,19 +611,35 @@ printed in hexadecimal notation. On Linux systems the smartmontools web page has instructions about how to convert this LBA address to the name of the disk file containing the erroneous block. +.I selective [ATA] +\- Some ATA\-7 disks (example: Maxtor) also maintain a selective +self\-test log. Please see the \'\-t select\' option below for a +description of selective self\-tests. The selective self\-test log +shows the start/end Logical Block Addresses (LBA) of each of the five +test spans, and their current test status. If the span is being +tested or the remainder of the disk is being read\-scanned, the +current 65536\-sector block of LBAs being tested is also displayed. +The selective self\-test log also shows if a read\-scan of the +remainder of the disk will be carried out after the selective +self\-test has completed (see \'\-t afterselect\' option) and the time +delay before restarting this read\-scan if it is interrupted (see +\'\-t pending\' option). This is a new smartmontools feature; please +report unusual or incorrect behavior to the smartmontools\-support +mailing list. + .I selftest [SCSI] -\- the self-test log for a SCSI device has a slightly different format +\- the self\-test log for a SCSI device has a slightly different format than for an ATA device. For each of the most recent twenty -self-tests, it shows the type of test and the status (final or in +self\-tests, it shows the type of test and the status (final or in progress) of the test. SCSI standards use the terms "foreground" and "background" (rather than ATA\'s corresponding "captive" and -"off-line") and "short" and "long" (rather than ATA\'s corresponding +"off\-line") and "short" and "long" (rather than ATA\'s corresponding "short" and "extended") to describe the type of the test. The printed segment number is only relevant when a test fails in the third or later test segment. It identifies the test that failed and consists of either the number of the segment that failed during the test, or the number of the test that failed and the number of the segment in -which the test was run, using a vendor-specific method of putting both +which the test was run, using a vendor\-specific method of putting both numbers into a single byte. The Logical Block Address (LBA) of the first error is printed in hexadecimal notation. On Linux systems the smartmontools web page has instructions about how to convert this LBA @@ -626,23 +651,23 @@ test terminology). .I directory \- if the device supports the General Purpose Logging feature set -(ATA-6 and ATA-7 only) then this prints the Log Directory (the log at +(ATA\-6 and ATA\-7 only) then this prints the Log Directory (the log at address 0). The Log Directory shows what logs are available and their length in sectors (512 bytes). The contents of the logs at address 1 -[Summary SMART error log] and at address 6 [SMART self-test log] may -be printed using the previously-described +[Summary SMART error log] and at address 6 [SMART self\-test log] may +be printed using the previously\-described .I error and .I selftest arguments to this option. [Please note: this is a new, experimental feature. We would like to add support for printing the contents of -extended and comprehensive SMART self-test and error logs. If your +extended and comprehensive SMART self\-test and error logs. If your disk supports these, and you would like to assist, please contact the \fBsmartmontools\fP developers.] .TP .B \-v N,OPTION, \-\-vendorattribute=N,OPTION -Sets a vendor-specific display OPTION for Attribute N. This option +Sets a vendor\-specific display OPTION for Attribute N. This option may be used multiple times. Valid arguments to this option are: .I help @@ -650,23 +675,23 @@ may be used multiple times. Valid arguments to this option are: then exits. .I 9,minutes -\- Raw Attribute number 9 is power-on time in minutes. Its raw value +\- Raw Attribute number 9 is power\-on time in minutes. Its raw value will be displayed in the form "Xh+Ym". Here X is hours, and Y is -minutes in the range 0-59 inclusive. Y is always printed with two +minutes in the range 0\-59 inclusive. Y is always printed with two digits, for example "06" or "31" or "00". .I 9,seconds -\- Raw Attribute number 9 is power-on time in seconds. Its raw value +\- Raw Attribute number 9 is power\-on time in seconds. Its raw value will be displayed in the form "Xh+Ym+Zs". Here X is hours, Y is -minutes in the range 0-59 inclusive, and Z is seconds in the range -0-59 inclusive. Y and Z are always printed with two digits, for +minutes in the range 0\-59 inclusive, and Z is seconds in the range +0\-59 inclusive. Y and Z are always printed with two digits, for example "06" or "31" or "00". .I 9,halfminutes -\- Raw Attribute number 9 is power-on time, measured in units of 30 +\- Raw Attribute number 9 is power\-on time, measured in units of 30 seconds. This format is used by some Samsung disks. Its raw value will be displayed in the form "Xh+Ym". Here X is hours, and Y is -minutes in the range 0-59 inclusive. Y is always printed with two +minutes in the range 0\-59 inclusive. Y is always printed with two digits, for example "06" or "31" or "00". .I 9,temp @@ -687,11 +712,11 @@ unloads. .I 194,10xCelsius \- Raw Attribute number 194 is ten times the disk temperature in Celsius. This is used by some Samsung disks (example: model SV1204H -with RK100-13 firmware). +with RK100\-13 firmware). .I 194,unknown \- Raw Attribute number 194 is NOT the disk temperature, and its -interpretation is unknown. This is primarily useful for the -P +interpretation is unknown. This is primarily useful for the \-P (presets) option. .I 198,offlinescanuncsectorct @@ -711,21 +736,21 @@ corresponds to temperature, can be found at: http://coredump.free.fr/linux/hddtemp.db .I N,raw8 -\- Print the Raw value of Attribute N as six 8-bit unsigned base-10 +\- Print the Raw value of Attribute N as six 8\-bit unsigned base\-10 integers. This may be useful for decoding the meaning of the Raw value. The form \'N,raw8\' prints Raw values for ALL Attributes in this form. The form (for example) \'123,raw8\' only prints the Raw value for Attribute 123 in this form. .I N,raw16 -\- Print the Raw value of Attribute N as three 16-bit unsigned base-10 +\- Print the Raw value of Attribute N as three 16\-bit unsigned base\-10 integers. This may be useful for decoding the meaning of the Raw value. The form \'N,raw16\' prints Raw values for ALL Attributes in this form. The form (for example) \'123,raw16\' only prints the Raw value for Attribute 123 in this form. .I N,raw48 -\- Print the Raw value of Attribute N as a 48-bit unsigned base-10 +\- Print the Raw value of Attribute N as a 48\-bit unsigned base\-10 integer. This may be useful for decoding the meaning of the Raw value. The form \'N,raw48\' prints Raw values for ALL Attributes in this form. The form (for example) \'123,raw48\' only prints the Raw @@ -745,22 +770,22 @@ device database (see note below). .I samsung \- In some Samsung disks (example: model SV4012H Firmware Version: -RM100-08) some of the two- and four-byte quantities in the SMART data -structures are byte-swapped (relative to the ATA specification). +RM100\-08) some of the two\- and four\-byte quantities in the SMART data +structures are byte\-swapped (relative to the ATA specification). Enabling this option tells \fBsmartctl\fP to evaluate these quantities -in byte-reversed order. Some signs that your disk needs this option -are (1) no self-test log printed, even though you have run self-tests; +in byte\-reversed order. Some signs that your disk needs this option +are (1) no self\-test log printed, even though you have run self\-tests; (2) very large numbers of ATA errors reported in the ATA error log; (3) strange and impossible values for the ATA error log timestamps. .I samsung2 \- In more recent Samsung disks (firmware revisions ending in "\-23") the number of ATA errors reported is byte swapped. Enabling this -option tells \fBsmartctl\fP to evaluate this quantity in byte-reversed +option tells \fBsmartctl\fP to evaluate this quantity in byte\-reversed order. Note that an explicit \'\-F\' option on the command line will -over-ride any preset values for \'\-F\' (see the \'\-P\' option +over\-ride any preset values for \'\-F\' (see the \'\-P\' option below). .TP @@ -771,8 +796,8 @@ in the \fBsmartmontools\fP database, then the presets are used. \fBsmartctl\fP can automatically set appropriate options for known drives. For example, the Maxtor 4D080H4 uses Attribute 9 to stores -power-on time in minutes whereas most drives use that Attribute to -store the power-on time in hours. The command-line option \'-v +power\-on time in minutes whereas most drives use that Attribute to +store the power\-on time in hours. The command\-line option \'-v 9,minutes\' ensures that \fBsmartctl\fP correctly interprets Attribute 9 in this case, but that option is preset for the Maxtor 4D080H4 and so need not be specified by the user on the \fBsmartctl\fP command @@ -794,9 +819,9 @@ The valid arguments to this option are: .I use \- if a drive is recognized, then use the stored presets for it. This -is the default. Note that presets will NOT over-ride additional -Attribute interpretation (\'-v N,something\') command-line options or -explicit \'\-F\' command-line options.. +is the default. Note that presets will NOT over\-ride additional +Attribute interpretation (\'-v N,something\') command\-line options or +explicit \'\-F\' command\-line options.. .I ignore \- do not use presets. @@ -810,12 +835,12 @@ presets, then exit. then exit. .TP -.B SMART RUN/ABORT OFFLINE TEST AND SELF-TEST OPTIONS: +.B SMART RUN/ABORT OFFLINE TEST AND SELF\-TEST OPTIONS: .TP .B \-t TEST, \-\-test=TEST Executes TEST immediately. The \'\-C\' option can be used in conjunction with this option to run the short or long (and also for -ATA devices, selective or conveyance) self-tests in captive mode +ATA devices, selective or conveyance) self\-tests in captive mode (known as "foreground mode" for SCSI devices). Note that only one test can be run at a time, so this option should only be used once per command line. @@ -843,7 +868,7 @@ the test. .I short \- runs SMART Short Self Test (usually under ten minutes). [Note: in the case of SCSI devices, -this command option runs the "Background short" self-test.] +this command option runs the "Background short" self\-test.] This command can be given during normal system operation (unless run in captive mode \- see the \'\-C\' option below). This is a test in a different category than the immediate or automatic offline @@ -851,13 +876,13 @@ tests. The "Self" tests check the electrical and mechanical performance as well as the read performance of the disk. Their results are reported in the Self Test Error Log, readable with the \'\-l selftest\' option. Note that on some disks the progress of the -self-test can be monitored by watching this log during the self-test; with other disks +self\-test can be monitored by watching this log during the self\-test; with other disks use the \'\-c\' option to monitor progress. .I long \- runs SMART Extended Self Test (tens of minutes). [Note: in the case of SCSI devices, -this command option runs the "Background long" self-test.] +this command option runs the "Background long" self\-test.] This is a longer and more thorough version of the Short Self Test described above. Note that this command can be given during normal @@ -865,18 +890,20 @@ system operation (unless run in captive mode \- see the \'\-C\' option below). .I conveyance \- [ATA ONLY] runs a SMART Conveyance Self Test (minutes). This -self-test routine is intended to identify damage incurred during -transporting of the device. This self-test routine should take on the +self\-test routine is intended to identify damage incurred during +transporting of the device. This self\-test routine should take on the order of minutes to complete. Note that this command can be given during normal system operation (unless run in captive mode \- see the \'\-C\' option below). .I select,N\-M -\- [ATA ONLY] runs a SMART Selective Self Test, to test a \fBrange\fP -of disk Logical Block Addresses (LBAs), rather than the entire disk. -Each range of LBAs that is checked is called a "span" and is specified -by a starting LBA (N) and an ending LBA (M) with N less than or equal -to M. For example the command: + +\- [ATA ONLY] [NEW EXPERIMENTAL SMARTCTL FEATURE] runs a SMART +Selective Self Test, to test a \fBrange\fP of disk Logical Block +Addresses (LBAs), rather than the entire disk. Each range of LBAs +that is checked is called a "span" and is specified by a starting LBA +(N) and an ending LBA (M) with N less than or equal to M. For example +the command: .nf smartctl \-t select,10\-20 /dev/hda .fi @@ -892,51 +919,57 @@ overlap partially or completely, for example: .nf smartctl \-t select,0\-10 \-t select,5\-15 \-t select,10\-20 /dev/hda .fi -The results of the selective self-test can be obtained (both during -and after the test) by printing the SMART self-test log, using the +The results of the selective self\-test can be obtained (both during +and after the test) by printing the SMART self\-test log, using the \'\-l selftest\' option to smartctl. Selective self tests are particulary useful as disk capacities increase: an extended self test (smartctl \-t long) can take several -hours. Selective self-tests are helpful if (based on SYSLOG error -messages, previous failed self-tests, or SMART error log entries) you +hours. Selective self\-tests are helpful if (based on SYSLOG error +messages, previous failed self\-tests, or SMART error log entries) you suspect that a disk is having problems at a particular range of Logical Block Addresses (LBAs). -Selective self-tests can be run during normal system operation (unless +Selective self\-tests can be run during normal system operation (unless done in captive mode \- see the \'\-C\' option below). +[Note: this new experimental smartmontools feature is currently only +available under Linux. The Linux kernel must be compiled with the +configuration option CONFIG_IDE_TASKFILE_IO enabled. Please report +unusual or incorrect behavior to the smartmontools\-support mailing +list.] + .I afterselect,on -\- [ATA ONLY] perform an offline read scan after a Selective Self-test +\- [ATA ONLY] perform an offline read scan after a Selective Self\-test has completed. This option must be used together with one or more of -the \fIselect,N-M\fP options above. If the LBAs that have been -specified in the Selective self-test pass the test with no errors +the \fIselect,N\-M\fP options above. If the LBAs that have been +specified in the Selective self\-test pass the test with no errors found, then read scan the \fBremainder\fP of the disk. If the device -is powered-cycled while this read scan is in progress, the read scan +is powered\-cycled while this read scan is in progress, the read scan will be automatically resumed after a time specified by the pending timer (see below). The value of this option is preserved between -selective self-tests. +selective self\-tests. .I afterselect,off \- [ATA ONLY] do not read scan the remainder of the disk after a -Selective self-test has completed. This option must be use together -with one or more of the \fIselect,N-M\fP options above. The value of this -option is preserved between selective self-tests. +Selective self\-test has completed. This option must be use together +with one or more of the \fIselect,N\-M\fP options above. The value of this +option is preserved between selective self\-tests. .I pending,N \- [ATA ONLY] set the pending offline read scan timer to N minutes. Here N is an integer in the range from 0 to 65535 inclusive. If the -device is powered off during a read scan after a Selective self-test, -then resume the test automatically N minutes after power-up. This -option must be use together with one or more of the \fIselect,N-M\fP +device is powered off during a read scan after a Selective self\-test, +then resume the test automatically N minutes after power\-up. This +option must be use together with one or more of the \fIselect,N\-M\fP options above. The value of this option is preserved between selective -self-tests. +self\-tests. .TP .B \-C, \-\-captive -Runs self-tests in captive mode. This has no effect with \'\-t +Runs self\-tests in captive mode. This has no effect with \'\-t offline\' or if the \'\-t\' option is not used. [Note: in the case of -SCSI devices, this command option runs the self-test in "Foreground" +SCSI devices, this command option runs the self\-test in "Foreground" mode.] \fBWARNING: Tests run in captive mode may busy out the drive for the @@ -945,7 +978,7 @@ mounted partitions!\fP .TP .B \-X, \-\-abort -Aborts non-captive SMART Self Tests. Note that this +Aborts non\-captive SMART Self Tests. Note that this command will abort the Offline Immediate Test routine only if your disk has the "Abort Offline collection upon new command" capability. .PP @@ -965,14 +998,14 @@ Disable SMART on drive /dev/hdd (Secondary Slave). .fi Enable SMART on drive /dev/hda, enable automatic offline testing every four hours, and enable autosaving of -SMART Attributes. This is a good start-up line for your system\'s +SMART Attributes. This is a good start\-up line for your system\'s init files. You can issue this command on a running system. .PP .nf .B smartctl \-t long /dev/hdc .fi -Begin an extended self-test of drive /dev/hdc. You can issue this -command on a running system. The results can be seen in the self-test +Begin an extended self\-test of drive /dev/hdc. You can issue this +command on a running system. The results can be seen in the self\-test log visible with the \'\-l selftest\' option after it has completed. .PP .nf @@ -987,14 +1020,14 @@ the SMART error log, which can be seen with the \'\-l error\' option. .nf .B smartctl \-A \-v 9,minutes /dev/hda .fi -Shows the vendor Attributes, when the disk stores its power-on time +Shows the vendor Attributes, when the disk stores its power\-on time internally in minutes rather than hours. .PP .nf .B smartctl \-q errorsonly \-H \-l selftest /dev/hda .fi Produces output only if the device returns failing SMART status, -or if some of the logged self-tests ended with errors. +or if some of the logged self\-tests ended with errors. .PP .nf .B smartctl \-q silent \-a /dev/hda @@ -1004,32 +1037,32 @@ printed output. You must use the exit status (the .B $? shell variable) to learn if any Attributes are out of bound, if the SMART status is failing, if there are errors recorded in the -self-test log, or if there are errors recorded in the disk error log. +self\-test log, or if there are errors recorded in the disk error log. .PP .nf -.B smartctl \-a -d 3ware,0 /dev/sda +.B smartctl \-a \-d 3ware,0 /dev/sda .fi Examine all SMART data for the first ATA disk connected to a 3ware RAID controller card. .PP .nf -.B smartctl \-t short -d 3ware,3 /dev/sdb +.B smartctl \-t short \-d 3ware,3 /dev/sdb .fi -Start a short self-test on the fourth ATA disk connected to the 3ware RAID +Start a short self\-test on the fourth ATA disk connected to the 3ware RAID controller card which is the second SCSI device /dev/sdb. .nf -.B smartctl \-t select,10-100 \-t select,30-300 \-t afterselect,on \-t pending,45 /dev/hda +.B smartctl \-t select,10\-100 \-t select,30\-300 \-t afterselect,on \-t pending,45 /dev/hda .fi -Run a selective self-test on LBAs 10 to 100 and 30 to 300. After the -these LBAs have been tested, read-scan the remainder of the disk. If the disk is -power-cycled during the read-scan, resume the scan 45 minutes after power to the +Run a selective self\-test on LBAs 10 to 100 and 30 to 300. After the +these LBAs have been tested, read\-scan the remainder of the disk. If the disk is +power\-cycled during the read\-scan, resume the scan 45 minutes after power to the device is restored. .PP .SH RETURN VALUES The return values of \fBsmartctl\fP are defined by a bitmask. If all is well with the disk, the return value (exit status) of \fBsmartctl\fP is 0 (all bits turned off). If a problem occurs, or an -error, potential error, or fault is detected, then a non-zero status +error, potential error, or fault is detected, then a non\-zero status is returned. In this case, the eight different bits in the return value have the following meanings for ATA disks; some of these values may also be returned for SCSI disks. @@ -1059,7 +1092,7 @@ past. The device error log contains records of errors. .TP .B Bit 7: -The device self-test log contains records of errors. +The device self\-test log contains records of errors. To test within the shell for whether or not the different bits are turned on or off, you can use the following type of construction (this @@ -1082,7 +1115,7 @@ condition. .PP .SH AUTHOR -\fBBruce Allen\fP smartmontools-support@lists.sourceforge.net +\fBBruce Allen\fP smartmontools\-support@lists.sourceforge.net .fi University of Wisconsin \- Milwaukee Physics Department @@ -1107,7 +1140,7 @@ Many other individuals have made smaller contributions and corrections. .fi This code was derived from the smartsuite package, written by Michael Cornwell, and from the previous UCSC smartsuite package. It extends -these to cover ATA-5 disks. This code was originally developed as a +these to cover ATA\-5 disks. 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 @@ -1129,19 +1162,19 @@ REFERENCES FOR SMART .fi If you would like to understand better how SMART works, and what it does, a good place to start is Section 8.41 of the "AT Attachment with -Packet Interface-5" (ATA/ATAPI-5) specification. This documents the +Packet Interface\-5" (ATA/ATAPI\-5) specification. This documents the SMART functionality which the \fBsmartmontools\fP utilities provide access to. You can find Revision 1 of this document at \fBhttp://www.t13.org/project/d1321r1c.pdf\fP . .fi -Future versions of the specifications (ATA/ATAPI-6 and ATA/ATAPI-7), -and later revisions (2, 3) of the ATA/ATAPI-5 specification are +Future versions of the specifications (ATA/ATAPI\-6 and ATA/ATAPI\-7), +and later revisions (2, 3) of the ATA/ATAPI\-5 specification are available from \fBhttp://www.t13.org/#FTP_site\fP . .fi -The functioning of SMART was originally defined by the SFF-8035i -revision 2 and the SFF-8055i revision 1.4 specifications. These are +The functioning of SMART was originally defined by the SFF\-8035i +revision 2 and the SFF\-8055i revision 1.4 specifications. These are publications of the Small Form Factors (SFF) Committee. Links to these documents may be found in the References section of the \fBsmartmontools\fP home page at @@ -1149,7 +1182,7 @@ these documents may be found in the References section of the .SH CVS ID OF THIS PAGE: -$Id: smartctl.8.in,v 1.45 2004/04/11 17:13:38 chrfranke Exp $ +$Id: smartctl.8.in,v 1.46 2004/04/17 11:57:43 ballen4705 Exp $ .\" Local Variables: .\" mode: nroff .\" End: diff --git a/sm5/smartctl.c b/sm5/smartctl.c index 5fda4fa589f844796e0234c9f5881ba2d8fdc579..57795278689af4963e32a2e2f74eb1d1e93604b3 100644 --- a/sm5/smartctl.c +++ b/sm5/smartctl.c @@ -48,7 +48,7 @@ extern const char *os_solaris_ata_s_cvsid; extern const char *int64_vc6_c_cvsid; #endif extern const char *atacmdnames_c_cvsid, *atacmds_c_cvsid, *ataprint_c_cvsid, *knowndrives_c_cvsid, *os_XXXX_c_cvsid, *scsicmds_c_cvsid, *scsiprint_c_cvsid, *utility_c_cvsid; -const char* smartctl_c_cvsid="$Id: smartctl.c,v 1.123 2004/03/25 15:39:25 ballen4705 Exp $" +const char* smartctl_c_cvsid="$Id: smartctl.c,v 1.124 2004/04/17 11:57:43 ballen4705 Exp $" ATACMDS_H_CVSID ATAPRINT_H_CVSID CONFIG_H_CVSID EXTERN_H_CVSID INT64_H_CVSID KNOWNDRIVES_H_CVSID SCSICMDS_H_CVSID SCSIPRINT_H_CVSID SMARTCTL_H_CVSID UTILITY_H_CVSID; // This is a block containing all the "control variables". We declare @@ -188,7 +188,7 @@ void Usage (void){ " -A, --attributes (ATA)\n" " Show device SMART vendor-specific Attributes and values\n\n" " -l TYPE, --log=TYPE\n" -" Show device log. Type is one of: error, selftest, directory\n\n" +" Show device log. TYPE: error, selftest, selective, directory\n\n" " -v N,OPTION , --vendorattribute=N,OPTION (ATA)\n" " Set display OPTION for vendor Attribute N (see man page)\n\n" " -F TYPE, --firmwarebug=TYPE (ATA)\n" @@ -201,7 +201,7 @@ void Usage (void){ " -H Show device SMART health status\n" " -c Show device SMART capabilities (ATA)\n" " -A Show device SMART vendor-specific Attributes and values (ATA)\n" -" -l TYPE Show device log. Type is one of: error, selftest, directory\n" +" -l TYPE Show device log. TYPE: error,selftest,selective,directory\n" " -v N,OPT Set display OPTion for vendor Attribute N (see man page) (ATA)\n" " -F TYPE Use firmware bug workaround: none, samsung, samsung2 (ATA)\n" " -P TYPE Drive-specific presets: use, ignore, show, showall (ATA)\n\n" @@ -247,7 +247,7 @@ const char *getvalidarglist(char opt) { case 'S': return "on, off"; case 'l': - return "error, selftest, directory"; + return "error, selftest, selective, directory"; case 'P': return "use, ignore, show, showall"; case 't': @@ -518,6 +518,8 @@ void ParseOpts (int argc, char** argv){ con->smarterrorlog = TRUE; } else if (!strcmp(optarg,"selftest")) { con->smartselftestlog = TRUE; + } else if (!strcmp(optarg, "selective")) { + con->selectivetestlog = TRUE; } else if (!strcmp(optarg,"directory")) { con->smartlogdirectory = TRUE; } else { @@ -534,6 +536,7 @@ void ParseOpts (int argc, char** argv){ con->smartvendorattrib = TRUE; con->smarterrorlog = TRUE; con->smartselftestlog = TRUE; + con->selectivetestlog = TRUE; break; case 'v': // parse vendor-specific definitions of attributes diff --git a/sm5/smartctl.cpp b/sm5/smartctl.cpp index a87673b2c468de6d91369c67f011432918045f9c..ff183f336b8bcd20b689cc84394dc0d6f7a2f5e4 100644 --- a/sm5/smartctl.cpp +++ b/sm5/smartctl.cpp @@ -48,7 +48,7 @@ extern const char *os_solaris_ata_s_cvsid; extern const char *int64_vc6_c_cvsid; #endif extern const char *atacmdnames_c_cvsid, *atacmds_c_cvsid, *ataprint_c_cvsid, *knowndrives_c_cvsid, *os_XXXX_c_cvsid, *scsicmds_c_cvsid, *scsiprint_c_cvsid, *utility_c_cvsid; -const char* smartctl_c_cvsid="$Id: smartctl.cpp,v 1.123 2004/03/25 15:39:25 ballen4705 Exp $" +const char* smartctl_c_cvsid="$Id: smartctl.cpp,v 1.124 2004/04/17 11:57:43 ballen4705 Exp $" ATACMDS_H_CVSID ATAPRINT_H_CVSID CONFIG_H_CVSID EXTERN_H_CVSID INT64_H_CVSID KNOWNDRIVES_H_CVSID SCSICMDS_H_CVSID SCSIPRINT_H_CVSID SMARTCTL_H_CVSID UTILITY_H_CVSID; // This is a block containing all the "control variables". We declare @@ -188,7 +188,7 @@ void Usage (void){ " -A, --attributes (ATA)\n" " Show device SMART vendor-specific Attributes and values\n\n" " -l TYPE, --log=TYPE\n" -" Show device log. Type is one of: error, selftest, directory\n\n" +" Show device log. TYPE: error, selftest, selective, directory\n\n" " -v N,OPTION , --vendorattribute=N,OPTION (ATA)\n" " Set display OPTION for vendor Attribute N (see man page)\n\n" " -F TYPE, --firmwarebug=TYPE (ATA)\n" @@ -201,7 +201,7 @@ void Usage (void){ " -H Show device SMART health status\n" " -c Show device SMART capabilities (ATA)\n" " -A Show device SMART vendor-specific Attributes and values (ATA)\n" -" -l TYPE Show device log. Type is one of: error, selftest, directory\n" +" -l TYPE Show device log. TYPE: error,selftest,selective,directory\n" " -v N,OPT Set display OPTion for vendor Attribute N (see man page) (ATA)\n" " -F TYPE Use firmware bug workaround: none, samsung, samsung2 (ATA)\n" " -P TYPE Drive-specific presets: use, ignore, show, showall (ATA)\n\n" @@ -247,7 +247,7 @@ const char *getvalidarglist(char opt) { case 'S': return "on, off"; case 'l': - return "error, selftest, directory"; + return "error, selftest, selective, directory"; case 'P': return "use, ignore, show, showall"; case 't': @@ -518,6 +518,8 @@ void ParseOpts (int argc, char** argv){ con->smarterrorlog = TRUE; } else if (!strcmp(optarg,"selftest")) { con->smartselftestlog = TRUE; + } else if (!strcmp(optarg, "selective")) { + con->selectivetestlog = TRUE; } else if (!strcmp(optarg,"directory")) { con->smartlogdirectory = TRUE; } else { @@ -534,6 +536,7 @@ void ParseOpts (int argc, char** argv){ con->smartvendorattrib = TRUE; con->smarterrorlog = TRUE; con->smartselftestlog = TRUE; + con->selectivetestlog = TRUE; break; case 'v': // parse vendor-specific definitions of attributes