OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / smartmontools / original / man8 / smartctl.8
1 .ig
2  Copyright (C) 2002-4 Bruce Allen <smartmontools-support@lists.sourceforge.net>
3
4  $Id: smartctl.8.in,v 1.64 2004/09/10 04:13:41 ballen4705 Exp $
5  
6  This program is free software; you can redistribute it and/or modify it
7  under the terms of the GNU General Public License as published by the Free
8  Software Foundation; either version 2, or (at your option) any later
9  version.
10  
11  You should have received a copy of the GNU General Public License (for
12  example COPYING); if not, write to the Free Software Foundation, Inc., 675
13  Mass Ave, Cambridge, MA 02139, USA.
14
15  This code was originally developed as a Senior Thesis by Michael Cornwell
16  at the Concurrent Systems Laboratory (now part of the Storage Systems
17  Research Center), Jack Baskin School of Engineering, University of
18  California, Santa Cruz. http://ssrc.soe.ucsc.edu/
19
20 ..
21 .TH SMARTCTL 8 CURRENT_CVS_DATE CURRENT_CVS_VERSION CURRENT_CVS_DATE
22 .SH NAME
23 \fBsmartctl\fP \- Control and Monitor Utility for SMART Disks
24
25 .SH SYNOPSIS
26 .B smartctl [options] device
27
28 .SH FULL PATH
29 .B /usr/local/sbin/smartctl
30
31 .SH PACKAGE VERSION
32 CURRENT_CVS_VERSION released CURRENT_CVS_DATE at CURRENT_CVS_TIME
33
34 .SH DESCRIPTION
35 \fBsmartctl\fP controls the Self\-Monitoring, Analysis and Reporting
36 Technology (SMART) system built into many ATA\-3 and later ATA, IDE and
37 SCSI\-3 hard drives. The purpose of SMART is to monitor the reliability
38 of the hard drive and predict drive failures, and to carry out
39 different types of drive self\-tests.  This version of \fBsmartctl\fP
40 is compatible with ATA/ATAPI\-7 and earlier standards (see REFERENCES
41 below)
42
43 \fBsmartctl\fP is a command line utility designed to perform SMART
44 tasks such as printing the SMART self\-test and error logs, enabling
45 and disabling SMART automatic testing, and initiating device
46 self\-tests. Note: if the user issues a SMART command that is
47 (apparently) not implemented by the device, \fBsmartctl\fP will print
48 a warning message but issue the command anyway (see the \fB\-T,
49 \-\-tolerance\fP option below).  This should not cause problems: on
50 most devices, unimplemented SMART commands issued to a drive are
51 ignored and/or return an error.
52
53 \fBsmartctl\fP also provides support for polling TapeAlert messages
54 from SCSI tape drives and changers.
55
56 The user must specify the device to be controlled or interrogated as
57 the final argument to \fBsmartctl\fP.  Device paths are as follows:
58 .IP \fBLINUX\fP: 9
59 Use the forms \fB"/dev/hd[a\-t]"\fP for IDE/ATA
60 devices, and \fB"/dev/sd[a\-z]"\fP for SCSI devices. For
61 SCSI Tape Drives and Changers with TapeAlert support use the devices
62 \fB"/dev/nst*"\fP and \fB"/dev/sg*"\fP. 
63 More general paths (such as devfs ones) may also be specified.
64 .IP \fBDARWIN\fP: 9
65 Use the forms \fB/dev/disk[0\-9]\fP or equivalently \fBdisk[0\-9]\fP or equivalently
66 \fB/dev/rdisk[0\-9]\fP.  Long forms are also available: please use \'\-h\' to see some
67 examples. Note that there is currently no Darwin SCSI support.
68 .IP \fBFREEBSD\fP: 9
69 Use the forms \fB"/dev/ad[0\-9]+"\fP for IDE/ATA
70 devices and \fB"/dev/da[0\-9]+"\fP for SCSI devices.
71 .IP \fBNETBSD/OPENBSD\fP: 9
72 Use the form \fB"/dev/wd[0\-9]+c"\fP for IDE/ATA
73 devices.  For SCSI disk and tape devices, use the device names
74 \fB"/dev/sd[0\-9]+c"\fP and \fB"/dev/st[0\-9]+c"\fP respectively.  
75 Be sure to specify the correct "whole disk" partition letter for 
76 your architecture.
77 .IP \fBSOLARIS\fP: 9
78 Use the forms \fB"/dev/rdsk/c?t?d?s?"\fP for IDE/ATA and SCSI disk
79 devices, and \fB"/dev/rmt/*"\fP for SCSI tape devices.
80 .IP \fBWINDOWS\fP: 9
81 Use the forms \fB"/dev/hd[a\-j]"\fP for IDE/ATA devices
82 "\\\\.\\PhysicalDrive[0\-9]" on WinNT4/2000/XP,
83 \fB"/dev/hd[a\-d]"\fP for standard IDE/ATA devices on Win95/98/98SE/ME,
84 and \fB"/dev/scsi[0\-9][0\-f]"\fP for SCSI devices on ASPI adapter 0\-9, ID 0\-15.
85 The prefix \fB"/dev/"\fP is optional.
86 .IP \fBCYGWIN\fP: 9
87 See "WINDOWS" above.
88 .PP
89 Based on the device path, \fBsmartctl\fP will guess the device type
90 (ATA or SCSI).  If necessary, the \'\-d\' option can be used to over\-ride
91 this guess
92
93 Note that the printed output of \fBsmartctl\fP displays most numerical
94 values in base 10 (decimal), but some values are displayed in base 16
95 (hexidecimal).  To distinguish them, the base 16 values are always
96 displayed with a leading \fB"0x"\fP, for example: "0xff". This man
97 page follows the same convention.
98
99 .PP
100 .SH OPTIONS
101 .PP
102 The options are grouped below into several categories.  \fBsmartctl\fP
103 will execute the corresponding commands in the order: INFORMATION,
104 ENABLE/DISABLE, DISPLAY DATA, RUN/ABORT TESTS.
105
106 SCSI devices only accept the options \fB\-h, \-V, \-i, \-a, \-A, \-d,
107 \-s, \-S,\-H, \-t, \-C, \-l selftest, \-l error, \-r,\fP and
108 \fB\-X\fP.  TapeAlert devices only accept the options \fB\-h, \-V,
109 \-i, \-a, \-A, \-d, \-s, \-S, \-t, \-l selftest, \-l error, \-r,\fP
110 and \fB\-H\fP.
111
112 Long options  are  not  supported  on  all  systems.   Use
113 .B \'smartctl \-h\'
114 to see the available options.
115
116 .TP
117 .B SHOW INFORMATION OPTIONS:
118 .TP
119 .B \-h, \-\-help, \-\-usage
120 Prints a usage message to STDOUT and exits.
121 .TP
122 .B \-V, \-\-version, \-\-copyright, \-\-license
123 Prints version, copyright, license, home page and CVS\-id information
124 for your copy of \fBsmartctl\fP to STDOUT and then exits.  Please
125 include this information if you are reporting bugs or problems.
126 .TP
127 .B \-i, \-\-info
128 Prints the device model number, serial number, firmware version, and
129 ATA Standard version/revision information.  Says if the device
130 supports SMART, and if so, whether SMART support is currently enabled
131 or disabled.  If the device supports Logical Block Address mode (LBA
132 mode) print current user drive capacity in bytes. (If drive is has a
133 user protected area reserved, or is "clipped", this may be smaller
134 than the potential maximum drive capacity.)
135 .TP
136 .B \-a, \-\-all
137 Prints all SMART information about the disk, or TapeAlert information
138 about the tape drive or changer.  For ATA devices this is equivalent
139 to
140 .nf
141 \'\-H \-i \-c \-A \-l error \-l selftest -l selective\'
142 .fi
143 and for SCSI, this is equivalent to
144 .nf
145 \'\-H \-i \-A \-l error \-l selftest\'.
146 .fi
147 Note that for ATA disks this does \fBnot\fP enable the \'\-l
148 directory\' option.
149
150 .TP
151 .B RUN\-TIME BEHAVIOR OPTIONS:
152 .TP
153 .B \-q TYPE, \-\-quietmode=TYPE
154 Specifies that \fBsmartctl\fP should run in one of the two quiet modes
155 described here.  The valid arguments to this option are:
156
157 .I errorsonly
158 \- only print: For the \'\-l error\' option, if nonzero, the number
159 of errors recorded in the SMART error log and the power\-on time when
160 they occurred; For the \'\-l selftest\' option, errors recorded in the device
161 self\-test log; For the \'\-H\' option, SMART "disk failing" status or device
162 Attributes (pre\-failure or usage) which failed either now or in the
163 past; For the \'\-A\' option, device Attributes (pre\-failure or usage)
164 which failed either now or in the past.
165
166 .I silent
167 \- print no output.  The only way to learn about what was found is to
168 use the exit status of \fBsmartctl\fP (see RETURN VALUES below).
169 .TP
170 .B \-d TYPE, \-\-device=TYPE
171 Specifies the type of the device.  The valid arguments to this option
172 are \fIata\fP, \fIscsi\fP, and \fI3ware,N\fP. If this option is not
173 used then \fBsmartctl\fP will attempt to guess the device type from
174 the device name.
175
176 To look at ATA disks behind 3ware SCSI RAID controllers, use syntax
177 such as:
178 .nf
179 \fBsmartctl \-a \-d 3ware,2 /dev/sda\fP
180 .fi
181 .nf
182 \fBsmartctl \-a \-d 3ware,0 /dev/twe0\fP
183 .fi
184 .nf
185 \fBsmartctl \-a \-d 3ware,1 /dev/twa0\fP
186 .fi
187 where in the argument \fI3ware,N\fP, the integer N is the disk number
188 (3ware \'port\') within the 3ware ATA RAID controller.  The allowed
189 values of N are from 0 to 15 inclusive.  The first two forms, which
190 refer to devices /dev/sda-z and /dev/twe0-15, may be used with 3ware
191 series 6000, 7000, and 8000 series controllers that use the 3x-xxxx
192 driver.  The final form, which refers to devices /dev/twa0-15, must be
193 used with 3ware 9000 series controllers, which use the 3w-9xxx driver.
194
195 Note that if the special character device nodes /dev/twa? and
196 /dev/twe? do not exist, or exist with the incorrect major or minor
197 numbers, smartctl will recreate them on the fly.  Typically /dev/twa0
198 refers to the first 9000-series controller, /dev/twa1 refers to the
199 second 9000 series controller, and so on. Likewise /dev/twe0 refers to
200 the first 6/7/8000-series controller, /dev/twa1 refers to the second
201 6/7/8000 series controller, and so on.
202
203 Note that for the 6/7/8000 controllers, \fBany\fP of the physical
204 disks can be queried or examined using \fBany\fP of the 3ware's SCSI
205 logical device /dev/sd?  entries.  Thus, if logical device /dev/sda is
206 made up of two physical disks (3ware ports zero and one) and logical
207 device /dev/sdb is made up of two other physical disks (3ware ports
208 two and three) then you can examine the SMART data on \fBany\fP of the
209 four physical disks using \fBeither\fP SCSI device /dev/sda \fBor\fP
210 /dev/sdb.  If you need to know which logical SCSI device a particular
211 physical disk (3ware port) is associated with, use the dmesg or SYSLOG
212 output to show which SCSI ID corresponds to a particular 3ware unit,
213 and then use the 3ware CLI or 3dm tool to determine which ports
214 (physical disks) correspond to particular 3ware units.
215
216 If the value of N corresponds to a port that does \fBnot\fP exist on
217 the 3ware controller, or to a port that does not physically have a
218 disk attached to it, the behavior of \fBsmartctl\fP depends upon the
219 specific controller model, firmware, Linux kernel and platform.  In
220 some cases you will get a warning message that the device does not
221 exist. In other cases you will be presented with \'void\' data for a
222 non\-existent device.
223
224 Note that if the /dev/sd? addressing form is used, then older 3w\-xxxx
225 drivers do not pass the "Enable Autosave"
226 (\'\fB\-S on\fP\') and "Enable Automatic Offline" (\'\fB\-o on\fP\')
227 commands to the disk, and produce these types of harmless syslog error
228 messages instead: "\fB3w\-xxxx: tw_ioctl(): Passthru size (123392) too
229 big\fP". This can be fixed by upgrading to version 1.02.00.037 or
230 later of the 3w\-xxxx driver, or by applying a patch to older
231 versions. See \fBhttp://smartmontools.sourceforge.net/\fP for
232 instructions.  Alternatively, use the character device /dev/twe0-15 interface.
233
234 The selective self\-test functions (\'\-t select,A\-B\') are only supported
235 using the character device interface /dev/twa0\-15 and /dev/twe0\-15.
236 The necessary WRITE LOG commands can not be passed through the SCSI
237 interface.
238
239 .B 3ware controllers are currently ONLY supported under Linux and FreeBSD.
240
241 .TP
242 .B \-T TYPE, \-\-tolerance=TYPE
243 Specifies how tolerant \fBsmartctl\fP should be of ATA and SMART command
244 failures. 
245
246 The behavior of \fBsmartctl\fP depends upon whether the command is
247 "\fBoptional\fP" or "\fBmandatory\fP". Here "\fBmandatory\fP" means
248 "required by the ATA/ATAPI\-5 Specification if the device implements
249 the SMART command set" and "\fBoptional\fP" means "not required by the
250 ATA/ATAPI\-5 Specification even if the device implements the SMART
251 command set."  The "\fBmandatory\fP" ATA and SMART commands are: (1)
252 ATA IDENTIFY DEVICE, (2) SMART ENABLE/DISABLE ATTRIBUTE AUTOSAVE, (3)
253 SMART ENABLE/DISABLE, and (4) SMART RETURN STATUS.
254
255 The valid arguments to this option are:
256
257 .I normal
258 \- exit on failure of any \fBmandatory\fP SMART command, and ignore
259 all failures of \fBoptional\fP SMART commands.  This is the default.
260 Note that on some devices, issuing unimplemented optional SMART
261 commands doesn\'t cause an error.  This can result in misleading
262 \fBsmartctl\fP messages such as "Feature X not implemented", followed
263 shortly by "Feature X: enabled".  In most such cases, contrary to the
264 final message, Feature X is \fBnot\fP enabled.
265
266 .I conservative
267 \- exit on failure of any \fBoptional\fP SMART command.
268
269 .I permissive
270 \- ignore failure(s) of \fBmandatory\fP SMART commands.  This option
271 may be given more than once.  Each additional use of this option will
272 cause one more additional failure to be ignored.  Note that the use of
273 this option can lead to messages like "Feature X not implemented",
274 followed shortly by "Error: unable to enable Feature X".  In a few
275 such cases, contrary to the final message, Feature X \fBis\fP enabled.
276
277 .I verypermissive
278 \- equivalent to giving a large number of \'\-T permissive\' options:
279 ignore failures of \fBany number\fP of \fBmandatory\fP SMART commands.
280 Please see the note above.
281
282 .TP
283 .B \-b TYPE, \-\-badsum=TYPE
284 Specifies the action \fBsmartctl\fP should take if a checksum error is
285 detected in the: (1) Device Identity Structure, (2) SMART Self\-Test
286 Log Structure, (3) SMART Attribute Value Structure, (4) SMART
287 Attribute Threshold Structure, or (5) ATA Error Log Structure.
288
289 The valid arguments to this option are:
290
291 .I warn
292 \- report the incorrect checksum but carry on in spite of it.  This is the
293 default.
294
295 .I exit
296 \- exit \fBsmartctl\fP.
297
298 .I ignore
299 \- continue silently without issuing a warning.
300
301 .TP
302 .B \-r TYPE, \-\-report=TYPE
303 Intended primarily to help \fBsmartmontools\fP developers understand
304 the behavior of \fBsmartmontools\fP on non\-conforming or poorly
305 conforming hardware.  This option reports details of \fBsmartctl\fP
306 transactions with the device.  The option can be used multiple times.
307 When used just once, it shows a record of the ioctl() transactions
308 with the device.  When used more than once, the detail of these
309 ioctl() transactions are reported in greater detail.  The valid
310 arguments to this option are:
311
312 .I ioctl
313 \- report all ioctl() transactions.
314
315 .I ataioctl
316 \- report only ioctl() transactions with ATA devices.
317
318 .I scsiioctl
319 \- report only ioctl() transactions with SCSI devices. Invoking this once
320 shows the SCSI commands in hex and the corresponding status. Invoking
321 it a second time adds a hex listing of the first 64 bytes of data send to, 
322 or received from the device.
323
324 Any argument may include a positive integer to specify the level of detail
325 that should be reported.  The argument should be followed by a comma then
326 the integer with no spaces.  For example, 
327 .I ataioctl,2
328 The default
329 level is 1, so \'\-r ataioctl,1\' and \'\-r ataioctl\' are equivalent.
330
331 .TP
332 .B SMART FEATURE ENABLE/DISABLE COMMANDS:
333 .IP
334 .B Note: 
335 if multiple options are used to both enable and disable a
336 feature, then 
337 .B both
338 the enable and disable commands will be issued.  The enable command
339 will always be issued
340 .B before
341 the corresponding disable command.
342 .TP
343 .B \-s VALUE, \-\-smart=VALUE 
344 Enables or disables SMART on device.  The valid arguments to
345 this option are \fIon\fP and \fIoff\fP.  Note that the command \'\-s on\'
346 (perhaps used with with the \'\-o on\' and \'\-S on\' options) should be placed
347 in a start\-up script for your machine, for example in rc.local or rc.sysinit.
348 In principle the SMART feature settings are preserved over
349 power\-cycling, but it doesn\'t hurt to be sure. It is not necessary (or
350 useful) to enable SMART to see the TapeAlert messages.
351 .TP
352 .B \-o VALUE, \-\-offlineauto=VALUE
353 Enables or disables SMART automatic offline test, which scans the drive
354 every four hours for disk defects. This command can be given during normal
355 system operation.  The valid arguments to this option are \fIon\fP
356 and \fIoff\fP.
357
358 Note that the SMART automatic offline test command is listed as
359 "Obsolete" in every version of the ATA and ATA/ATAPI Specifications.
360 It was originally part of the SFF\-8035i Revision 2.0 specification,
361 but was never part of any ATA specification.  However it is
362 implemented and used by many vendors. [Good documentation can be found
363 in IBM\'s Official Published Disk Specifications.  For example the IBM
364 Travelstar 40GNX Hard Disk Drive Specifications (Revision 1.1, 22
365 April 2002, Publication # 1541, Document S07N\-7715\-02) page 164. You
366 can also read the SFF\-8035i Specification \-\- see REFERENCES below.]
367 You can tell if automatic offline testing is supported by seeing if
368 this command enables and disables it, as indicated by the \'Auto
369 Offline Data Collection\' part of the SMART capabilities report
370 (displayed with \'\-c\').
371
372 SMART provides \fBthree\fP basic categories of testing.  The
373 \fBfirst\fP category, called "online" testing, has no effect on the
374 performance of the device.  It is turned on by the \'\-s on\' option.
375
376 The \fBsecond\fP category of testing is called "offline" testing. This
377 type of test can, in principle, degrade the device performance.  The
378 \'\-o on\' option causes this offline testing to be carried out,
379 automatically, on a regular scheduled basis.  Normally, the disk will
380 suspend offline testing while disk accesses are taking place, and then
381 automatically resume it when the disk would otherwise be idle, so in
382 practice it has little effect.  Note that a one\-time offline test can
383 also be carried out immediately upon receipt of a user command.  See
384 the \'\-t offline\' option below, which causes a one\-time offline test
385 to be carried out immediately.
386
387 The choice (made by the SFF\-8035i and ATA specification authors) of
388 the word \fItesting\fP for these first two categories is unfortunate,
389 and often leads to confusion.  In fact these first two categories of
390 online and offline testing could have been more accurately described
391 as online and offline \fBdata collection\fP.
392
393 The results of this automatic or immediate offline testing (data
394 collection) are reflected in the values of the SMART Attributes.
395 Thus, if problems or errors are detected, the values of these
396 Attributes will go below their failure thresholds; some types of
397 errors may also appear in the SMART error log. These are visible with
398 the \'\-A\' and \'\-l error\' options respectively.
399
400 Some SMART attribute values are updated only during off\-line data
401 collection activities; the rest are updated during normal operation of
402 the device or during both normal operation and off\-line testing.  The
403 Attribute value table produced by the \'\-A\' option indicates this in
404 the UPDATED column.  Attributes of the first type are labeled
405 "Offline" and Attributes of the second type are labeled "Always".
406
407 The \fBthird\fP category of testing (and the \fIonly\fP category for
408 which the word \'testing\' is really an appropriate choice) is "self"
409 testing.  This third type of test is only performed (immediately) when
410 a command to run it is issued.  The \'\-t\' and \'\-X\' options can be
411 used to carry out and abort such self\-tests; please see below for
412 further details.
413
414 Any errors detected in the self testing will be shown in the
415 SMART self\-test log, which can be examined using the \'\-l selftest\'
416 option.
417
418 \fBNote:\fP in this manual page, the word \fB"Test"\fP is used in
419 connection with the second category just described, e.g. for the
420 "offline" testing.  The words \fB"Self\-test"\fP are used in
421 connection with the third category.
422 .TP
423 .B \-S VALUE, \-\-saveauto=VALUE
424 Enables or disables SMART autosave of device vendor\-specific
425 Attributes. The valid arguments to this option are \fIon\fP
426 and \fIoff\fP.  Note that this feature is preserved across disk power
427 cycles, so you should only need to issue it once.
428
429 For SCSI devices this toggles the value of the Global Logging Target
430 Save Disabled (GLTSD) bit in the Control Mode Page. Some disk
431 manufacturers set this bit by default. This prevents error counters,
432 power\-up hours and other useful data from being placed in non\-volatile
433 storage, so these values may be reset to zero the next time the device
434 is power\-cycled.  If the GLTSD bit is set then \'smartctl \-a\' will
435 issue a warning. Use \fIon\fP to clear the GLTSD bit and thus enable
436 saving counters to non\-volatile storage. For extreme streaming\-video
437 type applications you might consider using \fIoff\fP to set the GLTSD
438 bit.
439
440 .TP
441 .B SMART READ AND DISPLAY DATA OPTIONS:
442 .TP
443 .B \-H, \-\-health
444 Check: Ask the device to report its SMART health status or pending
445 TapeAlert messages.  SMART status is based on
446 information that it has gathered from online and offline
447 tests, which were used to determine/update its
448 SMART vendor\-specific Attribute values. TapeAlert status is obtained
449 by reading the TapeAlert log page.
450
451 If the device reports failing health status, this means
452 .B either
453 that the device has already failed, 
454 .B or 
455 that it is predicting its own failure within the next 24 hours.  If
456 this happens, use the \'\-a\' option to get more information, and
457 .B get your data off the disk and someplace safe as soon as you can.
458 .TP
459 .B \-c, \-\-capabilities
460 Prints only the generic SMART capabilities.  These show
461 what SMART features are implemented and how the device will
462 respond to some of the different SMART commands.  For example it
463 shows if the device logs errors, if it supports offline surface
464 scanning, and so on.  If the device can carry out self\-tests, this
465 option also shows the estimated time required to run those tests.
466
467 Note that the time required to run the Self\-tests (listed in minutes)
468 are fixed.  However the time required to run the Immediate Offline
469 Test (listed in seconds) is variable.  This means that if you issue a
470 command to perform an Immediate Offline test with the \'\-t offline\' option,
471 then the time may jump to a larger value and then count down as the
472 Immediate Offline Test is carried out.  Please see REFERENCES below
473 for further information about the the flags and capabilities described
474 by this option.
475 .TP
476 .B \-A, \-\-attributes
477 Prints only the vendor specific SMART Attributes.  The Attributes are
478 numbered from 1 to 253 and have specific names and ID numbers. For
479 example Attribute 12 is "power cycle count": how many times has the
480 disk been powered up.
481
482 Each Attribute has a "Raw" value, printed under the heading
483 "RAW_VALUE", and a "Normalized" value printed under the heading
484 "VALUE".  [Note: \fBsmartctl\fP prints these values in base\-10.]  In
485 the example just given, the "Raw Value" for Attribute 12 would be the
486 actual number of times that the disk has been power\-cycled, for
487 example 365 if the disk has been turned on once per day for exactly
488 one year.  Each vendor uses their own algorithm to convert this "Raw"
489 value to a "Normalized" value in the range from 1 to 254.  Please keep
490 in mind that \fBsmartctl\fP only reports the different Attribute
491 types, values, and thresholds as read from the device.  It does
492 \fBnot\fP carry out the conversion between "Raw" and "Normalized"
493 values: this is done by the disk\'s firmware.
494
495 The conversion from Raw value to a quantity with physical units is
496 not specified by the SMART standard. In most cases, the values printed
497 by \fBsmartctl\fP are sensible.  For example the temperature Attribute
498 generally has its raw value equal to the temperature in Celsius.
499 However in some cases vendors use unusual conventions.  For example
500 the Hitachi disk on my laptop reports its power\-on hours in minutes,
501 not hours. Some IBM disks track three temperatures rather than one, in
502 their raw values.  And so on.
503
504 Each Attribute also has a Threshold value (whose range is 0 to 255)
505 which is printed under the heading "THRESH".  If the Normalized value
506 is \fBless than or equal to\fP the Threshold value, then the Attribute
507 is said to have failed.  If the Attribute is a pre\-failure Attribute,
508 then disk failure is imminent.
509
510 Each Attribute also has a "Worst" value shown under the heading
511 "WORST".  This is the smallest (closest to failure) value that the
512 disk has recorded at any time during its lifetime when SMART was
513 enabled.  [Note however that some vendors firmware may actually
514 \fBincrease\fP the "Worst" value for some "rate\-type" Attributes.]
515
516 The Attribute table printed out by \fBsmartctl\fP also shows the
517 "TYPE" of the Attribute. Attributes are one of two possible types:
518 Pre\-failure or Old age.  Pre\-failure Attributes are ones which, if
519 less than or equal to their threshold values, indicate pending disk
520 failure.  Old age, or usage Attributes, are ones which indicate
521 end\-of\-product life from old\-age or normal aging and wearout, if
522 the Attribute value is less than or equal to the threshold.  \fBPlease
523 note\fP: the fact that an Attribute is of type 'Pre\-fail' does
524 \fBnot\fP mean that your disk is about to fail!  It only has this
525 meaning if the Attribute\'s current Normalized value is less than or
526 equal to the threshold value.
527
528 If the Attribute\'s current Normalized value is less than or equal to
529 the threshold value, then the "WHEN_FAILED" column will display
530 "FAILING_NOW". If not, but the worst recorded value is less than or
531 equal to the threshold value, then this column will display
532 "In_the_past".  If the "WHEN_FAILED" column has no entry (indicated by
533 a dash: \'\-\') then this Attribute is OK now (not failing) and has
534 also never failed in the past.
535
536 The table column labeled "UPDATED" shows if the SMART Attribute values
537 are updated during both normal operation and off\-line testing, or
538 only during offline testing.  The former are labeled "Always" and the
539 latter are labeled "Offline".
540
541 So to summarize: the Raw Attribute values are the ones that might have
542 a real physical interpretation, such as "Temperature Celsius",
543 "Hours", or "Start\-Stop Cycles".  Each manufacturer converts these,
544 using their detailed knowledge of the disk\'s operations and failure
545 modes, to Normalized Attribute values in the range 1\-254.  The
546 current and worst (lowest measured) of these Normalized Attribute
547 values are stored on the disk, along with a Threshold value that the
548 manufacturer has determined will indicate that the disk is going to
549 fail, or that it has exceeded its design age or aging limit.
550 \fBsmartctl\fP does \fBnot\fP calculate any of the Attribute values,
551 thresholds, or types, it merely reports them from the SMART data on
552 the device.
553
554 Note that starting with ATA/ATAPI\-4, revision 4, the meaning of these
555 Attribute fields has been made entirely vendor\-specific.  However most
556 ATA/ATAPI\-5 disks seem to respect their meaning, so we have retained
557 the option of printing the Attribute values.
558
559 For SCSI devices the "attributes" are obtained from the temperature
560 and start-stop cycle counter log pages. Certain vendor specific
561 attributes are listed if recognised. The attributes are output in a
562 relatively free format (compared with ATA disk attributes).
563 .TP
564 .B \-l TYPE, \-\-log=TYPE
565 Prints either the SMART Error Log, the SMART Self\-Test Log, the SMART
566 Selective Self\-Test Log [ATA only], or the Log Directory [ATA only].
567 The valid arguments to this option are:
568
569 .I error
570 \- prints only the SMART error log.  SMART disks maintain a log of the
571 most recent five non\-trivial errors. For each of these errors, the
572 disk power\-on lifetime at which the error occurred is recorded, as is
573 the device status (idle, standby, etc) at the time of the error.  For
574 some common types of errors, the Error Register (ER) and Status
575 Register (SR) values are decoded and printed as text. The meanings of these
576 are:
577 .nf
578    \fBABRT\fP:  Command \fBAB\fPo\fBRT\fPed
579    \fBAMNF\fP:  \fBA\fPddress \fBM\fPark \fBN\fPot \fBF\fPound
580    \fBCCTO\fP:  \fBC\fPommand \fBC\fPompletion \fBT\fPimed \fBO\fPut
581    \fBEOM\fP:   \fBE\fPnd \fBO\fPf \fBM\fPedia
582    \fBICRC\fP:  \fBI\fPnterface \fBC\fPyclic \fBR\fPedundancy \fBC\fPode (CRC) error
583    \fBIDNF\fP:  \fBID\fPentity \fBN\fPot \fBF\fPound
584    \fBILI\fP:   (packet command\-set specific)
585    \fBMC\fP:    \fBM\fPedia \fBC\fPhanged
586    \fBMCR\fP:   \fBM\fPedia \fBC\fPhange \fBR\fPequest
587    \fBNM\fP:    \fBN\fPo \fBM\fPedia
588    \fBobs\fP:   \fBobs\fPolete
589    \fBTK0NF\fP: \fBT\fPrac\fBK 0 N\fPot \fBF\fPound
590    \fBUNC\fP:   \fBUNC\fPorrectable Error in Data
591    \fBWP\fP:    Media is \fBW\fPrite \fBP\fProtected
592 .fi
593 In addition, up to the last five commands that preceded the error are
594 listed, along with a timestamp measured from the start of the
595 corresponding power cycle. This is displayed in the form
596 Dd+HH:MM:SS.msec where D is the number of days, HH is hours, MM is
597 minutes, SS is seconds and msec is milliseconds.  [Note: this time
598 stamp wraps after 2^32 milliseconds, or 49 days 17 hours 2 minutes and
599 47.296 seconds.]  The key ATA disk registers are also recorded in the
600 log.  The final column of the error log is a text\-string description
601 of the ATA command defined by the Command Register (CR) and Feature
602 Register (FR) values.  Commands that are obsolete in the most current
603 (ATA\-7) spec are listed like this: \fBREAD LONG (w/ retry) [OBS\-4]\fP,
604 indicating that the command became obsolete with or in the ATA\-4
605 specification.  Similarly, the notation \fB[RET\-\fP\fIN\fP\fB]\fP is
606 used to indicate that a command was retired in the ATA\-\fIN\fP
607 specification.  Some commands are not defined in any version of the
608 ATA specification but are in common use nonetheless; these are marked
609 \fB[NS]\fP, meaning non\-standard.
610
611 The ATA Specification (ATA\-5 Revision 1c, Section 8.41.6.8.2) says:
612 \fB"Error log structures shall include UNC errors, IDNF errors for
613 which the address requested was valid, servo errors, write fault
614 errors, etc.  Error log data structures shall not include errors
615 attributed to the receipt of faulty commands such as command codes not
616 implemented by the device or requests with invalid parameters or
617 invalid addresses."\fP The definitions of these terms are:
618 .br
619 \fBUNC\fP (\fBUNC\fPorrectable): data is uncorrectable.  This refers
620 to data which has been read from the disk, but for which the Error
621 Checking and Correction (ECC) codes are inconsistent.  In effect, this
622 means that the data can not be read.
623 .br
624 \fBIDNF\fP (\fBID N\fPot \fBF\fPound): user\-accessible address could
625 not be found. For READ LOG type commands, \fBIDNF\fP can also indicate
626 that a device data log structure checksum was incorrect.
627
628 If the command that caused the error was a READ or WRITE command, then
629 the Logical Block Address (LBA) at which the error occurred will be
630 printed in base 10 and base 16.  The LBA is a linear address, which
631 counts 512\-byte sectors on the disk, starting from zero.  (Because of
632 the limitations of the SMART error log, if the LBA is greater than
633 0xfffffff, then either no error log entry will be made, or the error
634 log entry will have an incorrect LBA. This may happen for drives with
635 a capacity greater than 128 GiB or 137 GB.) On Linux systems the
636 smartmontools web page has instructions about how to convert the LBA
637 address to the name of the disk file containing the erroneous disk
638 sector.
639
640 Please note that some manufacturers \fBignore\fP the ATA
641 specifications, and make entries in the error log if the device
642 receives a command which is not implemented or is not valid.
643
644 .I error [SCSI]
645 \- prints the error counter log pages for reads, write and verifies.
646 The verify row is only output if it has an element other than zero.
647
648 .I selftest
649 \- prints the SMART self\-test log.  The disk maintains a self\-test log
650 showing the results of the self tests, which can be run using the
651 \'\-t\' option described below.  For each of the most recent
652 twenty\-one self\-tests, the log shows the type of test (short or
653 extended, off\-line or captive) and the final status of the test.  If
654 the test did not complete successfully, then the percentage of the
655 test remaining is shown.  The time at which the test took place,
656 measured in hours of disk lifetime, is also printed.  If any errors
657 were detected, the Logical Block Address (LBA) of the first error is
658 printed in decimal notation. On Linux systems the smartmontools
659 web page has instructions about how to convert this LBA address to the
660 name of the disk file containing the erroneous block.
661
662 .I selftest [SCSI]
663 \- the self\-test log for a SCSI device has a slightly different format
664 than for an ATA device.  For each of the most recent twenty
665 self\-tests, it shows the type of test and the status (final or in
666 progress) of the test. SCSI standards use the terms "foreground" and
667 "background" (rather than ATA\'s corresponding "captive" and
668 "off\-line") and "short" and "long" (rather than ATA\'s corresponding
669 "short" and "extended") to describe the type of the test.  The printed
670 segment number is only relevant when a test fails in the third or
671 later test segment.  It identifies the test that failed and consists
672 of either the number of the segment that failed during the test, or
673 the number of the test that failed and the number of the segment in
674 which the test was run, using a vendor\-specific method of putting both
675 numbers into a single byte.  The Logical Block Address (LBA) of the
676 first error is printed in hexadecimal notation.  On Linux systems the
677 smartmontools web page has instructions about how to convert this LBA
678 address to the name of the disk file containing the erroneous block.
679 If provided, the SCSI Sense Key (SK), Additional Sense Code (ASC) and
680 Additional Sense Code Qualifier (ASQ) are also printed. The self tests
681 can be run using the \'\-t\' option described below (using the ATA
682 test terminology).
683
684 .I selective [ATA]
685 \- Some ATA\-7 disks (example: Maxtor) also maintain a selective
686 self\-test log.  Please see the \'\-t select\' option below for a
687 description of selective self\-tests.  The selective self\-test log
688 shows the start/end Logical Block Addresses (LBA) of each of the five
689 test spans, and their current test status.  If the span is being
690 tested or the remainder of the disk is being read\-scanned, the
691 current 65536\-sector block of LBAs being tested is also displayed.
692 The selective self\-test log also shows if a read\-scan of the
693 remainder of the disk will be carried out after the selective
694 self\-test has completed (see \'\-t afterselect\' option) and the time
695 delay before restarting this read\-scan if it is interrupted (see
696 \'\-t pending\' option). This is a new smartmontools feature; please
697 report unusual or incorrect behavior to the smartmontools\-support
698 mailing list.
699
700 .I directory
701 \- if the device supports the General Purpose Logging feature set
702 (ATA\-6 and ATA\-7 only) then this prints the Log Directory (the log at
703 address 0).  The Log Directory shows what logs are available and their
704 length in sectors (512 bytes).  The contents of the logs at address 1
705 [Summary SMART error log] and at address 6 [SMART self\-test log] may
706 be printed using the previously\-described
707 .I error
708 and
709 .I selftest
710 arguments to this option. [Please note: this is a new, experimental
711 feature.  We would like to add support for printing the contents of
712 extended and comprehensive SMART self\-test and error logs.  If your
713 disk supports these, and you would like to assist, please contact the
714 \fBsmartmontools\fP developers.]
715
716 .TP
717 .B \-v N,OPTION, \-\-vendorattribute=N,OPTION
718 Sets a vendor\-specific display OPTION for Attribute N.  This option
719 may be used multiple times. Valid arguments to this option are:
720
721 .I help
722 \- Prints (to STDOUT) a list of all valid arguments to this option,
723 then exits.
724
725 .I 9,minutes
726 \- Raw Attribute number 9 is power\-on time in minutes.  Its raw value
727 will be displayed in the form "Xh+Ym".  Here X is hours, and Y is
728 minutes in the range 0\-59 inclusive.  Y is always printed with two
729 digits, for example "06" or "31" or "00".
730
731 .I 9,seconds
732 \- Raw Attribute number 9 is power\-on time in seconds.  Its raw value
733 will be displayed in the form "Xh+Ym+Zs".  Here X is hours, Y is
734 minutes in the range 0\-59 inclusive, and Z is seconds in the range
735 0\-59 inclusive.  Y and Z are always printed with two digits, for
736 example "06" or "31" or "00".
737
738 .I 9,halfminutes
739 \- Raw Attribute number 9 is power\-on time, measured in units of 30
740 seconds.  This format is used by some Samsung disks.  Its raw value
741 will be displayed in the form "Xh+Ym".  Here X is hours, and Y is
742 minutes in the range 0\-59 inclusive.  Y is always printed with two
743 digits, for example "06" or "31" or "00".
744
745 .I 9,temp
746 \- Raw Attribute number 9 is the disk temperature in Celsius.
747
748 .I 192,emergencyretractcyclect
749 \- Raw Attribute number 192 is the Emergency Retract Cycle Count.
750
751 .I 193,loadunload
752 \- Raw Attribute number 193 contains two values. The first is the
753 number of load cycles.  The second is the number of unload cycles.
754 The difference between these two values is the number of times that
755 the drive was unexpectedly powered off (also called an emergency
756 unload). As a rule of thumb, the mechanical stress created by one
757 emergency unload is equivalent to that created by one hundred normal
758 unloads.
759
760 .I 194,10xCelsius
761 \- Raw Attribute number 194 is ten times the disk temperature in
762 Celsius.  This is used by some Samsung disks (example: model SV1204H
763 with RK100\-13 firmware).
764
765 .I 194,unknown
766 \- Raw Attribute number 194 is NOT the disk temperature, and its
767 interpretation is unknown. This is primarily useful for the \-P
768 (presets) option.
769
770 .I 198,offlinescanuncsectorct
771 \- Raw Attribute number 198 is the Offline Scan UNC Sector Count.
772
773 .I 200,writeerrorcount
774 \- Raw Attribute number 200 is the Write Error Count.
775
776 .I 201,detectedtacount
777 \- Raw Attribute number 201 is the Detected TA Count.
778
779 .I 220,temp
780 \- Raw Attribute number 220 is the disk temperature in Celsius.
781
782 Note: a table of hard drive models, listing which Attribute
783 corresponds to temperature, can be found at:
784 http://coredump.free.fr/linux/hddtemp.db
785
786 .I N,raw8
787 \- Print the Raw value of Attribute N as six 8\-bit unsigned base\-10
788 integers.  This may be useful for decoding the meaning of the Raw
789 value.  The form \'N,raw8\' prints Raw values for ALL Attributes in this
790 form.  The form (for example) \'123,raw8\' only prints the Raw value for
791 Attribute 123 in this form.
792
793 .I N,raw16
794 \- Print the Raw value of Attribute N as three 16\-bit unsigned base\-10
795 integers.  This may be useful for decoding the meaning of the Raw
796 value.  The form \'N,raw16\' prints Raw values for ALL Attributes in this
797 form.  The form (for example) \'123,raw16\' only prints the Raw value for
798 Attribute 123 in this form.
799
800 .I N,raw48
801 \- Print the Raw value of Attribute N as a 48\-bit unsigned base\-10
802 integer.  This may be useful for decoding the meaning of the Raw
803 value.  The form \'N,raw48\' prints Raw values for ALL Attributes in
804 this form.  The form (for example) \'123,raw48\' only prints the Raw
805 value for Attribute 123 in this form.
806
807 .TP
808 .B \-F TYPE, \-\-firmwarebug=TYPE
809 Modifies the behavior of \fBsmartctl\fP to compensate for some known
810 and understood device firmware bug.  The arguments to this option are
811 exclusive, so that only the final option given is used.  The valid
812 values are:
813
814 .I none
815 \- Assume that the device firmware obeys the ATA specifications.  This
816 is the default, unless the device has presets for \'\-F\' in the
817 device database (see note below).
818
819 .I samsung
820 \- In some Samsung disks (example: model SV4012H Firmware Version:
821 RM100\-08) some of the two\- and four\-byte quantities in the SMART data
822 structures are byte\-swapped (relative to the ATA specification).
823 Enabling this option tells \fBsmartctl\fP to evaluate these quantities
824 in byte\-reversed order.  Some signs that your disk needs this option
825 are (1) no self\-test log printed, even though you have run self\-tests;
826 (2) very large numbers of ATA errors reported in the ATA error log;
827 (3) strange and impossible values for the ATA error log timestamps.
828
829 .I samsung2
830 \- In more recent Samsung disks (firmware revisions ending in "\-23")
831 the number of ATA errors reported is byte swapped.  Enabling this
832 option tells \fBsmartctl\fP to evaluate this quantity in byte\-reversed
833 order.
834
835 Note that an explicit \'\-F\' option on the command line will
836 over\-ride any preset values for \'\-F\' (see the \'\-P\' option
837 below).
838
839 .TP
840 .B \-P TYPE, \-\-presets=TYPE
841 Specifies whether \fBsmartctl\fP should use any preset options that
842 are available for this drive. By default, if the drive is recognized
843 in the \fBsmartmontools\fP database, then the presets are used.
844
845 \fBsmartctl\fP can automatically set appropriate options for known
846 drives.  For example, the Maxtor 4D080H4 uses Attribute 9 to stores
847 power\-on time in minutes whereas most drives use that Attribute to
848 store the power\-on time in hours.  The command\-line option \'\-v
849 9,minutes\' ensures that \fBsmartctl\fP correctly interprets Attribute
850 9 in this case, but that option is preset for the Maxtor 4D080H4 and
851 so need not be specified by the user on the \fBsmartctl\fP command
852 line.
853
854 The argument
855 .I show
856 will show any preset options for your drive and the argument
857 .I showall
858 will show all known drives in the \fBsmartmontools\fP database, along
859 with their preset options.  If there are no presets for your drive and
860 you think there should be (for example, a \-v or \-F option is needed
861 to get \fBsmartctl\fP to display correct values) then please contact
862 the \fBsmartmontools\fP developers so that this information can be
863 added to the \fBsmartmontools\fP database.  Contact information is at the
864 end of this man page.
865
866 The valid arguments to this option are:
867
868 .I use
869 \- if a drive is recognized, then use the stored presets for it.  This
870 is the default. Note that presets will NOT over\-ride additional
871 Attribute interpretation (\'\-v N,something\') command\-line options or
872 explicit \'\-F\' command\-line options..
873
874 .I ignore
875 \- do not use presets.
876
877 .I show
878 \- show if the drive is recognized in the database, and if so, its
879 presets, then exit.
880
881 .I showall
882 \- list all recognized drives, and the presets that are set for them,
883 then exit.
884
885 .TP
886 .B SMART RUN/ABORT OFFLINE TEST AND SELF\-TEST OPTIONS:
887 .TP
888 .B \-t TEST, \-\-test=TEST
889 Executes TEST immediately.  The \'\-C\' option can be used in
890 conjunction with this option to run the short or long (and also for
891 ATA devices, selective or conveyance) self\-tests in captive mode
892 (known as "foreground mode" for SCSI devices).  Note that only one
893 test type can be run at a time, so only one test type should be
894 specified per command line.  Note also that if a computer is shutdown
895 or power cycled during a self\-test, no harm should result.  The
896 self\-test will either be aborted or will resume automatically.
897
898 The valid arguments to this option are:  
899
900 .I offline
901 \- runs SMART Immediate Offline Test.  This immediately
902 starts the test described above.  This command can be given during
903 normal system operation.  The effects of this test are visible only in
904 that it updates the SMART Attribute values, and if errors are
905 found they will appear in the SMART error log, visible with the \'\-l error\'
906 option. [In the case of SCSI devices runs the default self test in
907 foreground. No entry is placed in the self test log.]
908
909 If the \'\-c\' option to \fBsmartctl\fP shows that the device has the
910 "Suspend Offline collection upon new command" capability then you can
911 track the progress of the Immediate Offline test using the \'\-c\'
912 option to \fBsmartctl\fP.  If the \'\-c\' option show that the device
913 has the "Abort Offline collection upon new command" capability then
914 most commands will abort the Immediate Offline Test, so you should not
915 try to track the progress of the test with \'\-c\', as it will abort
916 the test.
917
918 .I short
919 \- runs SMART Short Self Test (usually under ten minutes).
920 [Note: in the case of SCSI devices,
921 this command option runs the "Background short" self\-test.]
922 This command can be given during normal system operation (unless run in
923 captive mode \- see the \'\-C\' option below).  This is a
924 test in a different category than the immediate or automatic offline
925 tests.  The "Self" tests check the electrical and mechanical
926 performance as well as the read performance of the disk.  Their
927 results are reported in the Self Test Error Log, readable with
928 the \'\-l selftest\' option.  Note that on some disks the progress of the
929 self\-test can be monitored by watching this log during the self\-test; with other disks
930 use the \'\-c\' option to monitor progress.
931
932 .I long
933 \- runs SMART Extended Self Test (tens of minutes).
934 [Note: in the case of SCSI devices,
935 this command option runs the "Background long" self\-test.]
936 This is a
937 longer and more thorough version of the Short Self Test described
938 above.  Note that this command can be given during normal
939 system operation (unless run in captive mode \- see the \'\-C\' option below).
940
941 .I conveyance
942 \- [ATA ONLY] runs a SMART Conveyance Self Test (minutes).  This
943 self\-test routine is intended to identify damage incurred during
944 transporting of the device. This self\-test routine should take on the
945 order of minutes to complete.  Note that this command can be given
946 during normal system operation (unless run in captive mode \- see the
947 \'\-C\' option below).
948
949 .I select,N\-M
950
951 \- [ATA ONLY] [NEW EXPERIMENTAL SMARTCTL FEATURE] runs a SMART
952 Selective Self Test, to test a \fBrange\fP of disk Logical Block
953 Addresses (LBAs), rather than the entire disk.  Each range of LBAs
954 that is checked is called a "span" and is specified by a starting LBA
955 (N) and an ending LBA (M) with N less than or equal to M.  For example
956 the command:
957 .nf
958   smartctl \-t select,10\-20 /dev/hda
959 .fi
960 runs a self test on one span consisting of LBAs ten to twenty
961 (inclusive). The \'\-t\' option can be given up to five times, to test
962 up to five spans.  For example the command:
963 .nf
964   smartctl \-t select,0\-100 \-t select,1000\-2000 /dev/hda
965 .fi
966 runs a self test on two spans.  The first span consists of 101 LBAs
967 and the second span consists of 1001 LBAs.  Note that the spans can
968 overlap partially or completely, for example:
969 .nf
970   smartctl \-t select,0\-10 \-t select,5\-15 \-t select,10\-20 /dev/hda
971 .fi
972 The results of the selective self\-test can be obtained (both during
973 and after the test) by printing the SMART self\-test log, using the
974 \'\-l selftest\' option to smartctl.
975
976 Selective self tests are particularly useful as disk capacities
977 increase: an extended self test (smartctl \-t long) can take several
978 hours.  Selective self\-tests are helpful if (based on SYSLOG error
979 messages, previous failed self\-tests, or SMART error log entries) you
980 suspect that a disk is having problems at a particular range of
981 Logical Block Addresses (LBAs).
982
983 Selective self\-tests can be run during normal system operation (unless
984 done in captive mode \- see the \'\-C\' option below).
985
986 [Note: this new experimental smartmontools feature is currently only
987 available under Linux.  The Linux kernel must be compiled with the
988 configuration option CONFIG_IDE_TASKFILE_IO enabled.  Please report
989 unusual or incorrect behavior to the smartmontools\-support mailing
990 list.]
991
992 .I afterselect,on
993 \- [ATA ONLY] perform an offline read scan after a Selective Self\-test
994 has completed. This option must be used together with one or more of
995 the \fIselect,N\-M\fP options above. If the LBAs that have been
996 specified in the Selective self\-test pass the test with no errors
997 found, then read scan the \fBremainder\fP of the disk.  If the device
998 is powered\-cycled while this read scan is in progress, the read scan
999 will be automatically resumed after a time specified by the pending
1000 timer (see below).  The value of this option is preserved between
1001 selective self\-tests.
1002
1003 .I afterselect,off
1004 \- [ATA ONLY] do not read scan the remainder of the disk after a
1005 Selective self\-test has completed.  This option must be use together
1006 with one or more of the \fIselect,N\-M\fP options above.  The value of this
1007 option is preserved between selective self\-tests.
1008
1009 .I pending,N 
1010 \- [ATA ONLY] set the pending offline read scan timer to N minutes.
1011 Here N is an integer in the range from 0 to 65535 inclusive.  If the
1012 device is powered off during a read scan after a Selective self\-test,
1013 then resume the test automatically N minutes after power\-up.  This
1014 option must be use together with one or more of the \fIselect,N\-M\fP
1015 options above. The value of this option is preserved between selective
1016 self\-tests.
1017
1018 .TP
1019 .B \-C, \-\-captive
1020 Runs self\-tests in captive mode.  This has no effect with \'\-t
1021 offline\' or if the \'\-t\' option is not used. [Note: in the case of
1022 SCSI devices, this command option runs the self\-test in "Foreground"
1023 mode.]
1024
1025 \fBWARNING: Tests run in captive mode may busy out the drive for the
1026 length of the test.  Only run captive tests on drives without any
1027 mounted partitions!\fP
1028
1029 .TP
1030 .B \-X, \-\-abort
1031 Aborts non\-captive SMART Self Tests.  Note that this
1032 command will abort the Offline Immediate Test routine only if your
1033 disk has the "Abort Offline collection upon new command" capability.
1034 .PP
1035 .SH EXAMPLES
1036 .nf
1037 .B smartctl \-a /dev/hda
1038 .fi
1039 Print all SMART information for drive /dev/hda (Primary Master).
1040 .PP
1041 .nf
1042 .B smartctl \-s off /dev/hdd
1043 .fi
1044 Disable SMART on drive /dev/hdd (Secondary Slave).
1045 .PP
1046 .nf
1047 .B smartctl \-\-smart=on \-\-offlineauto=on \-\-saveauto=on /dev/hda
1048 .fi
1049 Enable SMART on drive /dev/hda, enable automatic offline
1050 testing every four hours, and enable autosaving of
1051 SMART Attributes.  This is a good start\-up line for your system\'s
1052 init files.  You can issue this command on a running system.
1053 .PP
1054 .nf
1055 .B smartctl \-t long /dev/hdc
1056 .fi
1057 Begin an extended self\-test of drive /dev/hdc.  You can issue this
1058 command on a running system.  The results can be seen in the self\-test
1059 log visible with the \'\-l selftest\' option after it has completed.
1060 .PP
1061 .nf
1062 .B smartctl \-s on \-t offline /dev/hda
1063 .fi
1064 Enable SMART on the disk, and begin an immediate offline test of
1065 drive /dev/hda.  You can issue this command on a running system.  The
1066 results are only used to update the SMART Attributes, visible
1067 with the \'\-A\' option.  If any device errors occur, they are logged to
1068 the SMART error log, which can be seen with the \'\-l error\' option.
1069 .PP
1070 .nf
1071 .B smartctl \-A \-v 9,minutes /dev/hda
1072 .fi
1073 Shows the vendor Attributes, when the disk stores its power\-on time
1074 internally in minutes rather than hours.
1075 .PP
1076 .nf
1077 .B smartctl \-q errorsonly \-H \-l selftest /dev/hda
1078 .fi
1079 Produces output only if the device returns failing SMART status,
1080 or if some of the logged self\-tests ended with errors.
1081 .PP
1082 .nf
1083 .B smartctl \-q silent \-a /dev/hda
1084 .fi
1085 Examine all SMART data for device /dev/hda, but produce no
1086 printed output.  You must use the exit status (the
1087 .B $?
1088 shell variable) to learn if any Attributes are out of bound, if the
1089 SMART status is failing, if there are errors recorded in the
1090 self\-test log, or if there are errors recorded in the disk error log.
1091 .PP
1092 .nf
1093 .B smartctl \-a \-d 3ware,0 /dev/sda
1094 .fi
1095 Examine all SMART data for the first ATA disk connected to a 3ware
1096 RAID controller card.
1097 .PP
1098 .nf
1099 .B smartctl \-t short \-d 3ware,3 /dev/sdb
1100 .fi
1101 Start a short self\-test on the fourth ATA disk connected to the 3ware RAID
1102 controller card which is the second SCSI device /dev/sdb.
1103 .nf
1104 .B smartctl \-t select,10\-100 \-t select,30\-300 \-t afterselect,on \-t pending,45 /dev/hda
1105 .fi
1106 Run a selective self\-test on LBAs 10 to 100 and 30 to 300.  After the
1107 these LBAs have been tested, read\-scan the remainder of the disk.  If the disk is
1108 power\-cycled during the read\-scan, resume the scan 45 minutes after power to the
1109 device is restored.
1110 .PP
1111 .SH RETURN VALUES
1112 The return values of \fBsmartctl\fP are defined by a bitmask.  If all
1113 is well with the disk, the return value (exit status) of
1114 \fBsmartctl\fP is 0 (all bits turned off).  If a problem occurs, or an
1115 error, potential error, or fault is detected, then a non\-zero status
1116 is returned.  In this case, the eight different bits in the return
1117 value have the following meanings for ATA disks; some of these values
1118 may also be returned for SCSI disks.
1119 .TP
1120 .B Bit 0:
1121 Command line did not parse.
1122 .TP
1123 .B Bit 1:
1124 Device open failed, or device did not return an IDENTIFY DEVICE structure. 
1125 .TP
1126 .B Bit 2:
1127 Some SMART command to the disk failed, or there was a checksum error
1128 in a SMART data structure (see \'\-b\' option above).
1129 .TP
1130 .B Bit 3:
1131 SMART status check returned "DISK FAILING".
1132 .TP
1133 .B Bit 4:
1134 SMART status check returned "DISK OK" but we found prefail Attributes <= threshold.
1135 .TP
1136 .B Bit 5:
1137 SMART status check returned "DISK OK" but we found that some (usage
1138 or prefail) Attributes have been <= threshold at some time in the
1139 past. 
1140 .TP
1141 .B Bit 6:
1142 The device error log contains records of errors.
1143 .TP
1144 .B Bit 7:
1145 The device self\-test log contains records of errors.
1146
1147 To test within the shell for whether or not the different bits are
1148 turned on or off, you can use the following type of construction (this
1149 is bash syntax):
1150 .nf
1151 .B smartstat=$(($? & 8))
1152 .fi
1153 This looks at only at bit 3 of the exit status
1154 .B $?
1155 (since 8=2^3).  The shell variable
1156 $smartstat will be nonzero if SMART status check returned "disk
1157 failing" and zero otherwise.
1158
1159 .PP
1160 .SH NOTES
1161 The TapeAlert log page flags are cleared for the initiator when the
1162 page is read. This means that each alert condition is reported only
1163 once by \fBsmartctl\fP for each initiator for each activation of the
1164 condition.
1165
1166 .PP
1167 .SH AUTHOR
1168 \fBBruce Allen\fP smartmontools\-support@lists.sourceforge.net
1169 .fi
1170 University of Wisconsin \- Milwaukee Physics Department
1171  
1172 .PP
1173 .SH CONTRIBUTORS
1174 The following have made large contributions to smartmontools:
1175 .nf
1176 \fBCasper Dik\fP (Solaris SCSI interface)
1177 \fBChristian Franke\fP (Windows interface)
1178 \fBDouglas Gilbert\fP (SCSI subsystem)
1179 \fBGuido Guenther\fP (Autoconf/Automake packaging)
1180 \fBGeoffrey Keating\fP (Darwin ATA interface)
1181 \fBEduard Martinescu\fP (FreeBSD interface)
1182 \fBFr\*'ed\*'eric L. W. Meunier\fP (Web site and Mailing list)
1183 \fBKeiji Sawada\fP (Solaris ATA interface)
1184 \fBSergey Svishchev\fP (NetBSD interface)
1185 \fBDavid Snyder and Sergey Svishchev\fP (OpenBSD interface)
1186 \fBPhil Williams\fP (User interface and drive database)
1187 .fi
1188 Many other individuals have made smaller contributions and corrections.
1189
1190 .PP
1191 .SH CREDITS
1192 .fi
1193 This code was derived from the smartsuite package, written by Michael
1194 Cornwell, and from the previous UCSC smartsuite package.  It extends
1195 these to cover ATA\-5 disks.  This code was originally developed as a
1196 Senior Thesis by Michael Cornwell at the Concurrent Systems Laboratory
1197 (now part of the Storage Systems Research Center), Jack Baskin School
1198 of Engineering, University of California, Santa
1199 Cruz. \fBhttp://ssrc.soe.ucsc.edu/\fP .
1200 .SH
1201 HOME PAGE FOR SMARTMONTOOLS: 
1202 .fi
1203 Please see the following web site for updates, further documentation, bug
1204 reports and patches:
1205 .nf
1206 .B
1207 http://smartmontools.sourceforge.net/
1208
1209 .SH
1210 SEE ALSO:
1211 \fBsmartd\fP(8), \fBbadblocks\fP(8), \fBide\-smart\fP(8).
1212 .SH
1213 REFERENCES FOR SMART
1214 .fi
1215 An introductory article about smartmontools is \fIMonitoring Hard
1216 Disks with SMART\fP, by Bruce Allen, Linux Journal, January 2004,
1217 pages 74-77. This is http://www.linuxjournal.com/article.php?sid=6983
1218 online.
1219
1220 If you would like to understand better how SMART works, and what it
1221 does, a good place to start is Section 8.41 of the "AT Attachment with
1222 Packet Interface\-5" (ATA/ATAPI\-5) specification.  This documents the
1223 SMART functionality which the \fBsmartmontools\fP utilities provide
1224 access to.  You can find Revision 1 of this document at
1225 \fBhttp://www.t13.org/project/d1321r1c.pdf\fP .
1226
1227 .fi
1228 Future versions of the specifications (ATA/ATAPI\-6 and ATA/ATAPI\-7),
1229 and later revisions (2, 3) of the ATA/ATAPI\-5 specification are
1230 available from \fBhttp://www.t13.org/#FTP_site\fP .
1231
1232 .fi
1233 The functioning of SMART was originally defined by the SFF\-8035i
1234 revision 2 and the SFF\-8055i revision 1.4 specifications.  These are
1235 publications of the Small Form Factors (SFF) Committee.  Links to
1236 these documents may be found in the References section of the
1237 \fBsmartmontools\fP home page at
1238 \fBhttp://smartmontools.sourceforge.net/\fP .
1239
1240 .SH
1241 CVS ID OF THIS PAGE:
1242 $Id: smartctl.8.in,v 1.64 2004/09/10 04:13:41 ballen4705 Exp $
1243 .\" Local Variables:             
1244 .\" mode: nroff         
1245 .\" End: