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