1SMARTCTL(8) 2010-10-16 SMARTCTL(8)
2
3
4
6 smartctl - Control and Monitor Utility for SMART Disks
7
8
10 smartctl [options] device
11
12
14 /usr/sbin/smartctl
15
16
18 smartmontools-5.40 2010-10-16 r3189
19
20
22 smartctl controls the Self-Monitoring, Analysis and Reporting Technol‐
23 ogy (SMART) system built into many ATA-3 and later ATA, IDE and SCSI-3
24 hard drives. The purpose of SMART is to monitor the reliability of the
25 hard drive and predict drive failures, and to carry out different types
26 of drive self-tests. This version of smartctl is compatible with
27 ATA/ATAPI-7 and earlier standards (see REFERENCES below)
28
29 smartctl is a command line utility designed to perform SMART tasks such
30 as printing the SMART self-test and error logs, enabling and disabling
31 SMART automatic testing, and initiating device self-tests. Note: if the
32 user issues a SMART command that is (apparently) not implemented by the
33 device, smartctl will print a warning message but issue the command
34 anyway (see the -T, --tolerance option below). This should not cause
35 problems: on most devices, unimplemented SMART commands issued to a
36 drive are ignored and/or return an error.
37
38 smartctl also provides support for polling TapeAlert messages from SCSI
39 tape drives and changers.
40
41 The user must specify the device to be controlled or interrogated as
42 the final argument to smartctl. The command set used by the device is
43 often derived from the device path but may need help with the ´-d´
44 option (for more information see the section on "ATA, SCSI command sets
45 and SAT" below). Device paths are as follows:
46
47 LINUX: Use the forms "/dev/hd[a-t]" for IDE/ATA devices, and
48 "/dev/sd[a-z]" for SCSI devices. For SCSI Tape Drives and
49 Changers with TapeAlert support use the devices "/dev/nst*"
50 and "/dev/sg*". For SATA disks accessed with libata, use
51 "/dev/sd[a-z]" and append "-d ata". For disks behind 3ware
52 controllers you may need "/dev/sd[a-z]" or "/dev/twe[0-9]",
53 "/dev/twa[0-9]" or "/dev/twl[0-9]": see details below. For
54 disks behind HighPoint RocketRAID controllers you may need
55 "/dev/sd[a-z]". For disks behind Areca SATA RAID controllers,
56 you need "/dev/sg[2-9]" (note that smartmontools interacts
57 with the Areca controllers via a SCSI generic device which is
58 different than the SCSI device used for reading and writing
59 data)!
60
61 DARWIN: Use the forms /dev/disk[0-9] or equivalently disk[0-9] or
62 equivalently /dev/rdisk[0-9]. Long forms are also available:
63 please use ´-h´ to see some examples. Note that there is cur‐
64 rently no Darwin SCSI support.
65
66 FREEBSD: Use the forms "/dev/ad[0-9]+" for IDE/ATA devices and
67 "/dev/da[0-9]+" or "/dev/pass[0-9]+" for SCSI devices. For
68 SATA devices on AHCI bus use "/dev/ada[0-9]+" format.
69
70 NETBSD/OPENBSD:
71 Use the form "/dev/wd[0-9]+c" for IDE/ATA devices. For SCSI
72 disk and tape devices, use the device names "/dev/sd[0-9]+c"
73 and "/dev/st[0-9]+c" respectively. Be sure to specify the
74 correct "whole disk" partition letter for your architecture.
75
76 SOLARIS: Use the forms "/dev/rdsk/c?t?d?s?" for IDE/ATA and SCSI disk
77 devices, and "/dev/rmt/*" for SCSI tape devices.
78
79 WINDOWS 9x/ME:
80 Use the forms "/dev/hd[a-d]" for standard IDE/ATA devices
81 accessed via SMARTVSD.VXD, and "/dev/hd[e-h]" for additional
82 devices accessed via a patched SMARTVSE.VXD (see INSTALL file
83 for details). Use the form "/dev/scsi[0-9][0-f]" for SCSI
84 devices via an aspi dll on ASPI adapter 0-9, ID 0-15. The pre‐
85 fix "/dev/" is optional.
86
87 WINDOWS NT4/2000/XP/2003/Vista:
88 Use the forms "/dev/sd[a-z]" for IDE/(S)ATA and SCSI disks
89 "\\.\PhysicalDrive[0-25]" (where "a" maps to "0"). These
90 disks can also be referred to as "/dev/pd[0-255]" for
91 "\\.\PhysicalDrive[0-255]". ATA disks can also be referred to
92 as "/dev/hd[a-z]" for "\\.\PhysicalDrive[0-25]". Use one the
93 forms "/dev/tape[0-255]", "/dev/st[0-255]", or
94 "/dev/nst[0-255]" for SCSI tape drives "\\.\Tape[0-255]".
95
96 Alternatively, drive letters "X:" or "X:\" may be used to
97 specify the (´basic´) disk behind a mounted partition. This
98 does not work with ´dynamic´ disks.
99
100 For disks behind 3ware 9000 controllers use "/dev/sd[a-z],N"
101 where N specifies the disk number (3ware ´port´) behind the
102 controller providing the logical drive (´unit´) specified by
103 "/dev/sd[a-z]". Alternatively, use "/dev/tw_cli/cx/py" for
104 controller x, port y to run the ´tw_cli´ tool and parse the
105 output. This provides limited monitoring (´-i´, ´-c´, ´-A´
106 below) if SMART support is missing in the driver. Use
107 "/dev/tw_cli/stdin" or "/dev/tw_cli/clip" to parse CLI or 3DM
108 output from standard input or clipboard. The option ´-d
109 3ware,N´ is not necessary on Windows. The prefix "/dev/" is
110 optional.
111
112 CYGWIN: See "WINDOWS NT4/2000/XP/2003/Vista" above.
113
114 OS/2,eComStation:
115 Use the form "/dev/hd[a-z]" for IDE/ATA devices.
116
117 if ´-´ is specified as the device path, smartctl reads and interprets
118 it's own debug output from standard input. See ´-r ataioctl´ below for
119 details.
120
121 Based on the device path, smartctl will guess the device type (ATA or
122 SCSI). If necessary, the ´-d´ option can be used to over-ride this
123 guess
124
125 Note that the printed output of smartctl displays most numerical values
126 in base 10 (decimal), but some values are displayed in base 16 (hexa‐
127 decimal). To distinguish them, the base 16 values are always displayed
128 with a leading "0x", for example: "0xff". This man page follows the
129 same convention.
130
131
133 The options are grouped below into several categories. smartctl will
134 execute the corresponding commands in the order: INFORMATION,
135 ENABLE/DISABLE, DISPLAY DATA, RUN/ABORT TESTS.
136
137
138 SHOW INFORMATION OPTIONS:
139
140 -h, --help, --usage
141 Prints a usage message to STDOUT and exits.
142
143 -V, --version, --copyright, --license
144 Prints version, copyright, license, home page and SVN revision
145 information for your copy of smartctl to STDOUT and then exits.
146 Please include this information if you are reporting bugs or
147 problems.
148
149 -i, --info
150 Prints the device model number, serial number, firmware version,
151 and ATA Standard version/revision information. Says if the
152 device supports SMART, and if so, whether SMART support is cur‐
153 rently enabled or disabled. If the device supports Logical
154 Block Address mode (LBA mode) print current user drive capacity
155 in bytes. (If drive is has a user protected area reserved, or is
156 "clipped", this may be smaller than the potential maximum drive
157 capacity.) Indicates if the drive is in the smartmontools data‐
158 base (see ´-v´ options below). If so, the drive model family
159 may also be printed. If ´-n´ (see below) is specified, the power
160 mode of the drive is printed.
161
162 -a, --all
163 Prints all SMART information about the disk, or TapeAlert infor‐
164 mation about the tape drive or changer. For ATA devices this is
165 equivalent to
166 ´-H -i -c -A -l error -l selftest -l selective´
167 and for SCSI, this is equivalent to
168 ´-H -i -A -l error -l selftest´.
169 Note that for ATA disks this does not enable the non-SMART
170 options and the SMART options which require support for 48-bit
171 ATA commands.
172
173 -x, --xall
174 Prints all SMART and non-SMART information about the device. For
175 ATA devices this is equivalent to
176 ´-H -i -c -A -l xerror,error -l xselftest,selftest -l selective
177 -l directory -l scttemp -l scterc -l sataphy´.
178 and for SCSI, this is equivalent to
179 ´-H -i -A -l error -l selftest -l background -l sasphy´.
180
181 --scan Scans for devices and prints each device name, device type and
182 protocol ([ATA] or [SCSI]) info. May be used in conjunction
183 with ´-d TYPE´ to restrict the scan to a specific TYPE. See
184 also info about platform specific device scan and the DEVICESCAN
185 directive on smartd(8) man page.
186
187 --scan-open
188 Same as --scan, but also tries to open each device before print‐
189 ing device info. The device open may change the device type due
190 to autodetection (see also ´-d test´).
191
192
193 RUN-TIME BEHAVIOR OPTIONS:
194
195 -q TYPE, --quietmode=TYPE
196 Specifies that smartctl should run in one of the two quiet modes
197 described here. The valid arguments to this option are:
198
199 errorsonly - only print: For the ´-l error´ option, if nonzero,
200 the number of errors recorded in the SMART error log and the
201 power-on time when they occurred; For the ´-l selftest´ option,
202 errors recorded in the device self-test log; For the ´-H´
203 option, SMART "disk failing" status or device Attributes
204 (pre-failure or usage) which failed either now or in the past;
205 For the ´-A´ option, device Attributes (pre-failure or usage)
206 which failed either now or in the past.
207
208 silent - print no output. The only way to learn about what was
209 found is to use the exit status of smartctl (see RETURN VALUES
210 below).
211
212 noserial - Do not print the serial number of the device.
213
214 -d TYPE, --device=TYPE
215 Specifies the type of the device. The valid arguments to this
216 option are ata, scsi, sat, marvell, 3ware,N, areca,N, usbcy‐
217 press, usbjmicron, usbsunplus, cciss,N, hpt,L/M (or hpt,L/M/N),
218 and test.
219
220 If this option is not used or ´auto´ is used then smartctl will
221 attempt to guess the device type from the device name or from
222 controller type info provided by the operating system.
223
224 If ´test´ is used as the TYPE name, smartctl prints the guessed
225 TYPE name, then opens the device and prints the (possibly
226 changed) TYPE name and then exists without performing any fur‐
227 ther commands.
228
229 The ´sat´ device type is for ATA disks that have a SCSI to ATA
230 Translation (SAT) Layer (SATL) between the disk and the operat‐
231 ing system. SAT defines two ATA PASS THROUGH SCSI commands, one
232 12 bytes long and the other 16 bytes long that smartctl will
233 utilize when this device type is selected. The default is the 16
234 byte variant which can be overridden with either ´-d sat,12´ or
235 ´-d sat,16´.
236
237 The ´usbcypress´ device type is for ATA disks that are behind a
238 Cypress usb-pata bridge. This will use the ATACB proprietary
239 scsi pass through command. There is no autodetection at the
240 moment. The best way to know if your device support it, is to
241 check your device usb id (most Cypress usb ata bridge got
242 vid=0x04b4, pid=0x6830) or to try it (if the usb device doesn't
243 support ATACB, smartmontools print an error). The default scsi
244 operation code is 0x24, but although it can be overridden with
245 ´-d usbcypress,0xn´, where n is the scsi operation code, you're
246 running the risk of damage to the device or filesystems on it.
247
248 [NEW EXPERIMENTAL SMARTCTL FEATURE] The ´usbjmicron´ device type
249 is for SATA disks that are behind a JMicron USB to PATA/SATA
250 bridge. The 48-bit ATA commands (required e.g. for ´-l xerror´,
251 see below) do not work with all of these bridges and are there‐
252 fore disabled by default. These commands can be enabled by ´-d
253 usbjmicron,x´. If two disks are connected to a bridge with two
254 ports, an error message is printed if no PORT is specified. The
255 port can be specified by ´-d usbjmicron[,x],PORT´ where PORT is
256 0 (master) or 1 (slave). This is not necessary if the device
257 uses a port multiplier to connect multiple disks to one port.
258 The disks appear under separate /dev/ice names then. CAUTION:
259 Specifying ´,x´ for a device which does not support it results
260 in I/O errors and may disconnect the drive. The same applies if
261 the specified PORT does not exist or is not connected to a disk.
262
263 [NEW EXPERIMENTAL SMARTCTL FEATURE] The ´usbsunplus´ device type
264 is for SATA disks that are behind a SunplusIT USB to SATA
265 bridge.
266
267 Under Linux, to look at SATA disks behind Marvell SATA con‐
268 trollers (using Marvell's ´linuxIAL´ driver rather than libata
269 driver) use ´-d marvell´. Such controllers show up as Marvell
270 Technology Group Ltd. SATA I or II controllers using lspci, or
271 using lspci -n show a vendor ID 0x11ab and a device ID of either
272 0x5040, 0x5041, 0x5080, 0x5081, 0x6041 or 0x6081. The ´linuxIAL´
273 driver seems not (yet?) available in the Linux kernel source
274 tree, but should be available from system vendors
275 (ftp://ftp.aslab.com/ is known to provide a patch with the
276 driver).
277
278 Under Linux , to look at SCSI/SAS disks behind LSI MegaRAID con‐
279 trollers, use syntax such as:
280 smartctl -a -d megaraid,2 /dev/sda
281 smartctl -a -d megaraid,0 /dev/sdb
282 where in the argument megaraid,N, the integer N is the physical
283 disk number within the MegaRAID controller. This interface will
284 also work for Dell PERC controllers. The following /dev/XXX
285 entry must exist:
286 For PERC2/3/4 controllers: /dev/megadev0
287 For PERC5/6 controllers: /dev/megaraid_sas_ioctl_node
288
289 Under Linux and FreeBSD, to look at ATA disks behind 3ware SCSI
290 RAID controllers, use syntax such as:
291 smartctl -a -d 3ware,2 /dev/sda
292 smartctl -a -d 3ware,0 /dev/twe0
293 smartctl -a -d 3ware,1 /dev/twa0
294 smartctl -a -d 3ware,1 /dev/twl0
295 where in the argument 3ware,N, the integer N is the disk number
296 (3ware ´port´) within the 3ware ATA RAID controller. The
297 allowed values of N are from 0 to 127 inclusive. The first two
298 forms, which refer to devices /dev/sda-z and /dev/twe0-15, may
299 be used with 3ware series 6000, 7000, and 8000 series con‐
300 trollers that use the 3x-xxxx driver. Note that the /dev/sda-z
301 form is deprecated starting with the Linux 2.6 kernel series and
302 may not be supported by the Linux kernel in the near future. The
303 final form, which refers to devices /dev/twa0-15, must be used
304 with 3ware 9000 series controllers, which use the 3w-9xxx
305 driver.
306
307 The devices /dev/twl0-15 must be used with the 3ware/LSI 9750
308 series controllers which use the 3w-sas driver.
309
310 Note that if the special character device nodes /dev/twl?,
311 /dev/twa? and /dev/twe? do not exist, or exist with the incor‐
312 rect major or minor numbers, smartctl will recreate them on the
313 fly. Typically /dev/twa0 refers to the first 9000-series con‐
314 troller, /dev/twa1 refers to the second 9000 series controller,
315 and so on. The /dev/twl0 devices refers to the first 9750 series
316 controller, /dev/twl1 resfers to the second 9750 series con‐
317 troller, and so on. Likewise /dev/twe0 refers to the first
318 6/7/8000-series controller, /dev/twe1 refers to the second
319 6/7/8000 series controller, and so on.
320
321 Note that for the 6/7/8000 controllers, any of the physical
322 disks can be queried or examined using any of the 3ware's SCSI
323 logical device /dev/sd? entries. Thus, if logical device
324 /dev/sda is made up of two physical disks (3ware ports zero and
325 one) and logical device /dev/sdb is made up of two other physi‐
326 cal disks (3ware ports two and three) then you can examine the
327 SMART data on any of the four physical disks using either SCSI
328 device /dev/sda or /dev/sdb. If you need to know which logical
329 SCSI device a particular physical disk (3ware port) is associ‐
330 ated with, use the dmesg or SYSLOG output to show which SCSI ID
331 corresponds to a particular 3ware unit, and then use the 3ware
332 CLI or 3dm tool to determine which ports (physical disks) corre‐
333 spond to particular 3ware units.
334
335 If the value of N corresponds to a port that does not exist on
336 the 3ware controller, or to a port that does not physically have
337 a disk attached to it, the behavior of smartctl depends upon the
338 specific controller model, firmware, Linux kernel and platform.
339 In some cases you will get a warning message that the device
340 does not exist. In other cases you will be presented with ´void´
341 data for a non-existent device.
342
343 Note that if the /dev/sd? addressing form is used, then older
344 3w-xxxx drivers do not pass the "Enable Autosave" (´-S on´) and
345 "Enable Automatic Offline" (´-o on´) commands to the disk, and
346 produce these types of harmless syslog error messages instead:
347 "3w-xxxx: tw_ioctl(): Passthru size (123392) too big". This can
348 be fixed by upgrading to version 1.02.00.037 or later of the
349 3w-xxxx driver, or by applying a patch to older versions. See
350 http://smartmontools.sourceforge.net/ for instructions. Alter‐
351 natively, use the character device /dev/twe0-15 interface.
352
353 The selective self-test functions (´-t select,A-B´) are only
354 supported using the character device interface /dev/twl0-15,
355 /dev/twa0-15 and /dev/twe0-15. The necessary WRITE LOG commands
356 can not be passed through the SCSI interface.
357
358 Areca SATA RAID controllers are currently supported under Linux
359 only. To look at SATA disks behind Areca RAID controllers, use
360 syntax such as:
361 smartctl -a -d areca,2 /dev/sg2
362 smartctl -a -d areca,3 /dev/sg3
363 where in the argument areca,N, the integer N is the disk number
364 (Areca ´port´) within the Areca SATA RAID controller. The
365 allowed values of N are from 1 to 24 inclusive. The first line
366 above addresses the second disk on the first Areca RAID con‐
367 troller. The second line addresses the third disk on the second
368 Areca RAID controller. To help identify the correct device, use
369 the command:
370 cat /proc/scsi/sg/device_hdr /proc/scsi/sg/devices
371 to show the SCSI generic devices (one per line, starting with
372 /dev/sg0). The correct SCSI generic devices to address for
373 smartmontools are the ones with the type field equal to 3. If
374 the incorrect device is addressed, please read the warning/error
375 messages carefully. They should provide hints about what
376 devices to use.
377
378 Important: the Areca controller must have firmware version 1.46
379 or later. Lower-numbered firmware versions will give (harmless)
380 SCSI error messages and no SMART information.
381
382 To look at (S)ATA disks behind HighPoint RocketRAID controllers,
383 use syntax such as:
384 smartctl -a -d hpt,1/3 /dev/sda (under Linux)
385 smartctl -a -d hpt,1/2/3 /dev/sda (under Linux)
386 smartctl -a -d hpt,1/3 /dev/hptrr (under FreeBSD)
387 smartctl -a -d hpt,1/2/3 /dev/hptrr (under FreeBSD)
388 where in the argument hpt,L/M or hpt,L/M/N, the integer L is the
389 controller id, the integer M is the channel number, and the
390 integer N is the PMPort number if it is available. The allowed
391 values of L are from 1 to 4 inclusive, M are from 1 to 8 inclu‐
392 sive and N from 1 to 5 if PMPort available. Note that the
393 /dev/sda-z form should be the device node which stands for the
394 disks derived from the HighPoint RocketRAID controllers under
395 Linux and under FreeBSD, it is the character device which the
396 driver registered (eg, /dev/hptrr, /dev/hptmv6). And also these
397 values are limited by the model of the HighPoint RocketRAID con‐
398 troller.
399
400 HighPoint RocketRAID controllers are currently ONLY supported
401 under Linux and FreeBSD.
402
403 cciss controllers are currently ONLY supported under Linux and
404 FreeBSD.
405
406 -T TYPE, --tolerance=TYPE
407 [ATA only] Specifies how tolerant smartctl should be of ATA and
408 SMART command failures.
409
410 The behavior of smartctl depends upon whether the command is
411 "optional" or "mandatory". Here "mandatory" means "required by
412 the ATA/ATAPI-5 Specification if the device implements the SMART
413 command set" and "optional" means "not required by the
414 ATA/ATAPI-5 Specification even if the device implements the
415 SMART command set." The "mandatory" ATA and SMART commands are:
416 (1) ATA IDENTIFY DEVICE, (2) SMART ENABLE/DISABLE ATTRIBUTE
417 AUTOSAVE, (3) SMART ENABLE/DISABLE, and (4) SMART RETURN STATUS.
418
419 The valid arguments to this option are:
420
421 normal - exit on failure of any mandatory SMART command, and
422 ignore all failures of optional SMART commands. This is the
423 default. Note that on some devices, issuing unimplemented
424 optional SMART commands doesn´t cause an error. This can result
425 in misleading smartctl messages such as "Feature X not imple‐
426 mented", followed shortly by "Feature X: enabled". In most such
427 cases, contrary to the final message, Feature X is not enabled.
428
429 conservative - exit on failure of any optional SMART command.
430
431 permissive - ignore failure(s) of mandatory SMART commands.
432 This option may be given more than once. Each additional use of
433 this option will cause one more additional failure to be
434 ignored. Note that the use of this option can lead to messages
435 like "Feature X not implemented", followed shortly by "Error:
436 unable to enable Feature X". In a few such cases, contrary to
437 the final message, Feature X is enabled.
438
439 verypermissive - equivalent to giving a large number of ´-T per‐
440 missive´ options: ignore failures of any number of mandatory
441 SMART commands. Please see the note above.
442
443 -b TYPE, --badsum=TYPE
444 [ATA only] Specifies the action smartctl should take if a check‐
445 sum error is detected in the: (1) Device Identity Structure, (2)
446 SMART Self-Test Log Structure, (3) SMART Attribute Value Struc‐
447 ture, (4) SMART Attribute Threshold Structure, or (5) ATA Error
448 Log Structure.
449
450 The valid arguments to this option are:
451
452 warn - report the incorrect checksum but carry on in spite of
453 it. This is the default.
454
455 exit - exit smartctl.
456
457 ignore - continue silently without issuing a warning.
458
459 -r TYPE, --report=TYPE
460 Intended primarily to help smartmontools developers understand
461 the behavior of smartmontools on non-conforming or poorly con‐
462 forming hardware. This option reports details of smartctl
463 transactions with the device. The option can be used multiple
464 times. When used just once, it shows a record of the ioctl()
465 transactions with the device. When used more than once, the
466 detail of these ioctl() transactions are reported in greater
467 detail. The valid arguments to this option are:
468
469 ioctl - report all ioctl() transactions.
470
471 ataioctl - report only ioctl() transactions with ATA devices.
472
473 scsiioctl - report only ioctl() transactions with SCSI devices.
474 Invoking this once shows the SCSI commands in hex and the corre‐
475 sponding status. Invoking it a second time adds a hex listing of
476 the first 64 bytes of data send to, or received from the device.
477
478 Any argument may include a positive integer to specify the level
479 of detail that should be reported. The argument should be fol‐
480 lowed by a comma then the integer with no spaces. For example,
481 ataioctl,2 The default level is 1, so ´-r ataioctl,1´ and ´-r
482 ataioctl´ are equivalent.
483
484 For testing purposes, the output of ´-r ataioctl,2´ can later be
485 parsed by smartctl itself if ´-´ is used as device path argu‐
486 ment. The ATA command input parameters, sector data and return
487 values are reconstructed from the debug report read from stdin.
488 Then smartctl internally simulates an ATA device with the same
489 behaviour. This is does not work for SCSI devices yet.
490
491 -n POWERMODE, --nocheck=POWERMODE
492 [ATA only] Specifies if smartctl should exit before performing
493 any checks when the device is in a low-power mode. It may be
494 used to prevent a disk from being spun-up by smartctl. The power
495 mode is ignored by default. The allowed values of POWERMODE are:
496
497 never - check the device always, but print the power mode if
498 ´-i´ is specified.
499
500 sleep - check the device unless it is in SLEEP mode.
501
502 standby - check the device unless it is in SLEEP or STANDBY
503 mode. In these modes most disks are not spinning, so if you
504 want to prevent a disk from spinning up, this is probably what
505 you want.
506
507 idle - check the device unless it is in SLEEP, STANDBY or IDLE
508 mode. In the IDLE state, most disks are still spinning, so this
509 is probably not what you want.
510
511
512 SMART FEATURE ENABLE/DISABLE COMMANDS:
513
514 Note: if multiple options are used to both enable and disable a
515 feature, then both the enable and disable commands will be
516 issued. The enable command will always be issued before the
517 corresponding disable command.
518
519 -s VALUE, --smart=VALUE
520 Enables or disables SMART on device. The valid arguments to
521 this option are on and off. Note that the command ´-s on´ (per‐
522 haps used with with the ´-o on´ and ´-S on´ options) should be
523 placed in a start-up script for your machine, for example in
524 rc.local or rc.sysinit. In principle the SMART feature settings
525 are preserved over power-cycling, but it doesn´t hurt to be
526 sure. It is not necessary (or useful) to enable SMART to see the
527 TapeAlert messages.
528
529 -o VALUE, --offlineauto=VALUE
530 [ATA only] Enables or disables SMART automatic offline test,
531 which scans the drive every four hours for disk defects. This
532 command can be given during normal system operation. The valid
533 arguments to this option are on and off.
534
535 Note that the SMART automatic offline test command is listed as
536 "Obsolete" in every version of the ATA and ATA/ATAPI Specifica‐
537 tions. It was originally part of the SFF-8035i Revision 2.0
538 specification, but was never part of any ATA specification.
539 However it is implemented and used by many vendors. [Good docu‐
540 mentation can be found in IBM´s Official Published Disk Specifi‐
541 cations. For example the IBM Travelstar 40GNX Hard Disk Drive
542 Specifications (Revision 1.1, 22 April 2002, Publication # 1541,
543 Document S07N-7715-02) page 164. You can also read the SFF-8035i
544 Specification -- see REFERENCES below.] You can tell if auto‐
545 matic offline testing is supported by seeing if this command
546 enables and disables it, as indicated by the ´Auto Offline Data
547 Collection´ part of the SMART capabilities report (displayed
548 with ´-c´).
549
550 SMART provides three basic categories of testing. The first
551 category, called "online" testing, has no effect on the perfor‐
552 mance of the device. It is turned on by the ´-s on´ option.
553
554 The second category of testing is called "offline" testing. This
555 type of test can, in principle, degrade the device performance.
556 The ´-o on´ option causes this offline testing to be carried
557 out, automatically, on a regular scheduled basis. Normally, the
558 disk will suspend offline testing while disk accesses are taking
559 place, and then automatically resume it when the disk would oth‐
560 erwise be idle, so in practice it has little effect. Note that
561 a one-time offline test can also be carried out immediately upon
562 receipt of a user command. See the ´-t offline´ option below,
563 which causes a one-time offline test to be carried out immedi‐
564 ately.
565
566 The choice (made by the SFF-8035i and ATA specification authors)
567 of the word testing for these first two categories is unfortu‐
568 nate, and often leads to confusion. In fact these first two
569 categories of online and offline testing could have been more
570 accurately described as online and offline data collection.
571
572 The results of this automatic or immediate offline testing (data
573 collection) are reflected in the values of the SMART Attributes.
574 Thus, if problems or errors are detected, the values of these
575 Attributes will go below their failure thresholds; some types of
576 errors may also appear in the SMART error log. These are visible
577 with the ´-A´ and ´-l error´ options respectively.
578
579 Some SMART attribute values are updated only during off-line
580 data collection activities; the rest are updated during normal
581 operation of the device or during both normal operation and
582 off-line testing. The Attribute value table produced by the
583 ´-A´ option indicates this in the UPDATED column. Attributes of
584 the first type are labeled "Offline" and Attributes of the sec‐
585 ond type are labeled "Always".
586
587 The third category of testing (and the only category for which
588 the word ´testing´ is really an appropriate choice) is "self"
589 testing. This third type of test is only performed (immedi‐
590 ately) when a command to run it is issued. The ´-t´ and ´-X´
591 options can be used to carry out and abort such self-tests;
592 please see below for further details.
593
594 Any errors detected in the self testing will be shown in the
595 SMART self-test log, which can be examined using the ´-l self‐
596 test´ option.
597
598 Note: in this manual page, the word "Test" is used in connection
599 with the second category just described, e.g. for the "offline"
600 testing. The words "Self-test" are used in connection with the
601 third category.
602
603 -S VALUE, --saveauto=VALUE
604 [ATA] Enables or disables SMART autosave of device vendor-spe‐
605 cific Attributes. The valid arguments to this option are on and
606 off. Note that this feature is preserved across disk power
607 cycles, so you should only need to issue it once.
608
609 The ATA standard does not specify a method to check whether
610 SMART autosave is enabled. Unlike SCSI (below), smartctl is
611 unable to print a warning if autosave is disabled.
612
613 [SCSI] For SCSI devices this toggles the value of the Global
614 Logging Target Save Disabled (GLTSD) bit in the Control Mode
615 Page. Some disk manufacturers set this bit by default. This pre‐
616 vents error counters, power-up hours and other useful data from
617 being placed in non-volatile storage, so these values may be
618 reset to zero the next time the device is power-cycled. If the
619 GLTSD bit is set then ´smartctl -a´ will issue a warning. Use on
620 to clear the GLTSD bit and thus enable saving counters to
621 non-volatile storage. For extreme streaming-video type applica‐
622 tions you might consider using off to set the GLTSD bit.
623
624
625 SMART READ AND DISPLAY DATA OPTIONS:
626
627 -H, --health
628 Check: Ask the device to report its SMART health status or pend‐
629 ing TapeAlert messages. SMART status is based on information
630 that it has gathered from online and offline tests, which were
631 used to determine/update its SMART vendor-specific Attribute
632 values. TapeAlert status is obtained by reading the TapeAlert
633 log page.
634
635 If the device reports failing health status, this means either
636 that the device has already failed, or that it is predicting its
637 own failure within the next 24 hours. If this happens, use the
638 ´-a´ option to get more information, and get your data off the
639 disk and to someplace safe as soon as you can.
640
641 -c, --capabilities
642 [ATA only] Prints only the generic SMART capabilities. These
643 show what SMART features are implemented and how the device will
644 respond to some of the different SMART commands. For example it
645 shows if the device logs errors, if it supports offline surface
646 scanning, and so on. If the device can carry out self-tests,
647 this option also shows the estimated time required to run those
648 tests.
649
650 Note that the time required to run the Self-tests (listed in
651 minutes) are fixed. However the time required to run the Imme‐
652 diate Offline Test (listed in seconds) is variable. This means
653 that if you issue a command to perform an Immediate Offline test
654 with the ´-t offline´ option, then the time may jump to a larger
655 value and then count down as the Immediate Offline Test is car‐
656 ried out. Please see REFERENCES below for further information
657 about the the flags and capabilities described by this option.
658
659 -A, --attributes
660 [ATA] Prints only the vendor specific SMART Attributes. The
661 Attributes are numbered from 1 to 253 and have specific names
662 and ID numbers. For example Attribute 12 is "power cycle count":
663 how many times has the disk been powered up.
664
665 Each Attribute has a "Raw" value, printed under the heading
666 "RAW_VALUE", and a "Normalized" value printed under the heading
667 "VALUE". [Note: smartctl prints these values in base-10.] In
668 the example just given, the "Raw Value" for Attribute 12 would
669 be the actual number of times that the disk has been
670 power-cycled, for example 365 if the disk has been turned on
671 once per day for exactly one year. Each vendor uses their own
672 algorithm to convert this "Raw" value to a "Normalized" value in
673 the range from 1 to 254. Please keep in mind that smartctl only
674 reports the different Attribute types, values, and thresholds as
675 read from the device. It does not carry out the conversion
676 between "Raw" and "Normalized" values: this is done by the
677 disk´s firmware.
678
679 The conversion from Raw value to a quantity with physical units
680 is not specified by the SMART standard. In most cases, the val‐
681 ues printed by smartctl are sensible. For example the tempera‐
682 ture Attribute generally has its raw value equal to the tempera‐
683 ture in Celsius. However in some cases vendors use unusual con‐
684 ventions. For example the Hitachi disk on my laptop reports its
685 power-on hours in minutes, not hours. Some IBM disks track three
686 temperatures rather than one, in their raw values. And so on.
687
688 Each Attribute also has a Threshold value (whose range is 0 to
689 255) which is printed under the heading "THRESH". If the Nor‐
690 malized value is less than or equal to the Threshold value, then
691 the Attribute is said to have failed. If the Attribute is a
692 pre-failure Attribute, then disk failure is imminent.
693
694 Each Attribute also has a "Worst" value shown under the heading
695 "WORST". This is the smallest (closest to failure) value that
696 the disk has recorded at any time during its lifetime when SMART
697 was enabled. [Note however that some vendors firmware may actu‐
698 ally increase the "Worst" value for some "rate-type"
699 Attributes.]
700
701 The Attribute table printed out by smartctl also shows the
702 "TYPE" of the Attribute. Attributes are one of two possible
703 types: Pre-failure or Old age. Pre-failure Attributes are ones
704 which, if less than or equal to their threshold values, indicate
705 pending disk failure. Old age, or usage Attributes, are ones
706 which indicate end-of-product life from old-age or normal aging
707 and wearout, if the Attribute value is less than or equal to the
708 threshold. Please note: the fact that an Attribute is of type
709 'Pre-fail' does not mean that your disk is about to fail! It
710 only has this meaning if the Attribute´s current Normalized
711 value is less than or equal to the threshold value.
712
713 If the Attribute´s current Normalized value is less than or
714 equal to the threshold value, then the "WHEN_FAILED" column will
715 display "FAILING_NOW". If not, but the worst recorded value is
716 less than or equal to the threshold value, then this column will
717 display "In_the_past". If the "WHEN_FAILED" column has no entry
718 (indicated by a dash: ´-´) then this Attribute is OK now (not
719 failing) and has also never failed in the past.
720
721 The table column labeled "UPDATED" shows if the SMART Attribute
722 values are updated during both normal operation and off-line
723 testing, or only during offline testing. The former are labeled
724 "Always" and the latter are labeled "Offline".
725
726 So to summarize: the Raw Attribute values are the ones that
727 might have a real physical interpretation, such as "Temperature
728 Celsius", "Hours", or "Start-Stop Cycles". Each manufacturer
729 converts these, using their detailed knowledge of the disk´s
730 operations and failure modes, to Normalized Attribute values in
731 the range 1-254. The current and worst (lowest measured) of
732 these Normalized Attribute values are stored on the disk, along
733 with a Threshold value that the manufacturer has determined will
734 indicate that the disk is going to fail, or that it has exceeded
735 its design age or aging limit. smartctl does not calculate any
736 of the Attribute values, thresholds, or types, it merely reports
737 them from the SMART data on the device.
738
739 Note that starting with ATA/ATAPI-4, revision 4, the meaning of
740 these Attribute fields has been made entirely vendor-specific.
741 However most ATA/ATAPI-5 disks seem to respect their meaning, so
742 we have retained the option of printing the Attribute values.
743
744 [SCSI] For SCSI devices the "attributes" are obtained from the
745 temperature and start-stop cycle counter log pages. Certain ven‐
746 dor specific attributes are listed if recognised. The attributes
747 are output in a relatively free format (compared with ATA disk
748 attributes).
749
750 -l TYPE, --log=TYPE
751 Prints either the SMART Error Log, the SMART Self-Test Log, the
752 SMART Selective Self-Test Log [ATA only], the Log Directory [ATA
753 only], or the Background Scan Results Log [SCSI only]. The
754 valid arguments to this option are:
755
756 error - [ATA] prints the Summary SMART error log. SMART disks
757 maintain a log of the most recent five non-trivial errors. For
758 each of these errors, the disk power-on lifetime at which the
759 error occurred is recorded, as is the device status (idle,
760 standby, etc) at the time of the error. For some common types
761 of errors, the Error Register (ER) and Status Register (SR) val‐
762 ues are decoded and printed as text. The meanings of these are:
763 ABRT: Command ABoRTed
764 AMNF: Address Mark Not Found
765 CCTO: Command Completion Timed Out
766 EOM: End Of Media
767 ICRC: Interface Cyclic Redundancy Code (CRC) error
768 IDNF: IDentity Not Found
769 ILI: (packet command-set specific)
770 MC: Media Changed
771 MCR: Media Change Request
772 NM: No Media
773 obs: obsolete
774 TK0NF: TracK 0 Not Found
775 UNC: UNCorrectable Error in Data
776 WP: Media is Write Protected
777 In addition, up to the last five commands that preceded the
778 error are listed, along with a timestamp measured from the start
779 of the corresponding power cycle. This is displayed in the form
780 Dd+HH:MM:SS.msec where D is the number of days, HH is hours, MM
781 is minutes, SS is seconds and msec is milliseconds. [Note: this
782 time stamp wraps after 2^32 milliseconds, or 49 days 17 hours 2
783 minutes and 47.296 seconds.] The key ATA disk registers are
784 also recorded in the log. The final column of the error log is
785 a text-string description of the ATA command defined by the Com‐
786 mand Register (CR) and Feature Register (FR) values. Commands
787 that are obsolete in the most current (ATA-7) spec are listed
788 like this: READ LONG (w/ retry) [OBS-4], indicating that the
789 command became obsolete with or in the ATA-4 specification.
790 Similarly, the notation [RET-N] is used to indicate that a com‐
791 mand was retired in the ATA-N specification. Some commands are
792 not defined in any version of the ATA specification but are in
793 common use nonetheless; these are marked [NS], meaning non-stan‐
794 dard.
795
796 The ATA Specification (ATA-5 Revision 1c, Section 8.41.6.8.2)
797 says: "Error log structures shall include UNC errors, IDNF
798 errors for which the address requested was valid, servo errors,
799 write fault errors, etc. Error log data structures shall not
800 include errors attributed to the receipt of faulty commands such
801 as command codes not implemented by the device or requests with
802 invalid parameters or invalid addresses." The definitions of
803 these terms are:
804 UNC (UNCorrectable): data is uncorrectable. This refers to data
805 which has been read from the disk, but for which the Error
806 Checking and Correction (ECC) codes are inconsistent. In
807 effect, this means that the data can not be read.
808 IDNF (ID Not Found): user-accessible address could not be found.
809 For READ LOG type commands, IDNF can also indicate that a device
810 data log structure checksum was incorrect.
811
812 If the command that caused the error was a READ or WRITE com‐
813 mand, then the Logical Block Address (LBA) at which the error
814 occurred will be printed in base 10 and base 16. The LBA is a
815 linear address, which counts 512-byte sectors on the disk,
816 starting from zero. (Because of the limitations of the SMART
817 error log, if the LBA is greater than 0xfffffff, then either no
818 error log entry will be made, or the error log entry will have
819 an incorrect LBA. This may happen for drives with a capacity
820 greater than 128 GiB or 137 GB.) On Linux systems the smartmon‐
821 tools web page has instructions about how to convert the LBA
822 address to the name of the disk file containing the erroneous
823 disk sector.
824
825 Please note that some manufacturers ignore the ATA specifica‐
826 tions, and make entries in the error log if the device receives
827 a command which is not implemented or is not valid.
828
829 error - [SCSI] prints the error counter log pages for reads,
830 write and verifies. The verify row is only output if it has an
831 element other than zero.
832
833 xerror[,NUM][,error] - [ATA only] [NEW EXPERIMENTAL SMARTCTL
834 FEATURE] prints the Extended Comprehensive SMART error log (Gen‐
835 eral Purpose Log address 0x03). Unlike the Summary SMART error
836 log (see ´-l error´ above), it provides sufficient space to log
837 the contents of the 48-bit LBA register set introduced with
838 ATA-6. It also supports logs with more than one sector. Each
839 sector holds up to 4 log entries. The actual number of log sec‐
840 tors is vendor specific, typical values for HDD are 2 (Samsung),
841 5 (Seagate) or 6 (WD). Some recent SSD devices have much larger
842 error logs.
843
844 Only the 8 most recent error log entries are printed by default.
845 This number can be changed by the optional parameter NUM.
846
847 If ',error' is appended and the Extended Comprehensive SMART
848 error log is not supported, the Summary SMART self-test log is
849 printed.
850
851 Please note that some recent (e.g. Samsung) drives report errors
852 only in the Extended Comprehensive SMART error log. The Summary
853 SMART error log can be read but is always empty.
854
855 selftest - [ATA] prints the SMART self-test log. The disk main‐
856 tains a self-test log showing the results of the self tests,
857 which can be run using the ´-t´ option described below. For
858 each of the most recent twenty-one self-tests, the log shows the
859 type of test (short or extended, off-line or captive) and the
860 final status of the test. If the test did not complete success‐
861 fully, then the percentage of the test remaining is shown. The
862 time at which the test took place, measured in hours of disk
863 lifetime, is also printed. [Note: this time stamp wraps after
864 2^16 hours, or 2730 days and 16 hours, or about 7.5 years.] If
865 any errors were detected, the Logical Block Address (LBA) of the
866 first error is printed in decimal notation. On Linux systems
867 the smartmontools web page has instructions about how to convert
868 this LBA address to the name of the disk file containing the
869 erroneous block.
870
871 selftest - [SCSI] the self-test log for a SCSI device has a
872 slightly different format than for an ATA device. For each of
873 the most recent twenty self-tests, it shows the type of test and
874 the status (final or in progress) of the test. SCSI standards
875 use the terms "foreground" and "background" (rather than ATA´s
876 corresponding "captive" and "off-line") and "short" and "long"
877 (rather than ATA´s corresponding "short" and "extended") to
878 describe the type of the test. The printed segment number is
879 only relevant when a test fails in the third or later test seg‐
880 ment. It identifies the test that failed and consists of either
881 the number of the segment that failed during the test, or the
882 number of the test that failed and the number of the segment in
883 which the test was run, using a vendor-specific method of
884 putting both numbers into a single byte. The Logical Block
885 Address (LBA) of the first error is printed in hexadecimal nota‐
886 tion. On Linux systems the smartmontools web page has instruc‐
887 tions about how to convert this LBA address to the name of the
888 disk file containing the erroneous block. If provided, the SCSI
889 Sense Key (SK), Additional Sense Code (ASC) and Additional Sense
890 Code Qualifier (ASQ) are also printed. The self tests can be run
891 using the ´-t´ option described below (using the ATA test termi‐
892 nology).
893
894 xselftest[,NUM][,selftest] - [ATA only] [NEW EXPERIMENTAL
895 SMARTCTL FEATURE] prints the Extended SMART self-test log (Gen‐
896 eral Purpose Log address 0x07). Unlike the SMART self-test log
897 (see ´-l selftest´ above), it supports 48-bit LBA and logs with
898 more than one sector. Each sector holds up to 19 log entries.
899 The actual number of log sectors is vendor specific, typical
900 values are 1 (Seagate) or 2 (Samsung).
901
902 Only the 25 most recent log entries are printed by default. This
903 number can be changed by the optional parameter NUM.
904
905 If ',selftest' is appended and the Extended SMART self-test log
906 is not supported, the old SMART self-test log is printed.
907
908 selective - [ATA only] Please see the ´-t select´ option below
909 for a description of selective self-tests. The selective
910 self-test log shows the start/end Logical Block Addresses (LBA)
911 of each of the five test spans, and their current test status.
912 If the span is being tested or the remainder of the disk is
913 being read-scanned, the current 65536-sector block of LBAs being
914 tested is also displayed. The selective self-test log also
915 shows if a read-scan of the remainder of the disk will be car‐
916 ried out after the selective self-test has completed (see ´-t
917 afterselect´ option) and the time delay before restarting this
918 read-scan if it is interrupted (see ´-t pending´ option). This
919 is a new smartmontools feature; please report unusual or incor‐
920 rect behavior to the smartmontools-support mailing list.
921
922 directory[,gs] - [ATA only] if the device supports the General
923 Purpose Logging feature set (ATA-6 and above) then this prints
924 the Log Directory (the log at address 0). The Log Directory
925 shows what logs are available and their length in sectors (512
926 bytes). The contents of the logs at address 1 [Summary SMART
927 error log] and at address 6 [SMART self-test log] may be printed
928 using the previously-described error and selftest arguments to
929 this option. If your version of smartctl supports 48-bit ATA
930 commands, both the General Purpose Log (GPL) and SMART Log (SL)
931 directories are printed in one combined table. The output can be
932 restricted to the GPL directory or SL directory by ´-l direc‐
933 tory,q´ or ´-l directory,s´ respectively.
934
935 background - [SCSI only] the background scan results log outputs
936 information derived from Background Media Scans (BMS) done after
937 power up and/or periodocally (e.g. every 24 hours) on recent
938 SCSI disks. If supported, the BMS status is output first, indi‐
939 cating whether a background scan is currently underway (and if
940 so a progress percentage), the amount of time the disk has been
941 powered up and the number of scans already completed. Then there
942 is a header and a line for each background scan "event". These
943 will typically be either recovered or unrecoverable errors. That
944 latter group may need some attention. There is a description of
945 the background scan mechansim in section 4.18 of SBC-3 revision
946 6 (see www.t10.org ).
947
948 scttemp, scttempsts, scttemphist - [ATA only] prints the disk
949 temperature information provided by the SMART Command Transport
950 (SCT) commands. The option ´scttempsts´ prints current tempera‐
951 ture and temperature ranges returned by the SCT Status command,
952 ´scttemphist´ prints temperature limits and the temperature his‐
953 tory table returned by the SCT Data Table command, and ´scttemp´
954 prints both. The temperature values are preserved across power
955 cycles. The default temperature logging interval is 1 minute
956 and can be configured with the ´-t scttempint,N[,p]´ option, see
957 below. The SCT commands are specified in the proposed ATA-8
958 Command Set (ACS), and are already implemented in some recent
959 ATA-7 disks.
960
961 scterc[,READTIME,WRITETIME] - [ATA only] [NEW EXPERIMENTAL
962 SMARTCTL FEATURE] prints values and descriptions of the SCT
963 Error Recovery Control settings. These are equivalent to TLER
964 (as used by Western Digital), CCTL (as used by Samsung and
965 Hitachi) and ERC (as used by Seagate). READTIME and WRITETIME
966 arguments (deciseconds) set the specified values. Values of 0
967 disable the feature, other values less than 65 are probably not
968 supported. For RAID configurations, this is typically set to
969 70,70 deciseconds.
970
971 sataphy[,reset] - [SATA only] [NEW EXPERIMENTAL SMARTCTL FEA‐
972 TURE] prints values and descriptions of the SATA Phy Event Coun‐
973 ters (General Purpose Log address 0x11). If ´-l sataphy,reset´
974 is specified, all counters are reset after reading the values.
975
976 sasphy[,reset] - [SAS (SCSI) only] [NEW EXPERIMENTAL SMARTCTL
977 FEATURE] prints values and descriptions of the SAS (SSP) Proto‐
978 col Specific log page (log page 0x18). If ´-l sasphy,reset´ is
979 specified, all counters are reset after reading the values.
980
981 gplog,ADDR[,FIRST[-LAST|+SIZE]] - [ATA only] [NEW EXPERIMENTAL
982 SMARTCTL FEATURE] prints a hex dump of any log accessible via
983 General Purpose Logging (GPL) feature. The log address ADDR is
984 the hex address listed in the log directory (see ´-l directory´
985 above). The range of log sectors (pages) can be specified by
986 decimal values FIRST-LAST or FIRST+SIZE. FIRST defaults to 0,
987 SIZE defaults to 1. LAST can be set to ´max´ to specify the last
988 page of the log.
989
990 smartlog,ADDR[,FIRST[-LAST|+SIZE]] - [ATA only] [NEW EXPERIMEN‐
991 TAL SMARTCTL FEATURE] prints a hex dump of any log accessible
992 via SMART Read Log command. See ´-l gplog,...´ above for parame‐
993 ter syntax.
994
995 For example, all these commands:
996 smartctl -l gplog,0x80,10-15 /dev/sda
997 smartctl -l gplog,0x80,10+6 /dev/sda
998 smartctl -l smartlog,0x80,10-15 /dev/sda
999 print pages 10-15 of log 0x80 (first host vendor specific log).
1000
1001 The hex dump format is compatible with the ´xxd -r´ command.
1002 This command:
1003 smartctl -l gplog,0x11 /dev/sda | grep ^0 | xxd -r >log.bin
1004 writes a binary representation of the one sector log 0x11 (SATA
1005 Phy Event Counters) to file log.bin.
1006
1007 -v ID,FORMAT[:BYTEORDER][,NAME], --vendorattribute=ID,FORMAT[:BYTE‐
1008 ORDER][,NAME]
1009 [ATA only] Sets a vendor-specific raw value print FORMAT, an
1010 optional BYTEORDER and an optional NAME for Attribute ID. This
1011 option may be used multiple times.
1012
1013 The Attribute ID can be in the range 1 to 255. If ´N´ is speci‐
1014 fied as ID, the settings for all Attributes are changed.
1015
1016 The optional BYTEORDER consists of 1 to 8 characters from the
1017 set ´012345rvwz´. The characters ´0´ to ´5´ select the byte 0 to
1018 5 from the 48-bit raw value, ´r´ selects the reserved byte of
1019 the attribute data block, ´v´ selects the normalized value, ´w´
1020 selects the worst value and ´z´ inserts a zero byte. The
1021 default BYTEORDER is ´543210´ for all 48-bit formats, ´r543210´
1022 for the 54-bit formats, and ´543210wv´ for the 64-bit formats.
1023 For example, ´-v 5,raw48:012345´ prints the raw value of
1024 attribute 5 with big endian instead of little endian byte order‐
1025 ing.
1026
1027 The NAME is a string of letters, digits and underscore.
1028
1029 -v help - Prints (to STDOUT) a list of all valid arguments to
1030 this option, then exits.
1031
1032 Valid arguments for FORMAT are:
1033
1034 raw8 - Print the Raw value as six 8-bit unsigned base-10 inte‐
1035 gers. This may be useful for decoding the meaning of the Raw
1036 value.
1037
1038 raw16 - Print the Raw value as three 16-bit unsigned base-10
1039 integers. This may be useful for decoding the meaning of the
1040 Raw value.
1041
1042 raw48 - Print the Raw value as a 48-bit unsigned base-10 inte‐
1043 ger. This is the default for most attributes.
1044
1045 hex48 - Print the Raw value as a 12 digit hexadecimal number.
1046 This may be useful for decoding the meaning of the Raw value.
1047
1048 raw64 - Print the Raw value as a 64-bit unsigned base-10 inte‐
1049 ger. This includes two bytes from the normalized and worst
1050 attribute value. This new raw format is used by some recent SSD
1051 devices.
1052
1053 hex64 - Print the Raw value as a 16 digit hexadecimal number.
1054 This includes two bytes from the normalized and worst attribute
1055 value. This new raw format is used by some recent SSD devices.
1056
1057 min2hour - Raw Attribute is power-on time in minutes. Its raw
1058 value will be displayed in the form "Xh+Ym". Here X is hours,
1059 and Y is minutes in the range 0-59 inclusive. Y is always
1060 printed with two digits, for example "06" or "31" or "00".
1061
1062 sec2hour - Raw Attribute is power-on time in seconds. Its raw
1063 value will be displayed in the form "Xh+Ym+Zs". Here X is
1064 hours, Y is minutes in the range 0-59 inclusive, and Z is sec‐
1065 onds in the range 0-59 inclusive. Y and Z are always printed
1066 with two digits, for example "06" or "31" or "00".
1067
1068 halfmin2hour - Raw Attribute is power-on time, measured in units
1069 of 30 seconds. This format is used by some Samsung disks. Its
1070 raw value will be displayed in the form "Xh+Ym". Here X is
1071 hours, and Y is minutes in the range 0-59 inclusive. Y is
1072 always printed with two digits, for example "06" or "31" or
1073 "00".
1074
1075 msec24hour32 - Raw Attribute is power-on time measured in 32-bit
1076 hours and 24-bit milliseconds since last hour update. It will
1077 be displayed in the form "Xh+Ym+Z.Ms". Here X is hours, Y is
1078 minutes, Z is seconds and M is milliseconds.
1079
1080 tempminmax - Raw Attribute is the disk temperature in Celsius.
1081 Info about Min/Max temperature is printed if available. This is
1082 the default for Attributes 190 and 194. The recording interval
1083 (lifetime, last power cycle, last soft reset) of the min/max
1084 values is device specific.
1085
1086 temp10x - Raw Attribute is ten times the disk temperature in
1087 Celsius.
1088
1089 raw16(raw16) - Print the raw attribute as a 16-bit value and two
1090 optional 16-bit values if these words are nonzero. This is the
1091 default for Attributes 5 and 196.
1092
1093 raw16(avg16) - Raw attribute is spin-up time. It is printed as
1094 a 16-bit value and an optional "Average" 16-bit value if the
1095 word is nonzero. This is the default for Attribute 3.
1096
1097 raw24/raw24 - Raw Attribute contains two 24-bit values. The
1098 first is the number of load cycles. The second is the number of
1099 unload cycles. The difference between these two values is the
1100 number of times that the drive was unexpectedly powered off
1101 (also called an emergency unload). As a rule of thumb, the
1102 mechanical stress created by one emergency unload is equivalent
1103 to that created by one hundred normal unloads.
1104
1105 raw24/raw32 - Raw attribute is an error rate which consists of a
1106 24-bit error count and a 32-bit total count.
1107
1108 The following old arguments to ´-v´ are also still valid:
1109
1110 9,minutes - same as: 9,min2hour,Power_On_Minutes.
1111
1112 9,seconds - same as: 9,sec2hour,Power_On_Seconds.
1113
1114 9,halfminutes - same as: 9,halfmin2hour,Power_On_Half_Minutes.
1115
1116 9,temp - same as: 9,tempminmax,Temperature_Celsius.
1117
1118 192,emergencyretractcyclect - same as:
1119 192,raw48,Emerg_Retract_Cycle_Ct
1120
1121 193,loadunload - same as: 193,raw24/raw24.
1122
1123 194,10xCelsius - same as: 194,temp10x,Temperature_Celsius_x10.
1124
1125 194,unknown - same as: 194,raw48,Unknown_Attribute.
1126
1127 197,increasing - same as: 197,raw48,Total_Pending_Sectors. Also
1128 means that Attribute number 197 (Current Pending Sector Count)
1129 is not reset if uncorrectable sectors are reallocated (see
1130 smartd.conf(5) man page).
1131
1132 198,increasing - same as: 198,raw48,Total_Offl_Uncorrectabl.
1133 Also means that Attribute number 198 (Offline Uncorrectable Sec‐
1134 tor Count) is not reset if uncorrectable sectors are reallocated
1135 (see smartd.conf(5) man page).
1136
1137 198,offlinescanuncsectorct - same as: 198,raw48,Off‐
1138 line_Scan_UNC_SectCt.
1139
1140 200,writeerrorcount - same as: 200,raw48,Write_Error_Count.
1141
1142 201,detectedtacount - same as: 201,raw48,Detected_TA_Count.
1143
1144 220,temp - same as: 220,raw48,Temperature_Celsius.
1145
1146 Note: a table of hard drive models, listing which Attribute cor‐
1147 responds to temperature, can be found at:
1148 http://www.guzu.net/linux/hddtemp.db
1149
1150 -F TYPE, --firmwarebug=TYPE
1151 [ATA only] Modifies the behavior of smartctl to compensate for
1152 some known and understood device firmware or driver bug. Except
1153 ´swapid´, the arguments to this option are exclusive, so that
1154 only the final option given is used. The valid values are:
1155
1156 none - Assume that the device firmware obeys the ATA specifica‐
1157 tions. This is the default, unless the device has presets for
1158 ´-F´ in the device database (see note below).
1159
1160 samsung - In some Samsung disks (example: model SV4012H Firmware
1161 Version: RM100-08) some of the two- and four-byte quantities in
1162 the SMART data structures are byte-swapped (relative to the ATA
1163 specification). Enabling this option tells smartctl to evaluate
1164 these quantities in byte-reversed order. Some signs that your
1165 disk needs this option are (1) no self-test log printed, even
1166 though you have run self-tests; (2) very large numbers of ATA
1167 errors reported in the ATA error log; (3) strange and impossible
1168 values for the ATA error log timestamps.
1169
1170 samsung2 - In some Samsung disks the number of ATA errors
1171 reported is byte swapped. Enabling this option tells smartctl
1172 to evaluate this quantity in byte-reversed order. An indication
1173 that your Samsung disk needs this option is that the self-test
1174 log is printed correctly, but there are a very large number of
1175 errors in the SMART error log. This is because the error count
1176 is byte swapped. Thus a disk with five errors (0x0005) will
1177 appear to have 20480 errors (0x5000).
1178
1179 samsung3 - Some Samsung disks (at least SP2514N with Firmware
1180 VF100-37) report a self-test still in progress with 0% remaining
1181 when the test was already completed. Enabling this option modi‐
1182 fies the output of the self-test execution status (see options
1183 ´-c´ or ´-a´ above) accordingly.
1184
1185 Note that an explicit ´-F´ option on the command line will
1186 over-ride any preset values for ´-F´ (see the ´-P´ option
1187 below).
1188
1189 swapid - Fixes byte swapped ATA identify strings (device name,
1190 serial number, firmware version) returned by some buggy device
1191 drivers.
1192
1193 -P TYPE, --presets=TYPE
1194 [ATA only] Specifies whether smartctl should use any preset
1195 options that are available for this drive. By default, if the
1196 drive is recognized in the smartmontools database, then the pre‐
1197 sets are used.
1198
1199 smartctl can automatically set appropriate options for known
1200 drives. For example, the Maxtor 4D080H4 uses Attribute 9 to
1201 stores power-on time in minutes whereas most drives use that
1202 Attribute to store the power-on time in hours. The command-line
1203 option ´-v 9,minutes´ ensures that smartctl correctly interprets
1204 Attribute 9 in this case, but that option is preset for the Max‐
1205 tor 4D080H4 and so need not be specified by the user on the
1206 smartctl command line.
1207
1208 The argument show will show any preset options for your drive
1209 and the argument showall will show all known drives in the
1210 smartmontools database, along with their preset options. If
1211 there are no presets for your drive and you think there should
1212 be (for example, a -v or -F option is needed to get smartctl to
1213 display correct values) then please contact the smartmontools
1214 developers so that this information can be added to the smart‐
1215 montools database. Contact information is at the end of this
1216 man page.
1217
1218 The valid arguments to this option are:
1219
1220 use - if a drive is recognized, then use the stored presets for
1221 it. This is the default. Note that presets will NOT over-ride
1222 additional Attribute interpretation (´-v N,something´) com‐
1223 mand-line options or explicit ´-F´ command-line options..
1224
1225 ignore - do not use presets.
1226
1227 show - show if the drive is recognized in the database, and if
1228 so, its presets, then exit.
1229
1230 showall - list all recognized drives, and the presets that are
1231 set for them, then exit.
1232
1233 The ´-P showall´ option takes up to two optional arguments to
1234 match a specific drive type and firmware version. The command:
1235 smartctl -P showall
1236 lists all entries, the command:
1237 smartctl -P showall ´MODEL´
1238 lists all entries matching MODEL, and the command:
1239 smartctl -P showall ´MODEL´ ´FIRMWARE´
1240 lists all entries for this MODEL and a specific FIRMWARE ver‐
1241 sion.
1242
1243 -B [+]FILE, --drivedb=[+]FILE
1244 [ATA only] [NEW EXPERIMENTAL SMARTCTL FEATURE] Read the drive
1245 database from FILE. The new database replaces the built in
1246 database by default. If ´+´ is specified, then the new entries
1247 prepend the built in entries.
1248
1249 If this option is not specified, optional entries are read from
1250 the file /etc/smart_drivedb.h (Windows: EXEDIR/drivedb-add.h).
1251 If /usr/share/smartmontools/drivedb.h (Windows:
1252 EXEDIR/drivedb.h) is present, the contents of this file is used
1253 instead of the built in table.
1254
1255 Run the script /usr/sbin/update-smart-drivedb to update this
1256 file from the smartmontools SVN repository.
1257
1258 The database files use the same C/C++ syntax that is used to
1259 initialize the built in database array. C/C++ style comments are
1260 allowed. Example:
1261
1262 /* Full entry: */
1263 {
1264 "Model family", // Info about model family/series.
1265 "MODEL1.*REGEX", // Regular expression to match model of device.
1266 "VERSION.*REGEX", // Regular expression to match firmware version(s).
1267 "Some warning", // Warning message.
1268 "-v 9,minutes" // String of preset -v and -F options.
1269 },
1270 /* Minimal entry: */
1271 {
1272 "", // No model family/series info.
1273 "MODEL2.*REGEX", // Regular expression to match model of device.
1274 "", // All firmware versions.
1275 "", // No warning.
1276 "" // No options preset.
1277 },
1278 /* USB ID entry: */
1279 {
1280 "USB: Device; Bridge", // Info about USB device and bridge name.
1281 "0x1234:0xabcd", // Regular expression to match vendor:product ID.
1282 "0x0101", // Regular expression to match bcdDevice.
1283 "", // Not used.
1284 "-d sat" // String with device type option.
1285 },
1286 /* ... */
1287
1288
1289 SMART RUN/ABORT OFFLINE TEST AND SELF-TEST OPTIONS:
1290
1291 -t TEST, --test=TEST
1292 Executes TEST immediately. The ´-C´ option can be used in con‐
1293 junction with this option to run the short or long (and also for
1294 ATA devices, selective or conveyance) self-tests in captive mode
1295 (known as "foreground mode" for SCSI devices). Note that only
1296 one test type can be run at a time, so only one test type should
1297 be specified per command line. Note also that if a computer is
1298 shutdown or power cycled during a self-test, no harm should
1299 result. The self-test will either be aborted or will resume
1300 automatically.
1301
1302 The valid arguments to this option are:
1303
1304 offline - [ATA] runs SMART Immediate Offline Test. This immedi‐
1305 ately starts the test described above. This command can be
1306 given during normal system operation. The effects of this test
1307 are visible only in that it updates the SMART Attribute values,
1308 and if errors are found they will appear in the SMART error log,
1309 visible with the ´-l error´ option.
1310
1311 If the ´-c´ option to smartctl shows that the device has the
1312 "Suspend Offline collection upon new command" capability then
1313 you can track the progress of the Immediate Offline test using
1314 the ´-c´ option to smartctl. If the ´-c´ option show that the
1315 device has the "Abort Offline collection upon new command" capa‐
1316 bility then most commands will abort the Immediate Offline Test,
1317 so you should not try to track the progress of the test with
1318 ´-c´, as it will abort the test.
1319
1320 offline - [SCSI] runs the default self test in foreground. No
1321 entry is placed in the self test log.
1322
1323 short - [ATA] runs SMART Short Self Test (usually under ten min‐
1324 utes). This command can be given during normal system operation
1325 (unless run in captive mode - see the ´-C´ option below). This
1326 is a test in a different category than the immediate or auto‐
1327 matic offline tests. The "Self" tests check the electrical and
1328 mechanical performance as well as the read performance of the
1329 disk. Their results are reported in the Self Test Error Log,
1330 readable with the ´-l selftest´ option. Note that on some disks
1331 the progress of the self-test can be monitored by watching this
1332 log during the self-test; with other disks use the ´-c´ option
1333 to monitor progress.
1334
1335 short - [SCSI] runs the "Background short" self-test.
1336
1337 long - [ATA] runs SMART Extended Self Test (tens of minutes).
1338 This is a longer and more thorough version of the Short Self
1339 Test described above. Note that this command can be given dur‐
1340 ing normal system operation (unless run in captive mode - see
1341 the ´-C´ option below).
1342
1343 long - [SCSI] runs the "Background long" self-test.
1344
1345 conveyance - [ATA only] runs a SMART Conveyance Self Test (min‐
1346 utes). This self-test routine is intended to identify damage
1347 incurred during transporting of the device. This self-test rou‐
1348 tine should take on the order of minutes to complete. Note that
1349 this command can be given during normal system operation (unless
1350 run in captive mode - see the ´-C´ option below).
1351
1352 select,N-M, select,N+SIZE - [ATA only] runs a SMART Selective
1353 Self Test, to test a range of disk Logical Block Addresses
1354 (LBAs), rather than the entire disk. Each range of LBAs that is
1355 checked is called a "span" and is specified by a starting LBA
1356 (N) and an ending LBA (M) with N less than or equal to M. The
1357 range can also be specified as N+SIZE. A span at the end of a
1358 disk can be specified by N-max.
1359
1360 For example the commands:
1361 smartctl -t select,10-20 /dev/hda
1362 smartctl -t select,10+11 /dev/hda
1363 both runs a self test on one span consisting of LBAs ten to
1364 twenty (inclusive). The command:
1365 smartctl -t select,100000000-max /dev/hda
1366 run a self test from LBA 100000000 up to the end of the disk.
1367 The ´-t´ option can be given up to five times, to test up to
1368 five spans. For example the command:
1369 smartctl -t select,0-100 -t select,1000-2000 /dev/hda
1370 runs a self test on two spans. The first span consists of 101
1371 LBAs and the second span consists of 1001 LBAs. Note that the
1372 spans can overlap partially or completely, for example:
1373 smartctl -t select,0-10 -t select,5-15 -t select,10-20 /dev/hda
1374 The results of the selective self-test can be obtained (both
1375 during and after the test) by printing the SMART self-test log,
1376 using the ´-l selftest´ option to smartctl.
1377
1378 Selective self tests are particularly useful as disk capacities
1379 increase: an extended self test (smartctl -t long) can take sev‐
1380 eral hours. Selective self-tests are helpful if (based on SYS‐
1381 LOG error messages, previous failed self-tests, or SMART error
1382 log entries) you suspect that a disk is having problems at a
1383 particular range of Logical Block Addresses (LBAs).
1384
1385 Selective self-tests can be run during normal system operation
1386 (unless done in captive mode - see the ´-C´ option below).
1387
1388 The following variants of the selective self-test command use
1389 spans based on the ranges from past tests already stored on the
1390 disk:
1391
1392 select,redo[+SIZE] - [ATA only] redo the last SMART Selective
1393 Self Test using the same LBA range. The starting LBA is identi‐
1394 cal to the LBA used by last test, same for ending LBA unless a
1395 new span size is specified by optional +SIZE argument.
1396
1397 For example the commands:
1398 smartctl -t select,10-20 /dev/hda
1399 smartctl -t select,redo /dev/hda
1400 smartctl -t select,redo+20 /dev/hda
1401 have the same effect as:
1402 smartctl -t select,10-20 /dev/hda
1403 smartctl -t select,10-20 /dev/hda
1404 smartctl -t select,10-29 /dev/hda
1405
1406 select,next[+SIZE] - [ATA only] runs a SMART Selective Self Test
1407 on the LBA range which follows the range of the last test. The
1408 starting LBA is set to (ending LBA +1) of the last test. A new
1409 span size may be specified by the optional +SIZE argument.
1410
1411 For example the commands:
1412 smartctl -t select,0-999 /dev/hda
1413 smartctl -t select,next /dev/hda
1414 smartctl -t select,next+2000 /dev/hda
1415 have the same effect as:
1416 smartctl -t select,0-999 /dev/hda
1417 smartctl -t select,1000-1999 /dev/hda
1418 smartctl -t select,2000-3999 /dev/hda
1419
1420 If the last test ended at the last LBA of the disk, the new
1421 range starts at LBA 0. The span size of the last span of a disk
1422 is adjusted such that the total number of spans to check the
1423 full disk will not be changed by future uses of ´-t
1424 select,next´.
1425
1426 select,cont[+SIZE] - [ATA only] performs a ´redo´ (above) if the
1427 self test status reports that the last test was aborted by the
1428 host. Otherwise it run the ´next´ (above) test.
1429
1430 afterselect,on - [ATA only] perform an offline read scan after a
1431 Selective Self-test has completed. This option must be used
1432 together with one or more of the select,N-M options above. If
1433 the LBAs that have been specified in the Selective self-test
1434 pass the test with no errors found, then read scan the remainder
1435 of the disk. If the device is powered-cycled while this read
1436 scan is in progress, the read scan will be automatically resumed
1437 after a time specified by the pending timer (see below). The
1438 value of this option is preserved between selective self-tests.
1439
1440 afterselect,off - [ATA only] do not read scan the remainder of
1441 the disk after a Selective self-test has completed. This option
1442 must be use together with one or more of the select,N-M options
1443 above. The value of this option is preserved between selective
1444 self-tests.
1445
1446 pending,N - [ATA only] set the pending offline read scan timer
1447 to N minutes. Here N is an integer in the range from 0 to 65535
1448 inclusive. If the device is powered off during a read scan
1449 after a Selective self-test, then resume the test automatically
1450 N minutes after power-up. This option must be use together with
1451 one or more of the select,N-M options above. The value of this
1452 option is preserved between selective self-tests.
1453
1454 scttempint,N[,p] - [ATA only] set the time interval for SCT tem‐
1455 perature logging to N minutes. If ´,p´ is specified, the setting
1456 is preserved across power cycles. Otherwise, the setting is
1457 volatile and will be reverted to default (1 minute), or last
1458 non-volatile setting by the next hard reset. This command also
1459 clears the temperature history table. See ´-l scttemp´ above for
1460 more information about SCT temperature logging.
1461
1462 vendor,N - [ATA only] issues the ATA command SMART EXECUTE OFF-
1463 LINE IMMEDIATE with subcommand N in LBA LOW register. The sub‐
1464 command is specified as a hex value in the range 0x00 to 0xff.
1465 Subcommands 0x40-0x7f and 0x90-0xff are reserved for vendor spe‐
1466 cific use, see table 61 of T13/1699-D Revision 6a (ATA8-ACS).
1467
1468 WARNING: Only run subcommands documented by the vendor of the
1469 device.
1470
1471 Example for Intel X18-M/X25-M G2 SSDs only: The subcommand 0x40
1472 (´-t vendor,0x40´) clears the timed workload related SMART
1473 attributes (226, 227, 228).
1474
1475 -C, --captive
1476 [ATA] Runs self-tests in captive mode. This has no effect with
1477 ´-t offline´ or if the ´-t´ option is not used.
1478
1479 WARNING: Tests run in captive mode may busy out the drive for
1480 the length of the test. Only run captive tests on drives with‐
1481 out any mounted partitions!
1482
1483 [SCSI] Runs the self-test in "Foreground" mode.
1484
1485 -X, --abort
1486 Aborts non-captive SMART Self Tests. Note that this command
1487 will abort the Offline Immediate Test routine only if your disk
1488 has the "Abort Offline collection upon new command" capability.
1489
1491 In the past there has been a clear distinction between storage devices
1492 that used the ATA and SCSI command sets. This distinction was often
1493 reflected in their device naming and hardware. Now various SCSI trans‐
1494 ports (e.g. SAS, FC and iSCSI) can interconnect to both SCSI disks
1495 (e.g. FC and SAS) and ATA disks (especially SATA). USB and IEEE 1394
1496 storage devices use the SCSI command set externally but almost always
1497 contain ATA or SATA disks (or flash). The storage subsystems in some
1498 operating systems have started to remove the distinction between ATA
1499 and SCSI in their device naming policies.
1500
1501 99% of operations that an OS performs on a disk involve the SCSI
1502 INQUIRY, READ CAPACITY, READ and WRITE commands, or their ATA equiva‐
1503 lents. Since the SCSI commands are slightly more general than their ATA
1504 equivalents, many OSes are generating SCSI commands (mainly READ and
1505 WRITE) and letting a lower level translate them to their ATA equiva‐
1506 lents as the need arises. An important note here is that "lower level"
1507 may be in external equipment and hence outside the control of an OS.
1508
1509 SCSI to ATA Translation (SAT) is a standard (ANSI INCITS 431-2007) that
1510 specifies how this translation is done. For the other 1% of operations
1511 that an OS performs on a disk, SAT provides two options. First is an
1512 optional ATA PASS-THROUGH SCSI command (there are two variants). The
1513 second is a translation from the closest SCSI command. Most current
1514 interest is in the "pass-through" option.
1515
1516 The relevance to smartmontools (and hence smartctl) is that its inter‐
1517 actions with disks fall solidly into the "1%" category. So even if the
1518 OS can happily treat (and name) a disk as "SCSI", smartmontools needs
1519 to detect the native command set and act accordingly. As more storage
1520 manufacturers (including external SATA drives) comply with SAT, smart‐
1521 montools is able to automatically distinguish the native command set of
1522 the device. In some cases the '-d sat' option is needed on the command
1523 line.
1524
1525 There are also virtual disks which typically have no useful information
1526 to convey to smartmontools, but could conceivably in the future. An
1527 example of a virtual disk is the OS's view of a RAID 1 box. There are
1528 most likely two SATA disks inside a RAID 1 box. Addressing those SATA
1529 disks from a distant OS is a challenge for smartmontools. Another
1530 approach is running a tool like smartmontools inside the RAID 1 box
1531 (e.g. a Network Attached Storage (NAS) box) and fetching the logs via
1532 a browser.
1533
1535 smartctl -a /dev/hda
1536 Print a large amount of SMART information for drive /dev/hda which is
1537 typically an ATA (IDE) or SATA disk in Linux.
1538
1539 smartctl -a /dev/sdb
1540 Print a large amount of SMART information for drive /dev/sda . This may
1541 be a SCSI disk or an ATA (SATA) disk.
1542
1543 smartctl -s off /dev/hdd
1544 Disable SMART monitoring and data log collection on drive /dev/hdd .
1545
1546 smartctl --smart=on --offlineauto=on --saveauto=on /dev/hda
1547 Enable SMART on drive /dev/hda, enable automatic offline testing every
1548 four hours, and enable autosaving of SMART Attributes. This is a good
1549 start-up line for your system´s init files. You can issue this command
1550 on a running system.
1551
1552 smartctl -t long /dev/hdc
1553 Begin an extended self-test of drive /dev/hdc. You can issue this com‐
1554 mand on a running system. The results can be seen in the self-test log
1555 visible with the ´-l selftest´ option after it has completed.
1556
1557 smartctl -s on -t offline /dev/hda
1558 Enable SMART on the disk, and begin an immediate offline test of drive
1559 /dev/hda. You can issue this command on a running system. The results
1560 are only used to update the SMART Attributes, visible with the ´-A´
1561 option. If any device errors occur, they are logged to the SMART error
1562 log, which can be seen with the ´-l error´ option.
1563
1564 smartctl -A -v 9,minutes /dev/hda
1565 Shows the vendor Attributes, when the disk stores its power-on time
1566 internally in minutes rather than hours.
1567
1568 smartctl -q errorsonly -H -l selftest /dev/hda
1569 Produces output only if the device returns failing SMART status, or if
1570 some of the logged self-tests ended with errors.
1571
1572 smartctl -q silent -a /dev/hda
1573 Examine all SMART data for device /dev/hda, but produce no printed out‐
1574 put. You must use the exit status (the $? shell variable) to learn if
1575 any Attributes are out of bound, if the SMART status is failing, if
1576 there are errors recorded in the self-test log, or if there are errors
1577 recorded in the disk error log.
1578
1579 smartctl -a -d 3ware,0 /dev/sda
1580 Examine all SMART data for the first ATA disk connected to a 3ware RAID
1581 controller card.
1582
1583 smartctl -a -d 3ware,0 /dev/twe0
1584 Examine all SMART data for the first ATA disk connected to a 3ware RAID
1585 6000/7000/8000 controller card.
1586
1587 smartctl -a -d 3ware,0 /dev/twa0
1588 Examine all SMART data for the first ATA disk connected to a 3ware RAID
1589 9000 controller card.
1590
1591 smartctl -a -d 3ware,0 /dev/twl0
1592 Examine all SMART data for the first SATA (not SAS) disk connected to a
1593 3ware RAID 9750 controller card.
1594
1595 smartctl -t short -d 3ware,3 /dev/sdb
1596 Start a short self-test on the fourth ATA disk connected to the 3ware
1597 RAID controller card which is the second SCSI device /dev/sdb.
1598
1599 smartctl -t long -d areca,4 /dev/sg2
1600 Start a long self-test on the fourth SATA disk connected to an Areca
1601 RAID controller addressed by /dev/sg2.
1602
1603 smartctl -a -d hpt,1/3 /dev/sda (under Linux)
1604 smartctl -a -d hpt,1/3 /dev/hptrr (under FreeBSD)
1605 Examine all SMART data for the (S)ATA disk directly connected to the
1606 third channel of the first HighPoint RocketRAID controller card.
1607
1608 smartctl -t short -d hpt,1/1/2 /dev/sda (under Linux)
1609 smartctl -t short -d hpt,1/1/2 /dev/hptrr (under FreeBSD)
1610 Start a short self-test on the (S)ATA disk connected to second pmport
1611 on the first channel of the first HighPoint RocketRAID controller card.
1612
1613 smartctl -t select,10-100 -t select,30-300 -t afterselect,on -t pending,45 /dev/hda
1614 Run a selective self-test on LBAs 10 to 100 and 30 to 300. After the
1615 these LBAs have been tested, read-scan the remainder of the disk. If
1616 the disk is power-cycled during the read-scan, resume the scan 45 min‐
1617 utes after power to the device is restored.
1618
1619 smartctl -a -d cciss,0 /dev/cciss/c0d0
1620 Examine all SMART data for the first SCSI disk connected to a cciss
1621 RAID controller card.
1622
1624 The return values of smartctl are defined by a bitmask. If all is well
1625 with the disk, the return value (exit status) of smartctl is 0 (all
1626 bits turned off). If a problem occurs, or an error, potential error,
1627 or fault is detected, then a non-zero status is returned. In this
1628 case, the eight different bits in the return value have the following
1629 meanings for ATA disks; some of these values may also be returned for
1630 SCSI disks.
1631
1632 Bit 0: Command line did not parse.
1633
1634 Bit 1: Device open failed, or device did not return an IDENTIFY DEVICE
1635 structure.
1636
1637 Bit 2: Some SMART command to the disk failed, or there was a checksum
1638 error in a SMART data structure (see ´-b´ option above).
1639
1640 Bit 3: SMART status check returned "DISK FAILING".
1641
1642 Bit 4: We found prefail Attributes <= threshold.
1643
1644 Bit 5: SMART status check returned "DISK OK" but we found that some
1645 (usage or prefail) Attributes have been <= threshold at some
1646 time in the past.
1647
1648 Bit 6: The device error log contains records of errors.
1649
1650 Bit 7: The device self-test log contains records of errors.
1651
1652 To test within the shell for whether or not the different bits
1653 are turned on or off, you can use the following type of con‐
1654 struction (this is bash syntax):
1655 smartstat=$(($? & 8))
1656 This looks at only at bit 3 of the exit status $? (since
1657 8=2^3). The shell variable $smartstat will be nonzero if SMART
1658 status check returned "disk failing" and zero otherwise.
1659
1660
1662 The TapeAlert log page flags are cleared for the initiator when the
1663 page is read. This means that each alert condition is reported only
1664 once by smartctl for each initiator for each activation of the condi‐
1665 tion.
1666
1667
1669 Bruce Allen smartmontools-support@lists.sourceforge.net
1670 University of Wisconsin - Milwaukee Physics Department
1671
1672
1674 The following have made large contributions to smartmontools:
1675 Casper Dik (Solaris SCSI interface)
1676 Christian Franke (Windows interface, C++ redesign, USB support, ...)
1677 Douglas Gilbert (SCSI subsystem)
1678 Guido Guenther (Autoconf/Automake packaging)
1679 Geoffrey Keating (Darwin ATA interface)
1680 Eduard Martinescu (FreeBSD interface)
1681 Frederic L. W. Meunier (Web site and Mailing list)
1682 Gabriele Pohl (Web site and Wiki, conversion from CVS to SVN)
1683 Keiji Sawada (Solaris ATA interface)
1684 Manfred Schwarb (Drive database)
1685 Sergey Svishchev (NetBSD interface)
1686 David Snyder and Sergey Svishchev (OpenBSD interface)
1687 Phil Williams (User interface and drive database)
1688 Yuri Dario (OS/2, eComStation interface)
1689 Shengfeng Zhou (Linux/FreeBSD HighPoint RocketRAID interface)
1690 Many other individuals have made smaller contributions and corrections.
1691
1692
1694 This code was derived from the smartsuite package, written by Michael
1695 Cornwell, and from the previous UCSC smartsuite package. It extends
1696 these to cover ATA-5 disks. This code was originally developed as a
1697 Senior Thesis by Michael Cornwell at the Concurrent Systems Laboratory
1698 (now part of the Storage Systems Research Center), Jack Baskin School
1699 of Engineering, University of California, Santa Cruz.
1700 http://ssrc.soe.ucsc.edu/ .
1701
1703 Please see the following web site for updates, further documentation,
1704 bug reports and patches: http://smartmontools.sourceforge.net/
1705
1706
1708 smartd(8), badblocks(8), ide-smart(8).
1709
1711 An introductory article about smartmontools is Monitoring Hard Disks
1712 with SMART, by Bruce Allen, Linux Journal, January 2004, pages 74-77.
1713 This is http://www.linuxjournal.com/article/6983 online.
1714
1715 If you would like to understand better how SMART works, and what it
1716 does, a good place to start is with Sections 4.8 and 6.54 of the first
1717 volume of the ´AT Attachment with Packet Interface-7´ (ATA/ATAPI-7)
1718 specification Revision 4b. This documents the SMART functionality
1719 which the smartmontools utilities provide access to. This and other
1720 versions of this Specification are available from the T13 web site
1721 http://www.t13.org/ .
1722
1723 The functioning of SMART was originally defined by the SFF-8035i revi‐
1724 sion 2 and the SFF-8055i revision 1.4 specifications. These are publi‐
1725 cations of the Small Form Factors (SFF) Committee.
1726
1727 Links to these and other documents may be found on the Links page of
1728 the smartmontools Wiki at http://sourceforge.net/apps/trac/smartmon‐
1729 tools/wiki/Links .
1730
1731
1733 $Id: smartctl.8.in 3186 2010-10-16 13:09:11Z chrfranke $
1734
1735
1736
1737smartmontools-5.40 2010-10-16 SMARTCTL(8)