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