2 Copyright (C) 2002-10 Bruce Allen <smartmontools-support@lists.sourceforge.net>
3 Copyright (C) 2004-13 Christian Franke <smartmontools-support@lists.sourceforge.net>
5 $Id: smartctl.8.in 3832 2013-07-20 14:49:31Z chrfranke $
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 You should have received a copy of the GNU General Public License
13 (for example COPYING); If not, see <http://www.gnu.org/licenses/>.
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/
21 .TH SMARTCTL 8 CURRENT_SVN_DATE CURRENT_SVN_VERSION CURRENT_SVN_DATE
23 \fBsmartctl\fP \- Control and Monitor Utility for SMART Disks
26 .B smartctl [options] device
28 .\" %IF NOT OS Windows
30 .B /usr/local/sbin/smartctl
32 .\" %ENDIF NOT OS Windows
34 CURRENT_SVN_VERSION CURRENT_SVN_DATE CURRENT_SVN_REV
38 .\"! [This man page is generated for the OS_MAN_FILTER version of smartmontools.
39 .\"! It does not contain info specific to other platforms.]
42 \fBsmartctl\fP controls the Self-Monitoring, Analysis and
43 Reporting Technology (SMART) system built into most ATA/SATA and SCSI/SAS
44 hard drives and solid-state drives.
45 The purpose of SMART is to monitor the reliability of the hard drive
46 and predict drive failures, and to carry out different types of drive
48 \fBsmartctl\fP also supports some features not related to SMART.
49 This version of \fBsmartctl\fP is compatible with
50 ACS-2, ATA8-ACS, ATA/ATAPI-7 and earlier standards
51 (see \fBREFERENCES\fP below).
53 \fBsmartctl\fP also provides support for polling TapeAlert messages
54 from SCSI tape drives and changers.
56 The user must specify the device to be controlled or interrogated as
57 the final argument to \fBsmartctl\fP. The command set used by the device
58 is often derived from the device path but may need help with the \'\-d\'
59 option (for more information see the section on "ATA, SCSI command sets
60 and SAT" below). Device paths are as follows:
63 Use the forms \fB"/dev/hd[a\-t]"\fP for IDE/ATA devices, and
64 \fB"/dev/sd[a\-z]"\fP for SCSI devices. For SCSI Tape Drives and
65 Changers with TapeAlert support use the devices \fB"/dev/nst*"\fP and
66 \fB"/dev/sg*"\fP. For SATA disks accessed with libata, use
67 \fB"/dev/sd[a\-z]"\fP and append \fB"\-d ata"\fP. For disks behind
68 3ware controllers you may need \fB"/dev/sd[a\-z]"\fP or
69 \fB"/dev/twe[0\-9]"\fP, \fB"/dev/twa[0\-9]"\fP or \fB"/dev/twl[0\-9]"\fP: see details
70 below. For disks behind HighPoint RocketRAID controllers you may need
71 \fB"/dev/sd[a\-z]"\fP. For disks behind Areca SATA RAID controllers,
72 you need \fB"/dev/sg[2\-9]"\fP (note that smartmontools interacts with
73 the Areca controllers via a SCSI generic device which is different
74 than the SCSI device used for reading and writing data)! For HP Smart
75 Array RAID controllers, there are three currently supported drivers: cciss,
76 hpsa, and hpahcisr. For disks accessed via the cciss driver the device nodes
77 are of the form \fB"/dev/cciss/c[0\-9]d0"\fP. For disks accessed via
78 the hpahcisr and hpsa drivers, the device nodes you need are \fB"/dev/sg[0\-9]*"\fP.
79 ("lsscsi \-g" is helpful in determining which scsi generic device node corresponds
80 to which device.) Use the nodes corresponding to the RAID controllers,
81 not the nodes corresponding to logical drives. See the \fB\-d\fP option below, as well.
85 Use the forms \fB/dev/disk[0\-9]\fP or equivalently \fBdisk[0\-9]\fP or equivalently
86 \fB/dev/rdisk[0\-9]\fP. Long forms are also available: please use \'\-h\' to see some
87 examples. Note that there is currently no Darwin SCSI support.
89 Use the OS X SAT SMART Driver to access SMART data on SAT capable USB and
90 Firewire devices (see INSTALL file).
94 Use the forms \fB"/dev/ad[0\-9]+"\fP for IDE/ATA
95 devices and \fB"/dev/da[0\-9]+"\fP or \fB"/dev/pass[0\-9]+"\fP for SCSI devices.
96 For SATA devices on AHCI bus use \fB"/dev/ada[0\-9]+"\fP format. For HP Smart
97 Array RAID controllers, use \fB"/dev/ciss[0\-9]"\fP (and see the \fB-d\fP option,
100 .\" %IF OS NetBSD OpenBSD
101 .IP \fBNETBSD/OPENBSD\fP: 9
102 Use the form \fB"/dev/wd[0\-9]+c"\fP for IDE/ATA
103 devices. For SCSI disk and tape devices, use the device names
104 \fB"/dev/sd[0\-9]+c"\fP and \fB"/dev/st[0\-9]+c"\fP respectively.
105 Be sure to specify the correct "whole disk" partition letter for
107 .\" %ENDIF OS NetBSD OpenBSD
110 Use the forms \fB"/dev/rdsk/c?t?d?s?"\fP for IDE/ATA and SCSI disk
111 devices, and \fB"/dev/rmt/*"\fP for SCSI tape devices.
112 .\" %ENDIF OS Solaris
113 .\" %IF OS Windows Cygwin
115 Use the forms \fB"/dev/sd[a\-z]"\fP for IDE/(S)ATA and SCSI disks
116 "\\\\.\\PhysicalDrive[0\-25]" (where "a" maps to "0").
117 Use \fB"/dev/sd[a\-z][a\-z]"\fP for "\\\\.\\PhysicalDrive[26\-...]".
118 These disks can also be referred to as \fB"/dev/pd[0\-255]"\fP for
119 "\\\\.\\PhysicalDrive[0\-255]".
120 ATA disks can also be referred to as \fB"/dev/hd[a\-z]"\fP for
121 "\\\\.\\PhysicalDrive[0\-25]".
122 Use one the forms \fB"/dev/tape[0\-255]"\fP, \fB"/dev/st[0\-255]"\fP,
123 or \fB"/dev/nst[0\-255]"\fP for SCSI tape drives "\\\\.\\Tape[0\-255]".
125 Alternatively, drive letters \fB"X:"\fP or \fB"X:\\"\fP may be used to
126 specify the (\'basic\') disk behind a mounted partition. This does
127 not work with \'dynamic\' disks.
129 For disks behind 3ware 9000 controllers use \fB"/dev/sd[a\-z],N"\fP where
130 N specifies the disk number (3ware \'port\') behind the controller
131 providing the logical drive (\'unit\') specified by \fB"/dev/sd[a\-z]"\fP.
132 Alternatively, use \fB"/dev/tw_cli/cx/py"\fP for controller x, port y
133 to run the \'tw_cli\' tool and parse the output. This provides limited
134 monitoring (\'\-i\', \'\-c\', \'\-A\' below) if SMART support is missing
135 in the driver. Use \fB"/dev/tw_cli/stdin"\fP or \fB"/dev/tw_cli/clip"\fP
136 to parse CLI or 3DM output from standard input or clipboard.
137 The option \'\-d 3ware,N\' is not necessary on Windows.
139 For disks behind an Intel ICHxR controller with RST driver use
140 \fB"/dev/csmi[0\-9],N"\fP where N specifies the port behind the logical
141 scsi controller "\\\\.\\Scsi[0\-9]:".
143 [NEW EXPERIMENTAL SMARTCTL FEATURE] For SATA or SAS disks behind an Areca
144 controller use \fB"/dev/arcmsr[0\-9]"\fP, see \'\-d areca,N[/E]\' below.
146 The prefix \fB"/dev/"\fP is optional.
147 .\" %ENDIF OS Windows Cygwin
149 .IP \fBOS/2,eComStation\fP: 9
150 Use the form \fB"/dev/hd[a\-z]"\fP for IDE/ATA devices.
153 if \'\-\' is specified as the device path, \fBsmartctl\fP reads and
154 interprets it's own debug output from standard input.
155 See \'\-r ataioctl\' below for details.
157 Based on the device path, \fBsmartctl\fP will guess the device type
158 (ATA or SCSI). If necessary, the \'\-d\' option can be used to override
161 Note that the printed output of \fBsmartctl\fP displays most numerical
162 values in base 10 (decimal), but some values are displayed in base 16
163 (hexadecimal). To distinguish them, the base 16 values are always
164 displayed with a leading \fB"0x"\fP, for example: "0xff". This man
165 page follows the same convention.
170 The options are grouped below into several categories. \fBsmartctl\fP
171 will execute the corresponding commands in the order: INFORMATION,
172 ENABLE/DISABLE, DISPLAY DATA, RUN/ABORT TESTS.
175 .B SHOW INFORMATION OPTIONS:
177 .B \-h, \-\-help, \-\-usage
178 Prints a usage message to STDOUT and exits.
180 .B \-V, \-\-version, \-\-copyright, \-\-license
181 Prints version, copyright, license, home page and SVN revision
182 information for your copy of \fBsmartctl\fP to STDOUT and then exits.
183 Please include this information if you are reporting bugs or problems.
186 Prints the device model number, serial number, firmware version, and
187 ATA Standard version/revision information. Says if the device
188 supports SMART, and if so, whether SMART support is currently enabled
189 or disabled. If the device supports Logical Block Address mode (LBA
190 mode) print current user drive capacity in bytes. (If drive is has a
191 user protected area reserved, or is "clipped", this may be smaller
192 than the potential maximum drive capacity.) Indicates if the drive is
193 in the smartmontools database (see \'\-v\' options below). If so, the
194 drive model family may also be printed. If \'\-n\' (see below) is
195 specified, the power mode of the drive is printed.
197 .B \-\-identify[=[w][nvb]]
198 [ATA only] [NEW EXPERIMENTAL SMARTCTL FEATURE] Prints an annotated
199 table of the IDENTIFY DEVICE data.
200 By default, only valid words (words not equal to 0x0000 or 0xffff)
201 and nonzero bits and bit fields are printed.
202 This can be changed by the optional argument which consists of one or
203 two characters from the set \'wnvb\'.
204 The character \'w\' enables printing of all 256 words. The character
205 \'n\' suppresses printing of bits, \'v\' enables printing of all bits
206 from valid words, \'b\' enables printing of all bits.
207 For example \'\-\-identify=n\' (valid words, no bits) produces the
208 shortest output and \'\-\-identify=wb\' (all words, all bits) produces
212 Prints all SMART information about the disk, or TapeAlert information
213 about the tape drive or changer. For ATA devices this is equivalent
216 \'\-H \-i \-c \-A \-l error \-l selftest \-l selective\'
218 and for SCSI, this is equivalent to
220 \'\-H \-i \-A \-l error \-l selftest\'.
222 Note that for ATA disks this does \fBnot\fP enable the non-SMART options
223 and the SMART options which require support for 48-bit ATA commands.
226 Prints all SMART and non-SMART information about the device. For ATA
227 devices this is equivalent to
229 \'\-H \-i \-g all \-c \-A \-f brief \-l xerror,error \-l xselftest,selftest
230 \-l selective \-l directory \-l scttemp \-l scterc \-l devstat \-l sataphy\'.
232 and for SCSI, this is equivalent to
234 \'\-H \-i \-A \-l error \-l selftest \-l background \-l sasphy\'.
238 Scans for devices and prints each device name, device type and protocol
239 ([ATA] or [SCSI]) info. May be used in conjunction with \'\-d TYPE\'
240 to restrict the scan to a specific TYPE. See also info about platform
241 specific device scan and the \fBDEVICESCAN\fP directive on
242 \fBsmartd\fP(8) man page.
245 Same as \-\-scan, but also tries to open each device before printing
246 device info. The device open may change the device type due
247 to autodetection (see also \'\-d test\').
249 This option can be used to create a draft \fBsmartd.conf\fP file.
250 All options after \'\-\-\' are appended to each output line.
253 smartctl \-\-scan\-open \-\- \-a \-W 4,45,50 \-m admin@work > smartd.conf
256 .B \-g NAME, \-\-get=NAME
257 Get non-SMART device settings. See \'\-s, \-\-set\' below for further info.
260 .B RUN-TIME BEHAVIOR OPTIONS:
262 .B \-q TYPE, \-\-quietmode=TYPE
263 Specifies that \fBsmartctl\fP should run in one of the two quiet modes
264 described here. The valid arguments to this option are:
267 \- only print: For the \'\-l error\' option, if nonzero, the number
268 of errors recorded in the SMART error log and the power-on time when
269 they occurred; For the \'\-l selftest\' option, errors recorded in the device
270 self-test log; For the \'\-H\' option, SMART "disk failing" status or device
271 Attributes (pre-failure or usage) which failed either now or in the
272 past; For the \'\-A\' option, device Attributes (pre-failure or usage)
273 which failed either now or in the past.
276 \- print no output. The only way to learn about what was found is to
277 use the exit status of \fBsmartctl\fP (see RETURN VALUES below).
280 \- Do not print the serial number of the device.
282 .B \-d TYPE, \-\-device=TYPE
283 Specifies the type of the device.
284 The valid arguments to this option are:
287 \- attempt to guess the device type from the device name or from
288 controller type info provided by the operating system or from
289 a matching USB ID entry in the drive database.
293 \- prints the guessed type, then opens the device and prints the
294 (possibly changed) TYPE name and then exists without performing
295 any further commands.
298 \- the device type is ATA. This prevents
300 from issuing SCSI commands to an ATA device.
302 .\" %IF NOT OS Darwin
304 \- the device type is SCSI. This prevents
306 from issuing ATA commands to a SCSI device.
309 \- the device type is SCSI to ATA Translation (SAT).
310 This is for ATA disks that have a SCSI to ATA Translation (SAT) Layer
311 (SATL) between the disk and the operating system.
312 SAT defines two ATA PASS THROUGH SCSI commands, one 12 bytes long and
313 the other 16 bytes long. The default is the 16 byte variant which can be
314 overridden with either \'\-d sat,12\' or \'\-d sat,16\'.
316 If \'\-d sat,auto\' is specified, device type SAT (for ATA/SATA disks) is
317 only used if the SCSI INQUIRY data reports a SATL (VENDOR: "ATA ").
318 Otherwise device type SCSI (for SCSI/SAS disks) is used.
321 \- this device type is for ATA disks that are behind a Cypress USB to PATA
322 bridge. This will use the ATACB proprietary scsi pass through command.
323 The default SCSI operation code is 0x24, but although it can be overridden
324 with \'\-d usbcypress,0xN\', where N is the scsi operation code,
325 you're running the risk of damage to the device or filesystems on it.
327 .I usbjmicron[,p][,x][,PORT]
328 \- this device type is for SATA disks that are behind a JMicron USB to
329 PATA/SATA bridge. The 48-bit ATA commands (required e.g. for \'\-l xerror\',
330 see below) do not work with all of these bridges and are therefore disabled by
331 default. These commands can be enabled by \'\-d usbjmicron,x\'.
332 If two disks are connected to a bridge with two ports, an error message is printed
333 if no PORT is specified.
334 The port can be specified by \'\-d usbjmicron[,x],PORT\' where PORT is 0
335 (master) or 1 (slave). This is not necessary if the device uses a port
336 multiplier to connect multiple disks to one port. The disks appear under
337 separate /dev/ice names then.
338 CAUTION: Specifying \',x\' for a device which does not support it results
339 in I/O errors and may disconnect the drive. The same applies if the specified
340 PORT does not exist or is not connected to a disk.
342 [NEW EXPERIMENTAL SMARTCTL FEATURE]
343 The Prolific PL2507/3507 USB bridges with older firmware support a pass-through
344 command similar to JMicron and work with \'\-d usbjmicron,0\'.
345 Newer Prolific firmware requires a modified command which can be selected by
346 \'\-d usbjmicron,p\'.
347 Note that this does not yet support the SMART status command.
350 \- this device type is for SATA disks that are behind a SunplusIT USB to SATA
353 .\" %ENDIF NOT OS Darwin
356 \- [Linux only] interact with SATA disks behind Marvell chip-set
357 controllers (using the Marvell rather than libata driver).
360 \- [Linux only] the device consists of one or more SCSI/SAS disks connected
361 to a MegaRAID controller. The non-negative integer N (in the range of 0 to
362 127 inclusive) denotes which disk on the controller is monitored.
365 \fBsmartctl \-a \-d megaraid,2 /dev/sda\fP
368 \fBsmartctl \-a \-d megaraid,0 /dev/sdb\fP
371 \fBsmartctl \-a \-d megaraid,0 /dev/bus/0\fP
373 This interface will also work for Dell PERC controllers.
374 It is possible to set RAID device name as /dev/bus/N, where N is a SCSI bus
377 The following entry in /proc/devices must exist:
379 For PERC2/3/4 controllers: \fBmegadevN\fP
381 For PERC5/6 controllers: \fBmegaraid_sas_ioctlN\fP
384 .\" %IF OS FreeBSD Linux
386 \- [FreeBSD and Linux only] the device consists of one or more ATA disks
387 connected to a 3ware RAID controller. The non-negative integer N
388 (in the range from 0 to 127 inclusive) denotes which disk on the controller
392 \fBsmartctl \-a \-d 3ware,2 /dev/sda\fP [Linux only]
395 \fBsmartctl \-a \-d 3ware,0 /dev/twe0\fP
398 \fBsmartctl \-a \-d 3ware,1 /dev/twa0\fP
401 \fBsmartctl \-a \-d 3ware,1 /dev/twl0\fP [Linux only]
404 \fBsmartctl \-a \-d 3ware,1 /dev/tws0\fP [FreeBSD only]
406 The first two forms, which refer to devices /dev/sda\-z and /dev/twe0\-15,
407 may be used with 3ware series 6000, 7000, and 8000 series controllers
408 that use the 3x-xxxx driver.
409 \fBNote that the /dev/sda\-z form is deprecated\fP starting with
410 the Linux 2.6 kernel series and may not be supported by the Linux
411 kernel in the near future. The final form, which refers to devices
412 /dev/twa0\-15, must be used with 3ware 9000 series controllers, which
413 use the 3w\-9xxx driver.
415 The devices /dev/twl0\-15 [Linux] or /dev/tws0\-15 [FreeBSD] must be used with the 3ware/LSI 9750 series
416 controllers which use the 3w-sas driver.
418 Note that if the special character device nodes /dev/tw[ls]?, /dev/twa?
419 and /dev/twe? do not exist, or exist with the incorrect major or minor
420 numbers, smartctl will recreate them on the fly. Typically /dev/twa0
421 refers to the first 9000-series controller, /dev/twa1 refers to the
422 second 9000 series controller, and so on. The /dev/twl0 devices refers
423 to the first 9750 series controller, /dev/twl1 resfers to the second
424 9750 series controller, and so on. Likewise /dev/twe0 refers to
425 the first 6/7/8000-series controller, /dev/twe1 refers to the second
426 6/7/8000 series controller, and so on.
428 Note that for the 6/7/8000 controllers, \fBany\fP of the physical
429 disks can be queried or examined using \fBany\fP of the 3ware's SCSI
430 logical device /dev/sd? entries. Thus, if logical device /dev/sda is
431 made up of two physical disks (3ware ports zero and one) and logical
432 device /dev/sdb is made up of two other physical disks (3ware ports
433 two and three) then you can examine the SMART data on \fBany\fP of the
434 four physical disks using \fBeither\fP SCSI device /dev/sda \fBor\fP
435 /dev/sdb. If you need to know which logical SCSI device a particular
436 physical disk (3ware port) is associated with, use the dmesg or SYSLOG
437 output to show which SCSI ID corresponds to a particular 3ware unit,
438 and then use the 3ware CLI or 3dm tool to determine which ports
439 (physical disks) correspond to particular 3ware units.
441 If the value of N corresponds to a port that does \fBnot\fP exist on
442 the 3ware controller, or to a port that does not physically have a
443 disk attached to it, the behavior of \fBsmartctl\fP depends upon the
444 specific controller model, firmware, Linux kernel and platform. In
445 some cases you will get a warning message that the device does not
446 exist. In other cases you will be presented with \'void\' data for a
449 Note that if the /dev/sd? addressing form is used, then older 3w-xxxx
450 drivers do not pass the "Enable Autosave"
451 (\'\fB\-S on\fP\') and "Enable Automatic Offline" (\'\fB\-o on\fP\')
452 commands to the disk, and produce these types of harmless syslog error
453 messages instead: "\fB3w-xxxx: tw_ioctl(): Passthru size (123392) too
454 big\fP". This can be fixed by upgrading to version 1.02.00.037 or
455 later of the 3w-xxxx driver, or by applying a patch to older
456 versions. Alternatively, use the character device /dev/twe0\-15 interface.
458 The selective self-test functions (\'\-t select,A\-B\') are only supported
459 using the character device interface /dev/twl0\-15, /dev/tws0\-15, /dev/twa0\-15 and /dev/twe0\-15.
460 The necessary WRITE LOG commands can not be passed through the SCSI
463 .\" %ENDIF OS FreeBSD Linux
464 .\" %IF OS FreeBSD Linux Windows Cygwin
466 \- [FreeBSD, Linux, Windows and Cygwin only] the device consists of one or more SATA disks
467 connected to an Areca SATA RAID controller. The positive integer N (in the range
468 from 1 to 24 inclusive) denotes which disk on the controller is monitored.
469 .\" %ENDIF OS FreeBSD Linux Windows Cygwin
471 On Linux use syntax such as:
473 \fBsmartctl \-a \-d areca,2 /dev/sg2\fP
476 \fBsmartctl \-a \-d areca,3 /dev/sg3\fP
480 On FreeBSD use syntax such as:
482 \fBsmartctl \-a \-d areca,2 /dev/arcmsr1\fP
485 \fBsmartctl \-a \-d areca,3 /dev/arcmsr2\fP
487 .\" %ENDIF OS FreeBSD
488 .\" %IF OS Windows Cygwin
489 [NEW EXPERIMENTAL SMARTCTL FEATURE] On Windows and Cygwin use syntax such as:
491 \fBsmartctl \-a \-d areca,2 /dev/arcmsr0\fP
494 \fBsmartctl \-a \-d areca,3 /dev/arcmsr1\fP
496 .\" %ENDIF OS Windows Cygwin
497 .\" %IF OS FreeBSD Linux Windows Cygwin
498 The first line above addresses the second disk on the first Areca RAID controller.
499 The second line addresses the third disk on the second Areca RAID
501 .\" %ENDIF OS FreeBSD Linux Windows Cygwin
503 To help identify the correct device on Linux, use the command:
505 \fBcat /proc/scsi/sg/device_hdr /proc/scsi/sg/devices\fP
507 to show the SCSI generic devices (one per line, starting with
508 /dev/sg0). The correct SCSI generic devices to address for
509 smartmontools are the ones with the type field equal to 3. If the
510 incorrect device is addressed, please read the warning/error messages
511 carefully. They should provide hints about what devices to use.
513 .\" %IF OS FreeBSD Linux Windows Cygwin
515 Important: the Areca controller must have firmware version 1.46 or
516 later. Lower-numbered firmware versions will give (harmless) SCSI
517 error messages and no SMART information.
520 \- [FreeBSD, Linux, Windows and Cygwin only] [NEW EXPERIMENTAL SMARTCTL FEATURE] the
521 device consists of one or more SATA or SAS disks connected to an Areca SAS RAID controller.
522 The integer N (range 1 to 128) denotes the channel (slot) and E (range
523 1 to 8) denotes the enclosure.
524 Important: This requires Areca SAS controller firmware version 1.51 or later.
526 .\" %ENDIF OS FreeBSD Linux Windows Cygwin
527 .\" %IF OS FreeBSD Linux
529 \- [FreeBSD and Linux only] the device consists of one or more SCSI/SAS or SATA disks
530 connected to a cciss RAID controller. The non-negative integer N (in the range
531 from 0 to 15 inclusive) denotes which disk on the controller is monitored.
533 To look at disks behind HP Smart Array controllers, use syntax
535 .\" %ENDIF OS FreeBSD Linux
538 \fBsmartctl \-a \-d cciss,0 /dev/cciss/c0d0\fP (cciss driver under Linux)
541 \fBsmartctl \-a \-d cciss,0 /dev/sg2\fP (hpsa or hpahcisr drivers under Linux)
546 \fBsmartctl \-a \-d cciss,0 /dev/ciss0\fP (under FreeBSD)
548 .\" %ENDIF OS FreeBSD
549 .\" %IF OS FreeBSD Linux
552 \- [FreeBSD and Linux only] the device consists of one or more ATA disks
553 connected to a HighPoint RocketRAID controller. The integer L is the
554 controller id, the integer M is the channel number, and the integer N
555 is the PMPort number if it is available. The allowed values of L are
556 from 1 to 4 inclusive, M are from 1 to 128 inclusive and N from 1 to 4
557 if PMPort available. And also these values are limited by the model
558 of the HighPoint RocketRAID controller.
560 .\" %ENDIF OS FreeBSD Linux
563 \fBsmartctl \-a \-d hpt,1/3 /dev/sda\fP (under Linux)
566 \fBsmartctl \-a \-d hpt,1/2/3 /dev/sda\fP (under Linux)
571 \fBsmartctl \-a \-d hpt,1/3 /dev/hptrr\fP (under FreeBSD)
574 \fBsmartctl \-a \-d hpt,1/2/3 /dev/hptrr\fP (under FreeBSD)
576 .\" %ENDIF OS FreeBSD
577 .\" %IF OS FreeBSD Linux
578 Note that the /dev/sda\-z form should be the device node which stands for
579 the disks derived from the HighPoint RocketRAID controllers under Linux and
580 under FreeBSD, it is the character device which the driver registered (eg,
581 /dev/hptrr, /dev/hptmv6).
582 .\" %ENDIF OS FreeBSD Linux
584 .B \-T TYPE, \-\-tolerance=TYPE
585 [ATA only] Specifies how tolerant \fBsmartctl\fP should be of ATA and SMART
588 The behavior of \fBsmartctl\fP depends upon whether the command is
589 "\fBoptional\fP" or "\fBmandatory\fP". Here "\fBmandatory\fP" means
590 "required by the ATA Specification if the device implements
591 the SMART command set" and "\fBoptional\fP" means "not required by the
592 ATA Specification even if the device implements the SMART
593 command set." The "\fBmandatory\fP" ATA and SMART commands are: (1)
594 ATA IDENTIFY DEVICE, (2) SMART ENABLE/DISABLE ATTRIBUTE AUTOSAVE, (3)
595 SMART ENABLE/DISABLE, and (4) SMART RETURN STATUS.
597 The valid arguments to this option are:
600 \- exit on failure of any \fBmandatory\fP SMART command, and ignore
601 all failures of \fBoptional\fP SMART commands. This is the default.
602 Note that on some devices, issuing unimplemented optional SMART
603 commands doesn\'t cause an error. This can result in misleading
604 \fBsmartctl\fP messages such as "Feature X not implemented", followed
605 shortly by "Feature X: enabled". In most such cases, contrary to the
606 final message, Feature X is \fBnot\fP enabled.
609 \- exit on failure of any \fBoptional\fP SMART command.
612 \- ignore failure(s) of \fBmandatory\fP SMART commands. This option
613 may be given more than once. Each additional use of this option will
614 cause one more additional failure to be ignored. Note that the use of
615 this option can lead to messages like "Feature X not supported",
616 followed shortly by "Feature X enable failed". In a few
617 such cases, contrary to the final message, Feature X \fBis\fP enabled.
620 \- equivalent to giving a large number of \'\-T permissive\' options:
621 ignore failures of \fBany number\fP of \fBmandatory\fP SMART commands.
622 Please see the note above.
624 .B \-b TYPE, \-\-badsum=TYPE
625 [ATA only] Specifies the action \fBsmartctl\fP should take if a checksum
626 error is detected in the: (1) Device Identity Structure, (2) SMART
627 Self-Test Log Structure, (3) SMART Attribute Value Structure, (4) SMART
628 Attribute Threshold Structure, or (5) ATA Error Log Structure.
630 The valid arguments to this option are:
633 \- report the incorrect checksum but carry on in spite of it. This is the
637 \- exit \fBsmartctl\fP.
640 \- continue silently without issuing a warning.
642 .B \-r TYPE, \-\-report=TYPE
643 Intended primarily to help \fBsmartmontools\fP developers understand
644 the behavior of \fBsmartmontools\fP on non-conforming or poorly
645 conforming hardware. This option reports details of \fBsmartctl\fP
646 transactions with the device. The option can be used multiple times.
647 When used just once, it shows a record of the ioctl() transactions
648 with the device. When used more than once, the detail of these
649 ioctl() transactions are reported in greater detail. The valid
650 arguments to this option are:
653 \- report all ioctl() transactions.
656 \- report only ioctl() transactions with ATA devices.
659 \- report only ioctl() transactions with SCSI devices. Invoking this once
660 shows the SCSI commands in hex and the corresponding status. Invoking
661 it a second time adds a hex listing of the first 64 bytes of data send to,
662 or received from the device.
664 Any argument may include a positive integer to specify the level of detail
665 that should be reported. The argument should be followed by a comma then
666 the integer with no spaces. For example,
669 level is 1, so \'\-r ataioctl,1\' and \'\-r ataioctl\' are equivalent.
671 For testing purposes, the output of \'\-r ataioctl,2\' can later be parsed
672 by \fBsmartctl\fP itself if \'\-\' is used as device path argument.
673 The ATA command input parameters, sector data and return values are
674 reconstructed from the debug report read from stdin.
675 Then \fBsmartctl\fP internally simulates an ATA device with the same
676 behaviour. This is does not work for SCSI devices yet.
678 .B \-n POWERMODE, \-\-nocheck=POWERMODE
679 [ATA only] Specifies if \fBsmartctl\fP should exit before performing any
680 checks when the device is in a low-power mode. It may be used to prevent
681 a disk from being spun-up by \fBsmartctl\fP. The power mode is ignored by
682 default. A nonzero exit status is returned if the device is in one of the
683 specified low-power modes (see RETURN VALUES below).
685 Note: If this option is used it may also be necessary to specify the device
686 type with the \'\-d\' option. Otherwise the device may spin up due to
687 commands issued during device type autodetection.
689 The valid arguments to this option are:
692 \- check the device always, but print the power mode if \'\-i\' is
696 \- check the device unless it is in SLEEP mode.
699 \- check the device unless it is in SLEEP or STANDBY mode. In
700 these modes most disks are not spinning, so if you want to prevent
701 a disk from spinning up, this is probably what you want.
704 \- check the device unless it is in SLEEP, STANDBY or IDLE mode.
705 In the IDLE state, most disks are still spinning, so this is probably
709 .B SMART FEATURE ENABLE/DISABLE COMMANDS:
712 if multiple options are used to both enable and disable a
715 the enable and disable commands will be issued. The enable command
716 will always be issued
718 the corresponding disable command.
720 .B \-s VALUE, \-\-smart=VALUE
721 Enables or disables SMART on device. The valid arguments to
722 this option are \fIon\fP and \fIoff\fP. Note that the command \'\-s on\'
723 (perhaps used with with the \'\-o on\' and \'\-S on\' options) should be
724 placed in a start-up script for your machine, for example in rc.local or
725 rc.sysinit. In principle the SMART feature settings are preserved over
726 power-cycling, but it doesn\'t hurt to be sure. It is not necessary (or
727 useful) to enable SMART to see the TapeAlert messages.
729 .B \-o VALUE, \-\-offlineauto=VALUE
730 [ATA only] Enables or disables SMART automatic offline test, which scans the
731 drive every four hours for disk defects. This command can be given during
732 normal system operation. The valid arguments to this option are \fIon\fP
735 Note that the SMART automatic offline test command is listed as
736 "Obsolete" in every version of the ATA and ATA/ATAPI Specifications.
737 It was originally part of the SFF-8035i Revision 2.0 specification,
738 but was never part of any ATA specification. However it is
739 implemented and used by many vendors. [Good documentation can be found
740 in IBM\'s Official Published Disk Specifications. For example the IBM
741 Travelstar 40GNX Hard Disk Drive Specifications (Revision 1.1, 22
742 April 2002, Publication # 1541, Document S07N-7715-02) page 164. You
743 can also read the SFF-8035i Specification -- see REFERENCES below.]
744 You can tell if automatic offline testing is supported by seeing if
745 this command enables and disables it, as indicated by the \'Auto
746 Offline Data Collection\' part of the SMART capabilities report
747 (displayed with \'\-c\').
749 SMART provides \fBthree\fP basic categories of testing. The
750 \fBfirst\fP category, called "online" testing, has no effect on the
751 performance of the device. It is turned on by the \'\-s on\' option.
753 The \fBsecond\fP category of testing is called "offline" testing. This
754 type of test can, in principle, degrade the device performance. The
755 \'\-o on\' option causes this offline testing to be carried out,
756 automatically, on a regular scheduled basis. Normally, the disk will
757 suspend offline testing while disk accesses are taking place, and then
758 automatically resume it when the disk would otherwise be idle, so in
759 practice it has little effect. Note that a one-time offline test can
760 also be carried out immediately upon receipt of a user command. See
761 the \'\-t offline\' option below, which causes a one-time offline test
762 to be carried out immediately.
764 The choice (made by the SFF-8035i and ATA specification authors) of
765 the word \fItesting\fP for these first two categories is unfortunate,
766 and often leads to confusion. In fact these first two categories of
767 online and offline testing could have been more accurately described
768 as online and offline \fBdata collection\fP.
770 The results of this automatic or immediate offline testing (data
771 collection) are reflected in the values of the SMART Attributes.
772 Thus, if problems or errors are detected, the values of these
773 Attributes will go below their failure thresholds; some types of
774 errors may also appear in the SMART error log. These are visible with
775 the \'\-A\' and \'\-l error\' options respectively.
777 Some SMART attribute values are updated only during off-line data
778 collection activities; the rest are updated during normal operation of
779 the device or during both normal operation and off-line testing. The
780 Attribute value table produced by the \'\-A\' option indicates this in
781 the UPDATED column. Attributes of the first type are labeled
782 "Offline" and Attributes of the second type are labeled "Always".
784 The \fBthird\fP category of testing (and the \fIonly\fP category for
785 which the word \'testing\' is really an appropriate choice) is "self"
786 testing. This third type of test is only performed (immediately) when
787 a command to run it is issued. The \'\-t\' and \'\-X\' options can be
788 used to carry out and abort such self-tests; please see below for
791 Any errors detected in the self testing will be shown in the
792 SMART self-test log, which can be examined using the \'\-l selftest\'
795 \fBNote:\fP in this manual page, the word \fB"Test"\fP is used in
796 connection with the second category just described, e.g. for the
797 "offline" testing. The words \fB"Self-test"\fP are used in
798 connection with the third category.
800 .B \-S VALUE, \-\-saveauto=VALUE
801 [ATA] Enables or disables SMART autosave of device vendor-specific
802 Attributes. The valid arguments to this option are \fIon\fP
803 and \fIoff\fP. Note that this feature is preserved across disk power
804 cycles, so you should only need to issue it once.
806 The ATA standard does not specify a method to check whether SMART
807 autosave is enabled. Unlike SCSI (below), smartctl is unable to print
808 a warning if autosave is disabled.
810 [SCSI] For SCSI devices this toggles the value of the Global Logging
811 Target Save Disabled (GLTSD) bit in the Control Mode Page. Some disk
812 manufacturers set this bit by default. This prevents error counters,
813 power-up hours and other useful data from being placed in non-volatile
814 storage, so these values may be reset to zero the next time the device
815 is power-cycled. If the GLTSD bit is set then \'smartctl \-a\' will
816 issue a warning. Use \fIon\fP to clear the GLTSD bit and thus enable
817 saving counters to non-volatile storage. For extreme streaming-video
818 type applications you might consider using \fIoff\fP to set the GLTSD
821 .B \-g NAME, \-\-get=NAME, \-s NAME[,VALUE], \-\-set=NAME[,VALUE]
822 Gets/sets non-SMART device settings.
823 Note that the \'\-\-set\' option shares its short option \'\-s\' with
824 \'\-\-smart\'. Valid arguments are:
827 \- Gets all values. This is equivalent to
829 \'-g aam -g apm -g lookahead -g security -g wcache\'
833 \- [ATA only] Gets/sets the Automatic Acoustic Management (AAM) feature
834 (if supported). A value of 128 sets the most quiet (slowest) mode and 254
835 the fastest (loudest) mode, \'off\' disables AAM. Devices may support
836 intermediate levels. Values below 128 are defined as vendor specific (0)
837 or retired (1 to 127). Note that the AAM feature was declared obsolete in
838 ATA ACS-2 Revision 4a (Dec 2010).
841 \- [ATA only] Gets/sets the Advanced Power Management (APM) feature on
842 device (if supported). If a value between 1 and 254 is provided, it will
843 attempt to enable APM and set the specified value, \'off\' disables APM.
844 Note the actual behavior depends on the drive, for example some drives disable
845 APM if their value is set above 128. Values below 128 are supposed to allow
846 drive spindown, values 128 and above adjust only head-parking frequency,
847 although the actual behavior defined is also vendor-specific.
849 .I lookahead[,on|off]
850 \- [ATA only] Gets/sets the read look-ahead feature (if supported).
851 Read look-ahead is usually enabled by default.
854 \- [ATA only] Gets the status of ATA Security feature (if supported).
855 If ATA Security is enabled an ATA user password is set. The drive will be
856 locked on next reset then.
859 \- [ATA only] Sets ATA Security feature to frozen mode. This prevents that
860 the drive accepts any security commands until next reset. Note that the
861 frozen mode may already be set by BIOS or OS.
864 \- [ATA only] Sets the standby (spindown) timer and places the drive in the
865 IDLE mode. A value of 0 or \'off\' disables the standby timer.
866 Values from 1 to 240 specify timeouts from 5 seconds to 20 minutes in 5
867 second increments. Values from 241 to 251 specify timeouts from 30 minutes
868 to 330 minutes in 30 minute increments. Value 252 specifies 21 minutes.
869 Value 253 specifies a vendor specific time between 8 and 12 hours. Value
870 255 specifies 21 minutes and 15 seconds. Some drives may use a vendor
871 specific interpretation for the values. Note that there is no get option
872 because ATA standards do not specify a method to read the standby timer.
875 \- [ATA only] Places the drive in the STANDBY mode. This usually spins down
876 the drive. The setting of the standby timer is not affected.
879 \- [ATA] Gets/sets the volatile write cache feature (if supported).
880 The write cache is usually enabled by default.
883 \- [SCSI] [NEW EXPERIMENTAL SMARTCTL FEATURE]
884 Gets/sets the \'Write Cache Enable\' (WCE) bit (if supported).
885 The write cache is usually enabled by default.
887 .I wcreorder[,on|off]
888 \- [ATA only] [NEW EXPERIMENTAL SMARTCTL FEATURE]
889 Gets/sets Write Cache Reordering.
890 If it is disabled (off), disk write scheduling is executed on a
891 first-in-first-out (FIFO) basis. If Write Cache Reordering is enabled (on),
892 then disk write scheduling may be reordered by the drive. If write cache is
893 disabled, the current Write Cache Reordering state is remembered but has
894 no effect on non-cached writes, which are always written in the order received.
895 The state of Write Cache Reordering has no effect on either NCQ or LCQ queued
899 \- [SCSI only] [NEW EXPERIMENTAL SMARTCTL FEATURE]
900 Gets/sets the \'Read Cache Disable\' (RCE) bit. \'Off\' value disables read cache
902 The read cache is usually enabled by default.
905 .B SMART READ AND DISPLAY DATA OPTIONS:
908 Check: Ask the device to report its SMART health status or pending
909 TapeAlert messages. SMART status is based on
910 information that it has gathered from online and offline
911 tests, which were used to determine/update its
912 SMART vendor-specific Attribute values. TapeAlert status is obtained
913 by reading the TapeAlert log page.
915 If the device reports failing health status, this means
917 that the device has already failed,
919 that it is predicting its own failure within the next 24 hours. If
920 this happens, use the \'\-a\' option to get more information, and
921 .B get your data off the disk and to someplace safe as soon as you can.
923 .B \-c, \-\-capabilities
924 [ATA only] Prints only the generic SMART capabilities. These
925 show what SMART features are implemented and how the device will
926 respond to some of the different SMART commands. For example it
927 shows if the device logs errors, if it supports offline surface
928 scanning, and so on. If the device can carry out self-tests, this
929 option also shows the estimated time required to run those tests.
931 Note that the time required to run the Self-tests (listed in minutes)
932 are fixed. However the time required to run the Immediate Offline
933 Test (listed in seconds) is variable. This means that if you issue a
934 command to perform an Immediate Offline test with the \'\-t offline\' option,
935 then the time may jump to a larger value and then count down as the
936 Immediate Offline Test is carried out. Please see REFERENCES below
937 for further information about the the flags and capabilities described
940 .B \-A, \-\-attributes
941 [ATA] Prints only the vendor specific SMART Attributes. The Attributes
942 are numbered from 1 to 253 and have specific names and ID numbers. For
943 example Attribute 12 is "power cycle count": how many times has the
944 disk been powered up.
946 Each Attribute has a "Raw" value, printed under the heading
947 "RAW_VALUE", and a "Normalized" value printed under the heading
948 "VALUE". [Note: \fBsmartctl\fP prints these values in base-10.] In
949 the example just given, the "Raw Value" for Attribute 12 would be the
950 actual number of times that the disk has been power-cycled, for
951 example 365 if the disk has been turned on once per day for exactly
952 one year. Each vendor uses their own algorithm to convert this "Raw"
953 value to a "Normalized" value in the range from 1 to 254. Please keep
954 in mind that \fBsmartctl\fP only reports the different Attribute
955 types, values, and thresholds as read from the device. It does
956 \fBnot\fP carry out the conversion between "Raw" and "Normalized"
957 values: this is done by the disk\'s firmware.
959 The conversion from Raw value to a quantity with physical units is
960 not specified by the SMART standard. In most cases, the values printed
961 by \fBsmartctl\fP are sensible. For example the temperature Attribute
962 generally has its raw value equal to the temperature in Celsius.
963 However in some cases vendors use unusual conventions. For example
964 the Hitachi disk on my laptop reports its power-on hours in minutes,
965 not hours. Some IBM disks track three temperatures rather than one, in
966 their raw values. And so on.
968 Each Attribute also has a Threshold value (whose range is 0 to 255)
969 which is printed under the heading "THRESH". If the Normalized value
970 is \fBless than or equal to\fP the Threshold value, then the Attribute
971 is said to have failed. If the Attribute is a pre-failure Attribute,
972 then disk failure is imminent.
974 Each Attribute also has a "Worst" value shown under the heading
975 "WORST". This is the smallest (closest to failure) value that the
976 disk has recorded at any time during its lifetime when SMART was
977 enabled. [Note however that some vendors firmware may actually
978 \fBincrease\fP the "Worst" value for some "rate-type" Attributes.]
980 The Attribute table printed out by \fBsmartctl\fP also shows the
981 "TYPE" of the Attribute. Attributes are one of two possible types:
982 Pre-failure or Old age. Pre-failure Attributes are ones which, if
983 less than or equal to their threshold values, indicate pending disk
984 failure. Old age, or usage Attributes, are ones which indicate
985 end-of-product life from old-age or normal aging and wearout, if
986 the Attribute value is less than or equal to the threshold. \fBPlease
987 note\fP: the fact that an Attribute is of type 'Pre-fail' does
988 \fBnot\fP mean that your disk is about to fail! It only has this
989 meaning if the Attribute\'s current Normalized value is less than or
990 equal to the threshold value.
992 If the Attribute\'s current Normalized value is less than or equal to
993 the threshold value, then the "WHEN_FAILED" column will display
994 "FAILING_NOW". If not, but the worst recorded value is less than or
995 equal to the threshold value, then this column will display
996 "In_the_past". If the "WHEN_FAILED" column has no entry (indicated by
997 a dash: \'\-\') then this Attribute is OK now (not failing) and has
998 also never failed in the past.
1000 The table column labeled "UPDATED" shows if the SMART Attribute values
1001 are updated during both normal operation and off-line testing, or
1002 only during offline testing. The former are labeled "Always" and the
1003 latter are labeled "Offline".
1005 So to summarize: the Raw Attribute values are the ones that might have
1006 a real physical interpretation, such as "Temperature Celsius",
1007 "Hours", or "Start-Stop Cycles". Each manufacturer converts these,
1008 using their detailed knowledge of the disk\'s operations and failure
1009 modes, to Normalized Attribute values in the range 1\-254. The
1010 current and worst (lowest measured) of these Normalized Attribute
1011 values are stored on the disk, along with a Threshold value that the
1012 manufacturer has determined will indicate that the disk is going to
1013 fail, or that it has exceeded its design age or aging limit.
1014 \fBsmartctl\fP does \fBnot\fP calculate any of the Attribute values,
1015 thresholds, or types, it merely reports them from the SMART data on
1018 Note that starting with ATA/ATAPI-4, revision 4, the meaning of these
1019 Attribute fields has been made entirely vendor-specific. However most
1020 newer ATA/SATA disks seem to respect their meaning, so we have retained
1021 the option of printing the Attribute values.
1023 Solid-state drives use different meanings for some of the attributes.
1024 In this case the attribute name printed by smartctl is incorrect unless
1025 the drive is already in the smartmontools drive database.
1027 [SCSI] For SCSI devices the "attributes" are obtained from the temperature
1028 and start-stop cycle counter log pages. Certain vendor specific
1029 attributes are listed if recognised. The attributes are output in a
1030 relatively free format (compared with ATA disk attributes).
1032 .B \-f FORMAT, \-\-format=FORMAT
1033 [ATA only] Selects the output format of the attributes:
1036 \- Old smartctl format. This is the default unless the \'\-x\' option is
1040 \- New format which fits into 80 colums (except in some rare cases).
1041 This format also decodes four additional attribute flags.
1042 This is the default if the '\-x\' option is specified.
1045 \- Print all attribute IDs as hexadecimal numbers.
1048 \- Print all normalized values as hexadecimal numbers.
1051 \- Same as \'\-f hex,id \-f hex,val\'.
1053 .B \-l TYPE, \-\-log=TYPE
1054 Prints either the SMART Error Log, the SMART Self-Test Log, the SMART
1055 Selective Self-Test Log [ATA only], the Log Directory [ATA only], or
1056 the Background Scan Results Log [SCSI only].
1057 The valid arguments to this option are:
1060 \- [ATA] prints the Summary SMART error log. SMART disks maintain a log
1061 of the most recent five non-trivial errors. For each of these errors, the
1062 disk power-on lifetime at which the error occurred is recorded, as is
1063 the device status (idle, standby, etc) at the time of the error. For
1064 some common types of errors, the Error Register (ER) and Status
1065 Register (SR) values are decoded and printed as text. The meanings of these
1068 \fBABRT\fP: Command \fBAB\fPo\fBRT\fPed
1069 \fBAMNF\fP: \fBA\fPddress \fBM\fPark \fBN\fPot \fBF\fPound
1070 \fBCCTO\fP: \fBC\fPommand \fBC\fPompletion \fBT\fPimed \fBO\fPut
1071 \fBEOM\fP: \fBE\fPnd \fBO\fPf \fBM\fPedia
1072 \fBICRC\fP: \fBI\fPnterface \fBC\fPyclic \fBR\fPedundancy \fBC\fPode (CRC) error
1073 \fBIDNF\fP: \fBID\fPentity \fBN\fPot \fBF\fPound
1074 \fBILI\fP: (packet command-set specific)
1075 \fBMC\fP: \fBM\fPedia \fBC\fPhanged
1076 \fBMCR\fP: \fBM\fPedia \fBC\fPhange \fBR\fPequest
1077 \fBNM\fP: \fBN\fPo \fBM\fPedia
1078 \fBobs\fP: \fBobs\fPolete
1079 \fBTK0NF\fP: \fBT\fPrac\fBK 0 N\fPot \fBF\fPound
1080 \fBUNC\fP: \fBUNC\fPorrectable Error in Data
1081 \fBWP\fP: Media is \fBW\fPrite \fBP\fProtected
1083 In addition, up to the last five commands that preceded the error are
1084 listed, along with a timestamp measured from the start of the
1085 corresponding power cycle. This is displayed in the form
1086 Dd+HH:MM:SS.msec where D is the number of days, HH is hours, MM is
1087 minutes, SS is seconds and msec is milliseconds. [Note: this time
1088 stamp wraps after 2^32 milliseconds, or 49 days 17 hours 2 minutes and
1089 47.296 seconds.] The key ATA disk registers are also recorded in the
1090 log. The final column of the error log is a text-string description
1091 of the ATA command defined by the Command Register (CR) and Feature
1092 Register (FR) values. Commands that are obsolete in the most current
1093 spec are listed like this: \fBREAD LONG (w/ retry) [OBS-4]\fP,
1094 indicating that the command became obsolete with or in the ATA-4
1095 specification. Similarly, the notation \fB[RET\-\fP\fIN\fP\fB]\fP is
1096 used to indicate that a command was retired in the ATA-\fIN\fP
1097 specification. Some commands are not defined in any version of the
1098 ATA specification but are in common use nonetheless; these are marked
1099 \fB[NS]\fP, meaning non-standard.
1101 The ATA Specification (ATA-5 Revision 1c, Section 8.41.6.8.2) says:
1102 \fB"Error log structures shall include UNC errors, IDNF errors for
1103 which the address requested was valid, servo errors, write fault
1104 errors, etc. Error log data structures shall not include errors
1105 attributed to the receipt of faulty commands such as command codes not
1106 implemented by the device or requests with invalid parameters or
1107 invalid addresses."\fP The definitions of these terms are:
1109 \fBUNC\fP (\fBUNC\fPorrectable): data is uncorrectable. This refers
1110 to data which has been read from the disk, but for which the Error
1111 Checking and Correction (ECC) codes are inconsistent. In effect, this
1112 means that the data can not be read.
1114 \fBIDNF\fP (\fBID N\fPot \fBF\fPound): user-accessible address could
1115 not be found. For READ LOG type commands, \fBIDNF\fP can also indicate
1116 that a device data log structure checksum was incorrect.
1118 If the command that caused the error was a READ or WRITE command, then
1119 the Logical Block Address (LBA) at which the error occurred will be
1120 printed in base 10 and base 16. The LBA is a linear address, which
1121 counts 512-byte sectors on the disk, starting from zero. (Because of
1122 the limitations of the SMART error log, if the LBA is greater than
1123 0xfffffff, then either no error log entry will be made, or the error
1124 log entry will have an incorrect LBA. This may happen for drives with
1125 a capacity greater than 128 GiB or 137 GB.) On Linux systems the
1126 smartmontools web page has instructions about how to convert the LBA
1127 address to the name of the disk file containing the erroneous disk
1130 Please note that some manufacturers \fBignore\fP the ATA
1131 specifications, and make entries in the error log if the device
1132 receives a command which is not implemented or is not valid.
1135 \- [SCSI] prints the error counter log pages for reads, write and verifies.
1136 The verify row is only output if it has an element other than zero.
1138 .I xerror[,NUM][,error]
1139 \- [ATA only] prints the Extended Comprehensive SMART error log
1140 (General Purpose Log address 0x03). Unlike the Summary SMART error
1141 log (see \'\-l error\' above), it provides sufficient space to log
1142 the contents of the 48-bit LBA register set introduced with ATA-6.
1143 It also supports logs with more than one sector. Each sector holds
1144 up to 4 log entries. The actual number of log sectors is vendor
1145 specific, typical values for HDD are 2 (Samsung), 5 (Seagate) or
1148 Only the 8 most recent error log entries are printed by default.
1149 This number can be changed by the optional parameter NUM.
1151 If ',error' is appended and the Extended Comprehensive SMART error
1152 log is not supported, the Summary SMART self-test log is printed.
1154 Please note that recent drives may report errors only in the Extended
1155 Comprehensive SMART error log. The Summary SMART error log may be reported
1156 as supported but is always empty then.
1159 \- [ATA] prints the SMART self-test log. The disk maintains a self-test
1160 log showing the results of the self tests, which can be run using the
1161 \'\-t\' option described below. For each of the most recent
1162 twenty-one self-tests, the log shows the type of test (short or
1163 extended, off-line or captive) and the final status of the test. If
1164 the test did not complete successfully, then the percentage of the
1165 test remaining is shown. The time at which the test took place,
1166 measured in hours of disk lifetime, is also printed. [Note: this time
1167 stamp wraps after 2^16 hours, or 2730 days and 16 hours, or about 7.5
1168 years.] If any errors were detected, the Logical Block Address (LBA)
1169 of the first error is printed in decimal notation. On Linux systems the
1170 smartmontools web page has instructions about how to convert this LBA
1171 address to the name of the disk file containing the erroneous block.
1174 \- [SCSI] the self-test log for a SCSI device has a slightly different
1175 format than for an ATA device. For each of the most recent twenty
1176 self-tests, it shows the type of test and the status (final or in
1177 progress) of the test. SCSI standards use the terms "foreground" and
1178 "background" (rather than ATA\'s corresponding "captive" and
1179 "off-line") and "short" and "long" (rather than ATA\'s corresponding
1180 "short" and "extended") to describe the type of the test. The printed
1181 segment number is only relevant when a test fails in the third or
1182 later test segment. It identifies the test that failed and consists
1183 of either the number of the segment that failed during the test, or
1184 the number of the test that failed and the number of the segment in
1185 which the test was run, using a vendor-specific method of putting both
1186 numbers into a single byte. The Logical Block Address (LBA) of the
1187 first error is printed in hexadecimal notation. On Linux systems the
1188 smartmontools web page has instructions about how to convert this LBA
1189 address to the name of the disk file containing the erroneous block.
1190 If provided, the SCSI Sense Key (SK), Additional Sense Code (ASC) and
1191 Additional Sense Code Qualifier (ASQ) are also printed. The self tests
1192 can be run using the \'\-t\' option described below (using the ATA
1195 .I xselftest[,NUM][,selftest]
1196 \- [ATA only] prints the Extended SMART self-test log (General Purpose
1197 Log address 0x07). Unlike the SMART self-test log (see \'\-l selftest\'
1198 above), it supports 48-bit LBA and logs with more than one sector.
1199 Each sector holds up to 19 log entries. The actual number of log sectors
1200 is vendor specific, typical values are 1 (Seagate) or 2 (Samsung).
1202 Only the 25 most recent log entries are printed by default. This number
1203 can be changed by the optional parameter NUM.
1205 If ',selftest' is appended and the Extended SMART self-test log is not
1206 supported, the old SMART self-test log is printed.
1209 \- [ATA only] Please see the \'\-t select\' option below for a
1210 description of selective self-tests. The selective self-test log
1211 shows the start/end Logical Block Addresses (LBA) of each of the five
1212 test spans, and their current test status. If the span is being
1213 tested or the remainder of the disk is being read-scanned, the
1214 current 65536-sector block of LBAs being tested is also displayed.
1215 The selective self-test log also shows if a read-scan of the
1216 remainder of the disk will be carried out after the selective
1217 self-test has completed (see \'\-t afterselect\' option) and the time
1218 delay before restarting this read-scan if it is interrupted (see
1219 \'\-t pending\' option).
1222 \- [ATA only] if the device supports the General Purpose Logging feature
1223 set (ATA-6 and above) then this prints the Log Directory (the log at
1224 address 0). The Log Directory shows what logs are available and their
1225 length in sectors (512 bytes). The contents of the logs at address 1
1226 [Summary SMART error log] and at address 6 [SMART self-test log] may
1227 be printed using the previously-described
1231 arguments to this option.
1232 If your version of smartctl supports 48-bit ATA commands, both the
1233 General Purpose Log (GPL) and SMART Log (SL) directories are printed in
1234 one combined table. The output can be restricted to the GPL directory or
1235 SL directory by \'\-l directory,q\' or \'\-l directory,s\' respectively.
1238 \- [SCSI only] the background scan results log outputs information derived
1239 from Background Media Scans (BMS) done after power up and/or periodically
1240 (e.g. every 24 hours) on recent SCSI disks. If supported, the BMS status
1241 is output first, indicating whether a background scan is currently
1242 underway (and if so a progress percentage), the amount of time the disk
1243 has been powered up and the number of scans already completed. Then there
1244 is a header and a line for each background scan "event". These will
1245 typically be either recovered or unrecoverable errors. That latter group
1246 may need some attention. There is a description of the background scan
1247 mechanism in section 4.18 of SBC-3 revision 6 (see www.t10.org ).
1249 .I scttemp, scttempsts, scttemphist
1250 \- [ATA only] prints the disk temperature information provided by the
1251 SMART Command Transport (SCT) commands.
1252 The option \'scttempsts\' prints current temperature and temperature
1253 ranges returned by the SCT Status command, \'scttemphist\' prints
1254 temperature limits and the temperature history table returned by
1255 the SCT Data Table command, and \'scttemp\' prints both.
1256 The temperature values are preserved across power cycles.
1257 The logging interval can be configured with the
1258 \'\-l scttempint,N[,p]\' option, see below.
1259 The SCT commands were introduced in ATA8-ACS and were also
1260 supported by many ATA-7 disks.
1263 \- [ATA only] clears the SCT temperature history table and sets the
1264 time interval for temperature logging to N minutes.
1265 If \',p\' is specified, the setting is preserved across power cycles.
1266 Otherwise, the setting is volatile and will be reverted to the last
1267 non-volatile setting by the next hard reset. The default interval
1268 is vendor specific, typical values are 1, 2, or 5 minutes.
1270 .I scterc[,READTIME,WRITETIME]
1271 \- [ATA only] prints values and descriptions of the SCT Error Recovery
1272 Control settings. These are equivalent to TLER (as used by Western
1273 Digital), CCTL (as used by Samsung and Hitachi) and ERC (as used by
1274 Seagate). READTIME and WRITETIME arguments (deciseconds) set the
1275 specified values. Values of 0 disable the feature, other values less
1276 than 65 are probably not supported. For RAID configurations, this is
1277 typically set to 70,70 deciseconds.
1280 \- [ATA only] prints values and descriptions of the ATA Device Statistics
1281 log pages (General Purpose Log address 0x04). If no PAGE number is specified,
1282 entries from all supported pages are printed. If PAGE 0 is specified,
1283 the list of supported pages is printed. Device Statistics was
1284 introduced in ACS-2 and is only supported by some recent devices
1285 (e.g. Hitachi 7K3000, Intel 320, 330, 520 and 710 Series SSDs, Crucial/Micron
1289 \- [SATA only] prints values and descriptions of the SATA Phy Event
1290 Counters (General Purpose Log address 0x11). If \'\-l sataphy,reset\'
1291 is specified, all counters are reset after reading the values.
1292 This also works for SATA devices with Packet interface like CD/DVD
1296 \- [SAS (SCSI) only] prints values and descriptions of the SAS (SSP)
1297 Protocol Specific log page (log page 0x18). If \'\-l sasphy,reset\'
1298 is specified, all counters are reset after reading the values.
1300 .I gplog,ADDR[,FIRST[\-LAST|+SIZE]]
1301 \- [ATA only] prints a hex dump of any log accessible via General
1302 Purpose Logging (GPL) feature. The log address ADDR is the hex address
1303 listed in the log directory (see \'\-l directory\' above).
1304 The range of log sectors (pages) can be specified by decimal values
1305 FIRST\-LAST or FIRST+SIZE. FIRST defaults to 0, SIZE defaults to 1.
1306 LAST can be set to \'max\' to specify the last page of the log.
1308 .I smartlog,ADDR[,FIRST[\-LAST|+SIZE]]
1309 \- [ATA only] prints a hex dump of any log accessible via SMART Read
1310 Log command. See \'\-l gplog,...\' above for parameter syntax.
1312 For example, all these commands:
1314 smartctl \-l gplog,0x80,10-15 /dev/sda
1315 smartctl \-l gplog,0x80,10+6 /dev/sda
1316 smartctl \-l smartlog,0x80,10-15 /dev/sda
1318 print pages 10-15 of log 0x80 (first host vendor specific log).
1320 The hex dump format is compatible with the \'xxd \-r\' command.
1323 smartctl \-l gplog,0x11 /dev/sda | grep ^0 | xxd -r >log.bin
1325 writes a binary representation of the one sector log 0x11
1326 (SATA Phy Event Counters) to file log.bin.
1329 \- [ATA] prints the Solid State Device Statistics log page.
1330 This has the same effect as \'\-l devstat,7\', see above.
1333 \- [SCSI] prints the Solid State Media percentage used endurance
1334 indicator. A value of 0 indicates as new condition while 100
1335 indicates the device is at the end of its lifetime as projected by the
1336 manufacturer. The value may reach 255.
1338 .B \-v ID,FORMAT[:BYTEORDER][,NAME], \-\-vendorattribute=ID,FORMAT[:BYTEORDER][,NAME]
1339 [ATA only] Sets a vendor-specific raw value print FORMAT, an optional
1340 BYTEORDER and an optional NAME for Attribute ID.
1341 This option may be used multiple times.
1343 The Attribute ID can be in the range 1 to 255. If \'N\' is specified as
1344 ID, the settings for all Attributes are changed.
1346 The optional BYTEORDER consists of 1 to 8 characters from the
1347 set \'012345rvwz\'. The characters \'0\' to \'5\' select the byte 0
1348 to 5 from the 48-bit raw value, \'r\' selects the reserved byte of
1349 the attribute data block, \'v\' selects the normalized value, \'w\'
1350 selects the worst value and \'z\' inserts a zero byte.
1351 The default BYTEORDER is \'543210\' for all 48-bit formats, \'r543210\'
1352 for the 54-bit formats, and \'543210wv\' for the 64-bit formats.
1353 For example, \'\-v 5,raw48:012345\' prints the raw value of
1354 attribute 5 with big endian instead of little endian
1357 The NAME is a string of letters, digits and underscore. Its length should
1358 not exceed 23 characters. The \'\-P showall\' option reports an error if
1362 \- Prints (to STDOUT) a list of all valid arguments to this option,
1365 Valid arguments for FORMAT are:
1368 \- Print the Raw value as six 8-bit unsigned base-10 integers.
1369 This may be useful for decoding the meaning of the Raw value.
1372 \- Print the Raw value as three 16-bit unsigned base-10 integers.
1373 This may be useful for decoding the meaning of the Raw value.
1376 \- Print the Raw value as a 48-bit unsigned base-10 integer.
1377 This is the default for most attributes.
1380 \- Print the Raw value as a 12 digit hexadecimal number.
1381 This may be useful for decoding the meaning of the Raw value.
1384 \- Print the Raw value as a 54-bit unsigned base-10 integer.
1385 This includes the reserved byte which follows the 48-bit raw value.
1388 \- Print the Raw value as a 14 digit hexadecimal number.
1389 This includes the reserved byte which follows the 48-bit raw value.
1392 \- Print the Raw value as a 64-bit unsigned base-10 integer.
1393 This includes two bytes from the normalized and worst attribute value.
1394 This raw format is used by some SSD devices with Indilinx controller.
1397 \- Print the Raw value as a 16 digit hexadecimal number.
1398 This includes two bytes from the normalized and worst attribute value.
1399 This raw format is used by some SSD devices with Indilinx controller.
1402 \- Raw Attribute is power-on time in minutes. Its raw value
1403 will be displayed in the form "Xh+Ym". Here X is hours, and Y is
1404 minutes in the range 0\-59 inclusive. Y is always printed with two
1405 digits, for example "06" or "31" or "00".
1408 \- Raw Attribute is power-on time in seconds. Its raw value
1409 will be displayed in the form "Xh+Ym+Zs". Here X is hours, Y is
1410 minutes in the range 0\-59 inclusive, and Z is seconds in the range
1411 0\-59 inclusive. Y and Z are always printed with two digits, for
1412 example "06" or "31" or "00".
1415 \- Raw Attribute is power-on time, measured in units of 30
1416 seconds. This format is used by some Samsung disks. Its raw value
1417 will be displayed in the form "Xh+Ym". Here X is hours, and Y is
1418 minutes in the range 0\-59 inclusive. Y is always printed with two
1419 digits, for example "06" or "31" or "00".
1422 \- Raw Attribute is power-on time measured in 32-bit hours and 24-bit
1423 milliseconds since last hour update. It will be displayed in the form
1424 "Xh+Ym+Z.Ms". Here X is hours, Y is minutes, Z is seconds and M is
1428 \- Raw Attribute is the disk temperature in Celsius. Info about
1429 Min/Max temperature is printed if available. This is the default
1430 for Attributes 190 and 194. The recording interval (lifetime,
1431 last power cycle, last soft reset) of the min/max values is device
1435 \- Raw Attribute is ten times the disk temperature in Celsius.
1438 \- Print the raw attribute as a 16-bit value and two optional
1439 16-bit values if these words are nonzero. This is the default
1440 for Attributes 5 and 196.
1443 \- Raw attribute is spin-up time. It is printed as a 16-bit value
1444 and an optional "Average" 16-bit value if the word is nonzero.
1445 This is the default for Attribute 3.
1448 \- Print the raw attribute as a 24-bit value and three optional
1449 8-bit values if these bytes are nonzero. This is the default
1453 \- Raw Attribute contains two 24-bit values. The first is the
1454 number of load cycles. The second is the number of unload cycles.
1455 The difference between these two values is the number of times that
1456 the drive was unexpectedly powered off (also called an emergency
1457 unload). As a rule of thumb, the mechanical stress created by one
1458 emergency unload is equivalent to that created by one hundred normal
1462 \- Raw attribute is an error rate which consists of a 24-bit error
1463 count and a 32-bit total count.
1465 The following old arguments to \'\-v\' are also still valid:
1469 .I 9,min2hour,Power_On_Minutes.
1473 .I 9,sec2hour,Power_On_Seconds.
1477 .I 9,halfmin2hour,Power_On_Half_Minutes.
1481 .I 9,tempminmax,Temperature_Celsius.
1483 .I 192,emergencyretractcyclect
1485 .I 192,raw48,Emerg_Retract_Cycle_Ct
1493 .I 194,temp10x,Temperature_Celsius_x10.
1497 .I 194,raw48,Unknown_Attribute.
1501 .I 197,raw48,Total_Pending_Sectors.
1502 Also means that Attribute number 197 (Current Pending Sector Count)
1503 is not reset if uncorrectable sectors are reallocated
1504 (see \fBsmartd.conf\fP(5) man page).
1508 .I 198,raw48,Total_Offl_Uncorrectabl.
1509 Also means that Attribute number 198 (Offline Uncorrectable Sector Count)
1510 is not reset if uncorrectable sectors are reallocated
1511 (see \fBsmartd.conf\fP(5) man page).
1513 .I 198,offlinescanuncsectorct
1515 .I 198,raw48,Offline_Scan_UNC_SectCt.
1517 .I 200,writeerrorcount
1519 .I 200,raw48,Write_Error_Count.
1521 .I 201,detectedtacount
1523 .I 201,raw48,Detected_TA_Count.
1527 .I 220,tempminmax,Temperature_Celsius.
1529 Note: a table of hard drive models, listing which Attribute
1530 corresponds to temperature, can be found at:
1531 \fBhttp://www.guzu.net/linux/hddtemp.db\fP
1533 .B \-F TYPE, \-\-firmwarebug=TYPE
1534 [ATA only] Modifies the behavior of \fBsmartctl\fP to compensate for some
1535 known and understood device firmware or driver bug. This option may be used
1536 multiple times. The valid arguments are:
1539 \- Assume that the device firmware obeys the ATA specifications. This
1540 is the default, unless the device has presets for \'\-F\' in the
1541 drive database. Using this option on the command line will over-ride any
1545 \- Suppresses read attempts of SMART or GP Log Directory.
1546 Support for all standard logs is assumed without an actual check.
1547 Some Intel SSDs may freeze if log address 0 is read.
1550 \- In some Samsung disks (example: model SV4012H Firmware Version:
1551 RM100-08) some of the two- and four-byte quantities in the SMART data
1552 structures are byte-swapped (relative to the ATA specification).
1553 Enabling this option tells \fBsmartctl\fP to evaluate these quantities
1554 in byte-reversed order. Some signs that your disk needs this option
1555 are (1) no self-test log printed, even though you have run self-tests;
1556 (2) very large numbers of ATA errors reported in the ATA error log;
1557 (3) strange and impossible values for the ATA error log timestamps.
1560 \- In some Samsung disks the number of ATA errors reported is byte swapped.
1561 Enabling this option tells \fBsmartctl\fP to evaluate this quantity in
1562 byte-reversed order. An indication that your Samsung disk needs this
1563 option is that the self-test log is printed correctly, but there are a
1564 very large number of errors in the SMART error log. This is because
1565 the error count is byte swapped. Thus a disk with five errors
1566 (0x0005) will appear to have 20480 errors (0x5000).
1569 \- Some Samsung disks (at least SP2514N with Firmware VF100-37) report
1570 a self-test still in progress with 0% remaining when the test was already
1571 completed. Enabling this option modifies the output of the self-test
1572 execution status (see options \'\-c\' or \'\-a\' above) accordingly.
1575 \- Fixes LBA byte ordering in Extended Comprehensive SMART error log.
1576 Some disk use little endian byte ordering instead of ATA register
1577 ordering to specifiy the LBA addresses in the log entries.
1580 \- Fixes byte swapped ATA identify strings (device name, serial number,
1581 firmware version) returned by some buggy device drivers.
1583 .B \-P TYPE, \-\-presets=TYPE
1584 [ATA only] Specifies whether \fBsmartctl\fP should use any preset options
1585 that are available for this drive. By default, if the drive is recognized
1586 in the \fBsmartmontools\fP database, then the presets are used.
1588 \fBsmartctl\fP can automatically set appropriate options for known
1589 drives. For example, the Maxtor 4D080H4 uses Attribute 9 to stores
1590 power-on time in minutes whereas most drives use that Attribute to
1591 store the power-on time in hours. The command-line option \'\-v
1592 9,minutes\' ensures that \fBsmartctl\fP correctly interprets Attribute
1593 9 in this case, but that option is preset for the Maxtor 4D080H4 and
1594 so need not be specified by the user on the \fBsmartctl\fP command
1599 will show any preset options for your drive and the argument
1601 will show all known drives in the \fBsmartmontools\fP database, along
1602 with their preset options. If there are no presets for your drive and
1603 you think there should be (for example, a \-v or \-F option is needed
1604 to get \fBsmartctl\fP to display correct values) then please contact
1605 the \fBsmartmontools\fP developers so that this information can be
1606 added to the \fBsmartmontools\fP database. Contact information is at the
1607 end of this man page.
1609 The valid arguments to this option are:
1612 \- if a drive is recognized, then use the stored presets for it. This
1613 is the default. Note that presets will NOT override additional
1614 Attribute interpretation (\'\-v N,something\') command-line options or
1615 explicit \'\-F\' command-line options..
1618 \- do not use presets.
1621 \- show if the drive is recognized in the database, and if so, its
1625 \- list all recognized drives, and the presets that are set for them,
1626 then exit. This also checks the drive database regular expressions
1627 and settings for syntax errors.
1629 The \'\-P showall\' option takes up to two optional arguments to
1630 match a specific drive type and firmware version. The command:
1632 smartctl \-P showall
1634 lists all entries, the command:
1636 smartctl \-P showall \'MODEL\'
1638 lists all entries matching MODEL, and the command:
1640 smartctl \-P showall \'MODEL\' \'FIRMWARE\'
1642 lists all entries for this MODEL and a specific FIRMWARE version.
1644 .B \-B [+]FILE, \-\-drivedb=[+]FILE
1645 [ATA only] Read the drive database from FILE. The new database replaces
1646 the built in database by default. If \'+\' is specified, then the new
1647 entries prepend the built in entries.
1649 Optional entries are read from the file
1650 .\" %IF NOT OS Windows
1651 \fB/usr/local/etc/smart_drivedb.h\fP
1652 .\" %ENDIF NOT OS Windows
1654 (Windows: \fBEXEDIR/drivedb-add.h\fP)
1657 .\"! \fBEXEDIR/drivedb-add.h\fP.
1658 .\" %ENDIF OS Windows
1659 .\" %IF ENABLE_DRIVEDB
1660 if this option is not specified.
1663 .\" %IF NOT OS Windows
1664 \fB/usr/local/share/smartmontools/drivedb.h\fP
1665 .\" %ENDIF NOT OS Windows
1667 (Windows: \fBEXEDIR/drivedb.h\fP)
1670 .\"! \fBEXEDIR/drivedb.h\fP
1671 .\" %ENDIF OS Windows
1672 is present, the contents of this file is used instead of the built in table.
1675 .\" %IF NOT OS Windows
1676 \fB/usr/local/sbin/update-smart-drivedb\fP
1677 .\" %ENDIF NOT OS Windows
1679 (Windows: \fBEXEDIR/update-smart-drivedb.exe\fP)
1682 .\"! \fBEXEDIR/update-smart-drivedb.exe\fP
1683 .\" %ENDIF OS Windows
1684 to update this file from the smartmontools SVN repository.
1685 .\" %ENDIF ENABLE_DRIVEDB
1687 The database files use the same C/C++ syntax that is used to initialize
1688 the built in database array. C/C++ style comments are allowed.
1694 "Model family", // Info about model family/series.
1695 "MODEL1.*REGEX", // Regular expression to match model of device.
1696 "VERSION.*REGEX", // Regular expression to match firmware version(s).
1697 "Some warning", // Warning message.
1698 "\-v 9,minutes" // String of preset \-v and \-F options.
1700 /* Minimal entry: */
1702 "", // No model family/series info.
1703 "MODEL2.*REGEX", // Regular expression to match model of device.
1704 "", // All firmware versions.
1706 "" // No options preset.
1710 "USB: Device; Bridge", // Info about USB device and bridge name.
1711 "0x1234:0xabcd", // Regular expression to match vendor:product ID.
1712 "0x0101", // Regular expression to match bcdDevice.
1714 "\-d sat" // String with device type option.
1720 .B SMART RUN/ABORT OFFLINE TEST AND self-test OPTIONS:
1722 .B \-t TEST, \-\-test=TEST
1723 Executes TEST immediately. The \'\-C\' option can be used in
1724 conjunction with this option to run the short or long (and also for
1725 ATA devices, selective or conveyance) self-tests in captive mode
1726 (known as "foreground mode" for SCSI devices). Note that only one
1727 test type can be run at a time, so only one test type should be
1728 specified per command line. Note also that if a computer is shutdown
1729 or power cycled during a self-test, no harm should result. The
1730 self-test will either be aborted or will resume automatically.
1732 All \'\-t TEST\' commands can be given during normal system operation
1733 unless captive mode (\'\-C\' option) is used.
1734 A running self-test can, however, degrade performance of the drive.
1735 Frequent I/O requests from the operating system increase the duration
1736 of a test. These impacts may vary from device to device.
1738 If a test failure occurs then the device may discontinue the testing
1739 and report the result immediately.
1741 The valid arguments to this option are:
1744 \- [ATA] runs SMART Immediate Offline Test. This immediately
1745 starts the test described above. This command can be given during
1746 normal system operation. The effects of this test are visible only in
1747 that it updates the SMART Attribute values, and if errors are
1748 found they will appear in the SMART error log, visible with the \'\-l error\'
1751 If the \'\-c\' option to \fBsmartctl\fP shows that the device has the
1752 "Suspend Offline collection upon new command" capability then you can
1753 track the progress of the Immediate Offline test using the \'\-c\'
1754 option to \fBsmartctl\fP. If the \'\-c\' option show that the device
1755 has the "Abort Offline collection upon new command" capability then
1756 most commands will abort the Immediate Offline Test, so you should not
1757 try to track the progress of the test with \'\-c\', as it will abort
1761 \- [SCSI] runs the default self test in foreground. No entry is placed
1762 in the self test log.
1765 \- [ATA] runs SMART Short Self Test (usually under ten minutes).
1766 This command can be given during normal system operation (unless run in
1767 captive mode \- see the \'\-C\' option below). This is a
1768 test in a different category than the immediate or automatic offline
1769 tests. The "Self" tests check the electrical and mechanical
1770 performance as well as the read performance of the disk. Their
1771 results are reported in the Self Test Error Log, readable with
1772 the \'\-l selftest\' option. Note that on some disks the progress of the
1773 self-test can be monitored by watching this log during the self-test; with other disks
1774 use the \'\-c\' option to monitor progress.
1777 \- [SCSI] runs the "Background short" self-test.
1780 \- [ATA] runs SMART Extended Self Test (tens of minutes). This is a
1781 longer and more thorough version of the Short Self Test described
1782 above. Note that this command can be given during normal
1783 system operation (unless run in captive mode \- see the \'\-C\' option below).
1786 \- [SCSI] runs the "Background long" self-test.
1789 \- [ATA only] runs a SMART Conveyance Self Test (minutes). This
1790 self-test routine is intended to identify damage incurred during
1791 transporting of the device. This self-test routine should take on the
1792 order of minutes to complete. Note that this command can be given
1793 during normal system operation (unless run in captive mode \- see the
1794 \'\-C\' option below).
1796 .I select,N\-M, select,N+SIZE
1797 \- [ATA only] runs a SMART Selective Self Test, to test a \fBrange\fP
1798 of disk Logical Block Addresses (LBAs), rather than the entire disk.
1799 Each range of LBAs that is checked is called a "span" and is specified
1800 by a starting LBA (N) and an ending LBA (M) with N less than or equal
1801 to M. The range can also be specified as N+SIZE. A span at the end of
1802 a disk can be specified by N\-\fBmax\fP.
1804 For example the commands:
1806 smartctl \-t select,10\-20 /dev/hda
1807 smartctl \-t select,10+11 /dev/hda
1809 both runs a self test on one span consisting of LBAs ten to twenty
1810 (inclusive). The command:
1812 smartctl \-t select,100000000\-max /dev/hda
1814 run a self test from LBA 100000000 up to the end of the disk.
1815 The \'\-t\' option can be given up to five times, to test
1816 up to five spans. For example the command:
1818 smartctl \-t select,0\-100 \-t select,1000\-2000 /dev/hda
1820 runs a self test on two spans. The first span consists of 101 LBAs
1821 and the second span consists of 1001 LBAs. Note that the spans can
1822 overlap partially or completely, for example:
1824 smartctl \-t select,0\-10 \-t select,5\-15 \-t select,10\-20 /dev/hda
1826 The results of the selective self-test can be obtained (both during
1827 and after the test) by printing the SMART self-test log, using the
1828 \'\-l selftest\' option to smartctl.
1830 Selective self tests are particularly useful as disk capacities
1831 increase: an extended self test (smartctl \-t long) can take several
1832 hours. Selective self-tests are helpful if (based on SYSLOG error
1833 messages, previous failed self-tests, or SMART error log entries) you
1834 suspect that a disk is having problems at a particular range of
1835 Logical Block Addresses (LBAs).
1837 Selective self-tests can be run during normal system operation (unless
1838 done in captive mode \- see the \'\-C\' option below).
1840 The following variants of the selective self-test command use spans based
1841 on the ranges from past tests already stored on the disk:
1843 .I select,redo[+SIZE]
1844 \- [ATA only] redo the last SMART Selective Self Test using the same LBA
1845 range. The starting LBA is identical to the LBA used by last test, same
1846 for ending LBA unless a new span size is specified by optional +SIZE
1849 For example the commands:
1851 smartctl \-t select,10\-20 /dev/hda
1852 smartctl \-t select,redo /dev/hda
1853 smartctl \-t select,redo+20 /dev/hda
1855 have the same effect as:
1857 smartctl \-t select,10\-20 /dev/hda
1858 smartctl \-t select,10\-20 /dev/hda
1859 smartctl \-t select,10\-29 /dev/hda
1862 .I select,next[+SIZE]
1863 \- [ATA only] runs a SMART Selective Self Test on the LBA range which
1864 follows the range of the last test. The starting LBA is set to (ending
1865 LBA +1) of the last test. A new span size may be specified by the
1866 optional +SIZE argument.
1868 For example the commands:
1870 smartctl \-t select,0\-999 /dev/hda
1871 smartctl \-t select,next /dev/hda
1872 smartctl \-t select,next+2000 /dev/hda
1874 have the same effect as:
1876 smartctl \-t select,0\-999 /dev/hda
1877 smartctl \-t select,1000\-1999 /dev/hda
1878 smartctl \-t select,2000\-3999 /dev/hda
1881 If the last test ended at the last LBA of the disk, the new range starts
1882 at LBA 0. The span size of the last span of a disk is adjusted such that
1883 the total number of spans to check the full disk will not be changed
1884 by future uses of \'\-t select,next\'.
1886 .I select,cont[+SIZE]
1887 \- [ATA only] performs a \'redo\' (above) if the self test status reports
1888 that the last test was aborted by the host. Otherwise it run the \'next\'
1892 \- [ATA only] perform an offline read scan after a Selective self-test
1893 has completed. This option must be used together with one or more of
1894 the \fIselect,N\-M\fP options above. If the LBAs that have been
1895 specified in the Selective self-test pass the test with no errors
1896 found, then read scan the \fBremainder\fP of the disk. If the device
1897 is powered-cycled while this read scan is in progress, the read scan
1898 will be automatically resumed after a time specified by the pending
1899 timer (see below). The value of this option is preserved between
1900 selective self-tests.
1903 \- [ATA only] do not read scan the remainder of the disk after a
1904 Selective self-test has completed. This option must be use together
1905 with one or more of the \fIselect,N\-M\fP options above. The value of this
1906 option is preserved between selective self-tests.
1909 \- [ATA only] set the pending offline read scan timer to N minutes.
1910 Here N is an integer in the range from 0 to 65535 inclusive. If the
1911 device is powered off during a read scan after a Selective self-test,
1912 then resume the test automatically N minutes after power-up. This
1913 option must be use together with one or more of the \fIselect,N\-M\fP
1914 options above. The value of this option is preserved between selective
1918 \- [ATA only] issues the ATA command SMART EXECUTE OFF-LINE IMMEDIATE
1919 with subcommand N in LBA LOW register. The subcommand is specified as
1920 a hex value in the range 0x00 to 0xff. Subcommands 0x40-0x7e and
1921 0x90-0xff are reserved for vendor specific use, see table 61 of
1922 T13/1699-D Revision 6a (ATA8-ACS). Note that the subcommands
1923 0x00-0x04,0x7f,0x81-0x84 are supported by other smartctl options
1924 (e.g. 0x01: \'\-t short\', 0x7f: \'\-X\', 0x82: \'\-C \-t long\').
1926 \fBWARNING: Only run subcommands documented by the vendor of the
1929 Example for Intel (X18/X25-M G2, 320, 520 and 710 Series) SSDs only:
1930 The subcommand 0x40 (\'\-t vendor,0x40\') clears the timed workload
1931 related SMART attributes (226, 227, 228). Note that the raw values of
1932 these attributes are held at 65535 (0xffff) until the workload timer
1936 \- start new self-test even if another test is already running.
1937 By default a running self-test will not be interrupted to begin another
1941 [ATA] Runs self-tests in captive mode. This has no effect with \'\-t
1942 offline\' or if the \'\-t\' option is not used.
1944 \fBWARNING: Tests run in captive mode may busy out the drive for the
1945 length of the test. Only run captive tests on drives without any
1946 mounted partitions!\fP
1948 [SCSI] Runs the self-test in "Foreground" mode.
1951 Aborts non-captive SMART Self Tests. Note that this
1952 command will abort the Offline Immediate Test routine only if your
1953 disk has the "Abort Offline collection upon new command" capability.
1955 .SH ATA, SCSI command sets and SAT
1956 In the past there has been a clear distinction between storage devices
1957 that used the ATA and SCSI command sets. This distinction was often
1958 reflected in their device naming and hardware. Now various SCSI
1959 transports (e.g. SAS, FC and iSCSI) can interconnect to both SCSI
1960 disks (e.g. FC and SAS) and ATA disks (especially SATA). USB and
1961 IEEE 1394 storage devices use the SCSI command set externally but
1962 almost always contain ATA or SATA disks (or flash). The storage
1963 subsystems in some operating systems have started to remove the
1964 distinction between ATA and SCSI in their device naming policies.
1966 99% of operations that an OS performs on a disk involve the SCSI INQUIRY,
1967 READ CAPACITY, READ and WRITE commands, or their ATA equivalents. Since
1968 the SCSI commands are slightly more general than their ATA equivalents,
1969 many OSes are generating SCSI commands (mainly READ and WRITE) and
1970 letting a lower level translate them to their ATA equivalents as the
1971 need arises. An important note here is that "lower level" may be in
1972 external equipment and hence outside the control of an OS.
1974 SCSI to ATA Translation (SAT) is a standard (ANSI INCITS 431-2007) that
1975 specifies how this translation is done. For the other 1% of operations
1976 that an OS performs on a disk, SAT provides two options. First is an
1977 optional ATA PASS-THROUGH SCSI command (there are two variants). The
1978 second is a translation from the closest SCSI command. Most current
1979 interest is in the "pass-through" option.
1981 The relevance to smartmontools (and hence smartctl) is that its
1982 interactions with disks fall solidly into the "1%" category. So even
1983 if the OS can happily treat (and name) a disk as "SCSI", smartmontools
1984 needs to detect the native command set and act accordingly.
1985 As more storage manufacturers (including external SATA drives) comply
1986 with SAT, smartmontools is able to automatically distinguish the native
1987 command set of the device. In some cases the '\-d sat' option is needed
1988 on the command line.
1990 There are also virtual disks which typically have no useful information
1991 to convey to smartmontools, but could conceivably in the future. An
1992 example of a virtual disk is the OS's view of a RAID 1 box. There are
1993 most likely two SATA disks inside a RAID 1 box. Addressing those SATA
1994 disks from a distant OS is a challenge for smartmontools. Another
1995 approach is running a tool like smartmontools inside the RAID 1 box (e.g.
1996 a Network Attached Storage (NAS) box) and fetching the logs via a
2001 .B smartctl \-a /dev/hda
2003 Print a large amount of SMART information for drive /dev/hda which is
2004 typically an ATA (IDE) or SATA disk in Linux.
2007 .B smartctl \-a /dev/sdb
2009 Print a large amount of SMART information for drive /dev/sdb . This may
2010 be a SCSI disk or an ATA (SATA) disk.
2013 .B smartctl \-s off /dev/hdd
2015 Disable SMART monitoring and data log collection on drive /dev/hdd .
2018 .B smartctl \-\-smart=on \-\-offlineauto=on \-\-saveauto=on /dev/hda
2020 Enable SMART on drive /dev/hda, enable automatic offline
2021 testing every four hours, and enable autosaving of
2022 SMART Attributes. This is a good start-up line for your system\'s
2023 init files. You can issue this command on a running system.
2026 .B smartctl \-t long /dev/hdc
2028 Begin an extended self-test of drive /dev/hdc. You can issue this
2029 command on a running system. The results can be seen in the self-test
2030 log visible with the \'\-l selftest\' option after it has completed.
2033 .B smartctl \-s on \-t offline /dev/hda
2035 Enable SMART on the disk, and begin an immediate offline test of
2036 drive /dev/hda. You can issue this command on a running system. The
2037 results are only used to update the SMART Attributes, visible
2038 with the \'\-A\' option. If any device errors occur, they are logged to
2039 the SMART error log, which can be seen with the \'\-l error\' option.
2042 .B smartctl \-A \-v 9,minutes /dev/hda
2044 Shows the vendor Attributes, when the disk stores its power-on time
2045 internally in minutes rather than hours.
2048 .B smartctl \-q errorsonly \-H \-l selftest /dev/hda
2050 Produces output only if the device returns failing SMART status,
2051 or if some of the logged self-tests ended with errors.
2054 .B smartctl \-q silent \-a /dev/hda
2056 Examine all SMART data for device /dev/hda, but produce no
2057 printed output. You must use the exit status (the
2059 shell variable) to learn if any Attributes are out of bound, if the
2060 SMART status is failing, if there are errors recorded in the
2061 self-test log, or if there are errors recorded in the disk error log.
2064 .B smartctl \-a \-d 3ware,0 /dev/sda
2066 Examine all SMART data for the first ATA disk connected to a 3ware
2067 RAID controller card.
2070 .B smartctl \-a \-d 3ware,0 /dev/twe0
2072 Examine all SMART data for the first ATA disk connected to a 3ware
2073 RAID 6000/7000/8000 controller card.
2076 .B smartctl \-a \-d 3ware,0 /dev/twa0
2078 Examine all SMART data for the first ATA disk connected to a
2079 3ware RAID 9000 controller card.
2082 .B smartctl \-a \-d 3ware,0 /dev/twl0
2084 Examine all SMART data for the first SATA (not SAS) disk connected to a
2085 3ware RAID 9750 controller card.
2088 .B smartctl \-t short \-d 3ware,3 /dev/sdb
2090 Start a short self-test on the fourth ATA disk connected to the 3ware RAID
2091 controller card which is the second SCSI device /dev/sdb.
2094 .B smartctl \-t long \-d areca,4 /dev/sg2
2096 Start a long self-test on the fourth SATA disk connected to an Areca RAID
2097 controller addressed by /dev/sg2.
2100 .B smartctl \-a \-d hpt,1/3 /dev/sda (under Linux)
2101 .B smartctl \-a \-d hpt,1/3 /dev/hptrr (under FreeBSD)
2103 Examine all SMART data for the (S)ATA disk directly connected to the third channel of the
2104 first HighPoint RocketRAID controller card.
2108 .B smartctl \-t short \-d hpt,1/1/2 /dev/sda (under Linux)
2109 .B smartctl \-t short \-d hpt,1/1/2 /dev/hptrr (under FreeBSD)
2111 Start a short self-test on the (S)ATA disk connected to second pmport on the
2112 first channel of the first HighPoint RocketRAID controller card.
2115 .B smartctl \-t select,10\-100 \-t select,30\-300 \-t afterselect,on \-t pending,45 /dev/hda
2117 Run a selective self-test on LBAs 10 to 100 and 30 to 300. After the
2118 these LBAs have been tested, read-scan the remainder of the disk. If the disk is
2119 power-cycled during the read-scan, resume the scan 45 minutes after power to the
2123 .B smartctl \-a \-d cciss,0 /dev/cciss/c0d0
2125 Examine all SMART data for the first SCSI disk connected to a cciss
2126 RAID controller card.
2129 The return values of \fBsmartctl\fP are defined by a bitmask. If all
2130 is well with the disk, the return value (exit status) of
2131 \fBsmartctl\fP is 0 (all bits turned off). If a problem occurs, or an
2132 error, potential error, or fault is detected, then a non-zero status
2133 is returned. In this case, the eight different bits in the return
2134 value have the following meanings for ATA disks; some of these values
2135 may also be returned for SCSI disks.
2138 Command line did not parse.
2141 Device open failed, device did not return an IDENTIFY DEVICE structure,
2142 or device is in a low-power mode (see \'\-n\' option above).
2145 Some SMART or other ATA command to the disk failed, or there was a checksum
2146 error in a SMART data structure (see \'\-b\' option above).
2149 SMART status check returned "DISK FAILING".
2152 We found prefail Attributes <= threshold.
2155 SMART status check returned "DISK OK" but we found that some (usage
2156 or prefail) Attributes have been <= threshold at some time in the
2160 The device error log contains records of errors.
2163 The device self-test log contains records of errors.
2164 [ATA only] Failed self-tests outdated by a newer successful extended
2165 self-test are ignored.
2167 To test within the shell for whether or not the different bits are
2168 turned on or off, you can use the following type of construction (this
2171 .B smartstat=$(($? & 8))
2173 This looks at only at bit 3 of the exit status
2175 (since 8=2^3). The shell variable
2176 $smartstat will be nonzero if SMART status check returned "disk
2177 failing" and zero otherwise.
2179 This bash script prints all status bits:
2182 for ((i=0; i<8; i++)); do
2183 echo "Bit $i: $((status & 2**i && 1))"
2189 The TapeAlert log page flags are cleared for the initiator when the
2190 page is read. This means that each alert condition is reported only
2191 once by \fBsmartctl\fP for each initiator for each activation of the
2198 University of Wisconsin \- Milwaukee Physics Department
2200 \fBChristian Franke\fP (Windows interface, C++ redesign, most enhancements
2203 \fBsmartmontools\-support@lists.sourceforge.net\fP
2207 The following have made large contributions to smartmontools:
2209 \fBCasper Dik\fP (Solaris SCSI interface)
2210 \fBDouglas Gilbert\fP (SCSI subsystem)
2211 \fBGuido Guenther\fP (Autoconf/Automake packaging)
2212 \fBGeoffrey Keating\fP (Darwin ATA interface)
2213 \fBEduard Martinescu\fP (FreeBSD interface)
2214 \fBFr\['e]d\['e]ric L. W. Meunier\fP (Web site and Mailing list)
2215 \fBGabriele Pohl\fP (Web site and Wiki, conversion from CVS to SVN)
2216 \fBKeiji Sawada\fP (Solaris ATA interface)
2217 \fBManfred Schwarb\fP (Drive database)
2218 \fBSergey Svishchev\fP (NetBSD interface)
2219 \fBDavid Snyder and Sergey Svishchev\fP (OpenBSD interface)
2220 \fBPhil Williams\fP (User interface and drive database)
2221 \fBYuri Dario\fP (OS/2, eComStation interface)
2222 \fBShengfeng Zhou\fP (Linux/FreeBSD HighPoint RocketRAID interface)
2224 Many other individuals have made smaller contributions and corrections.
2229 This code was derived from the smartsuite package, written by Michael
2230 Cornwell, and from the previous UCSC smartsuite package. It extends
2231 these to cover ATA-5 disks. This code was originally developed as a
2232 Senior Thesis by Michael Cornwell at the Concurrent Systems Laboratory
2233 (now part of the Storage Systems Research Center), Jack Baskin School
2234 of Engineering, University of California, Santa
2235 Cruz. \fBhttp://ssrc.soe.ucsc.edu/\fP .
2237 HOME PAGE FOR SMARTMONTOOLS:
2239 Please see the following web site for updates, further documentation, bug
2240 reports and patches: \fBhttp://smartmontools.sourceforge.net/\fP
2244 \fBsmartd\fP(8), \fBbadblocks\fP(8), \fBide\-smart\fP(8).
2246 REFERENCES FOR SMART
2248 An introductory article about smartmontools is \fIMonitoring Hard
2249 Disks with SMART\fP, by Bruce Allen, Linux Journal, January 2004,
2250 pages 74-77. This is \fBhttp://www.linuxjournal.com/article/6983\fP
2253 If you would like to understand better how SMART works, and what it
2254 does, a good place to start is with Sections 4.8 and 6.54 of the first
2255 volume of the \'AT Attachment with Packet Interface-7\' (ATA/ATAPI-7)
2256 specification Revision 4b. This documents the SMART functionality which the
2257 \fBsmartmontools\fP utilities provide access to.
2260 The functioning of SMART was originally defined by the SFF-8035i
2261 revision 2 and the SFF-8055i revision 1.4 specifications. These are
2262 publications of the Small Form Factors (SFF) Committee.
2264 Links to these and other documents may be found on the Links page of the
2265 \fBsmartmontools\fP Wiki at
2266 \fBhttp://sourceforge.net/apps/trac/smartmontools/wiki/Links\fP .
2269 SVN ID OF THIS PAGE:
2270 $Id: smartctl.8.in 3832 2013-07-20 14:49:31Z chrfranke $