]> git.proxmox.com Git - mirror_smartmontools-debian.git/blame - smartctl.8.in
Closes #831504
[mirror_smartmontools-debian.git] / smartctl.8.in
CommitLineData
832b75ed 1.ig
a86ec89e
GI
2Copyright (C) 2002-10 Bruce Allen
3Copyright (C) 2004-16 Christian Franke
ee38a438 4
a86ec89e 5$Id: smartctl.8.in 4311 2016-04-27 21:03:01Z chrfranke $
ee38a438
GI
6
7This program is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2, or (at your option)
10any later version.
11
12You should have received a copy of the GNU General Public License
13(for example COPYING); If not, see <http://www.gnu.org/licenses/>.
14
15This code was originally developed as a Senior Thesis by Michael Cornwell
16at the Concurrent Systems Laboratory (now part of the Storage Systems
17Research Center), Jack Baskin School of Engineering, University of
18California, Santa Cruz. http://ssrc.soe.ucsc.edu/
832b75ed
GG
19
20..
a86ec89e 21.TH SMARTCTL 8 "CURRENT_SVN_DATE" "CURRENT_SVN_VERSION" "SMART Monitoring Tools"
832b75ed
GG
22.SH NAME
23\fBsmartctl\fP \- Control and Monitor Utility for SMART Disks
24
25.SH SYNOPSIS
26.B smartctl [options] device
27
832b75ed 28.SH DESCRIPTION
d008864d
GI
29.\" %IF NOT OS ALL
30.\"! [This man page is generated for the OS_MAN_FILTER version of smartmontools.
31.\"! It does not contain info specific to other platforms.]
32.\"! .PP
33.\" %ENDIF NOT OS ALL
ee38a438
GI
34\fBsmartctl\fP controls the Self-Monitoring, Analysis and
35Reporting Technology (SMART) system built into most ATA/SATA and SCSI/SAS
36hard drives and solid-state drives.
37The purpose of SMART is to monitor the reliability of the hard drive
38and predict drive failures, and to carry out different types of drive
39self-tests.
40\fBsmartctl\fP also supports some features not related to SMART.
41This version of \fBsmartctl\fP is compatible with
d2e702cf 42ACS-3, ACS-2, ATA8-ACS, ATA/ATAPI-7 and earlier standards
ee38a438 43(see \fBREFERENCES\fP below).
832b75ed
GG
44
45\fBsmartctl\fP also provides support for polling TapeAlert messages
46from SCSI tape drives and changers.
47
48The user must specify the device to be controlled or interrogated as
2127e193
GI
49the final argument to \fBsmartctl\fP. The command set used by the device
50is often derived from the device path but may need help with the \'\-d\'
51option (for more information see the section on "ATA, SCSI command sets
52and SAT" below). Device paths are as follows:
d008864d 53.\" %IF OS Linux
832b75ed 54.IP \fBLINUX\fP: 9
a86ec89e
GI
55Use the forms \fB"/dev/sd[a\-z]"\fP for ATA/SATA and SCSI/SAS devices.
56For SCSI Tape Drives and Changers with TapeAlert support use the
57devices \fB"/dev/nst*"\fP and \fB"/dev/sg*"\fP. For disks behind
2127e193 583ware controllers you may need \fB"/dev/sd[a\-z]"\fP or
cfbba5b9 59\fB"/dev/twe[0\-9]"\fP, \fB"/dev/twa[0\-9]"\fP or \fB"/dev/twl[0\-9]"\fP: see details
2127e193
GI
60below. For disks behind HighPoint RocketRAID controllers you may need
61\fB"/dev/sd[a\-z]"\fP. For disks behind Areca SATA RAID controllers,
62you need \fB"/dev/sg[2\-9]"\fP (note that smartmontools interacts with
63the Areca controllers via a SCSI generic device which is different
ee38a438
GI
64than the SCSI device used for reading and writing data)! For HP Smart
65Array RAID controllers, there are three currently supported drivers: cciss,
66hpsa, and hpahcisr. For disks accessed via the cciss driver the device nodes
67are of the form \fB"/dev/cciss/c[0\-9]d0"\fP. For disks accessed via
68the hpahcisr and hpsa drivers, the device nodes you need are \fB"/dev/sg[0\-9]*"\fP.
69("lsscsi \-g" is helpful in determining which scsi generic device node corresponds
70to which device.) Use the nodes corresponding to the RAID controllers,
71not the nodes corresponding to logical drives. See the \fB\-d\fP option below, as well.
a86ec89e
GI
72Use the forms \fB"/dev/nvme[0\-9]"\fP (broadcast namespace) or
73\fB"/dev/nvme[0\-9]n[1\-9]"\fP (specific namespace 1\-9) for NVMe devices.
d008864d
GI
74.\" %ENDIF OS Linux
75.\" %IF OS Darwin
832b75ed
GG
76.IP \fBDARWIN\fP: 9
77Use the forms \fB/dev/disk[0\-9]\fP or equivalently \fBdisk[0\-9]\fP or equivalently
78\fB/dev/rdisk[0\-9]\fP. Long forms are also available: please use \'\-h\' to see some
79examples. Note that there is currently no Darwin SCSI support.
f4e463df
GI
80
81Use the OS X SAT SMART Driver to access SMART data on SAT capable USB and
82Firewire devices (see INSTALL file).
d008864d
GI
83.\" %ENDIF OS Darwin
84.\" %IF OS FreeBSD
832b75ed
GG
85.IP \fBFREEBSD\fP: 9
86Use the forms \fB"/dev/ad[0\-9]+"\fP for IDE/ATA
cfbba5b9 87devices and \fB"/dev/da[0\-9]+"\fP or \fB"/dev/pass[0\-9]+"\fP for SCSI devices.
ee38a438
GI
88For SATA devices on AHCI bus use \fB"/dev/ada[0\-9]+"\fP format. For HP Smart
89Array RAID controllers, use \fB"/dev/ciss[0\-9]"\fP (and see the \fB-d\fP option,
90below).
d008864d
GI
91.\" %ENDIF OS FreeBSD
92.\" %IF OS NetBSD OpenBSD
832b75ed
GG
93.IP \fBNETBSD/OPENBSD\fP: 9
94Use the form \fB"/dev/wd[0\-9]+c"\fP for IDE/ATA
95devices. For SCSI disk and tape devices, use the device names
96\fB"/dev/sd[0\-9]+c"\fP and \fB"/dev/st[0\-9]+c"\fP respectively.
97Be sure to specify the correct "whole disk" partition letter for
98your architecture.
d008864d
GI
99.\" %ENDIF OS NetBSD OpenBSD
100.\" %IF OS Solaris
832b75ed
GG
101.IP \fBSOLARIS\fP: 9
102Use the forms \fB"/dev/rdsk/c?t?d?s?"\fP for IDE/ATA and SCSI disk
103devices, and \fB"/dev/rmt/*"\fP for SCSI tape devices.
d008864d 104.\" %ENDIF OS Solaris
d008864d 105.\" %IF OS Windows Cygwin
ee38a438 106.IP \fBWINDOWS\fP: 9
a37e7145
GG
107Use the forms \fB"/dev/sd[a\-z]"\fP for IDE/(S)ATA and SCSI disks
108"\\\\.\\PhysicalDrive[0\-25]" (where "a" maps to "0").
ee38a438 109Use \fB"/dev/sd[a\-z][a\-z]"\fP for "\\\\.\\PhysicalDrive[26\-...]".
a37e7145
GG
110These disks can also be referred to as \fB"/dev/pd[0\-255]"\fP for
111"\\\\.\\PhysicalDrive[0\-255]".
112ATA disks can also be referred to as \fB"/dev/hd[a\-z]"\fP for
113"\\\\.\\PhysicalDrive[0\-25]".
114Use one the forms \fB"/dev/tape[0\-255]"\fP, \fB"/dev/st[0\-255]"\fP,
115or \fB"/dev/nst[0\-255]"\fP for SCSI tape drives "\\\\.\\Tape[0\-255]".
116
117Alternatively, drive letters \fB"X:"\fP or \fB"X:\\"\fP may be used to
2127e193
GI
118specify the (\'basic\') disk behind a mounted partition. This does
119not work with \'dynamic\' disks.
a37e7145
GG
120
121For disks behind 3ware 9000 controllers use \fB"/dev/sd[a\-z],N"\fP where
4d59bff9 122N specifies the disk number (3ware \'port\') behind the controller
a37e7145 123providing the logical drive (\'unit\') specified by \fB"/dev/sd[a\-z]"\fP.
9ebc753d
GG
124Alternatively, use \fB"/dev/tw_cli/cx/py"\fP for controller x, port y
125to run the \'tw_cli\' tool and parse the output. This provides limited
a37e7145 126monitoring (\'\-i\', \'\-c\', \'\-A\' below) if SMART support is missing
9ebc753d
GG
127in the driver. Use \fB"/dev/tw_cli/stdin"\fP or \fB"/dev/tw_cli/clip"\fP
128to parse CLI or 3DM output from standard input or clipboard.
a37e7145 129The option \'\-d 3ware,N\' is not necessary on Windows.
cfbba5b9 130
f4e463df
GI
131For disks behind an Intel ICHxR controller with RST driver use
132\fB"/dev/csmi[0\-9],N"\fP where N specifies the port behind the logical
133scsi controller "\\\\.\\Scsi[0\-9]:".
134
a86ec89e
GI
135For SATA or SAS disks behind an Areca controller use
136\fB"/dev/arcmsr[0\-9]"\fP, see \'\-d areca,N[/E]\' below.
137
138[NEW EXPERIMENTAL SMARTCTL FEATURE]
139Use the forms \fB"/dev/nvme[0\-9]"\fP (broadcast namespace) or
140\fB"/dev/nvme[0\-9]n[1\-9]"\fP (specific namespace 1\-9) for first,
141second, ..., NVMe device.
142Alternatively use the forms \fB"/dev/nvmes[0\-9][n[1\-9]]"\fP for NVMe devices
143behind the logical scsi controller "\\\\.\\Scsi[0\-9]:".
f4e463df 144
832b75ed 145The prefix \fB"/dev/"\fP is optional.
d008864d 146.\" %ENDIF OS Windows Cygwin
d008864d 147.\" %IF OS OS2
832b75ed
GG
148.IP \fBOS/2,eComStation\fP: 9
149Use the form \fB"/dev/hd[a\-z]"\fP for IDE/ATA devices.
d008864d 150.\" %ENDIF OS OS2
832b75ed 151.PP
a37e7145
GG
152if \'\-\' is specified as the device path, \fBsmartctl\fP reads and
153interprets it's own debug output from standard input.
154See \'\-r ataioctl\' below for details.
155.PP
832b75ed 156Based on the device path, \fBsmartctl\fP will guess the device type
ee38a438 157(ATA or SCSI). If necessary, the \'\-d\' option can be used to override
832b75ed
GG
158this guess
159
160Note that the printed output of \fBsmartctl\fP displays most numerical
161values in base 10 (decimal), but some values are displayed in base 16
4d59bff9 162(hexadecimal). To distinguish them, the base 16 values are always
832b75ed
GG
163displayed with a leading \fB"0x"\fP, for example: "0xff". This man
164page follows the same convention.
165
832b75ed 166.SH OPTIONS
832b75ed
GG
167The options are grouped below into several categories. \fBsmartctl\fP
168will execute the corresponding commands in the order: INFORMATION,
169ENABLE/DISABLE, DISPLAY DATA, RUN/ABORT TESTS.
170
832b75ed
GG
171.TP
172.B SHOW INFORMATION OPTIONS:
173.TP
174.B \-h, \-\-help, \-\-usage
175Prints a usage message to STDOUT and exits.
176.TP
177.B \-V, \-\-version, \-\-copyright, \-\-license
2127e193
GI
178Prints version, copyright, license, home page and SVN revision
179information for your copy of \fBsmartctl\fP to STDOUT and then exits.
180Please include this information if you are reporting bugs or problems.
832b75ed
GG
181.TP
182.B \-i, \-\-info
183Prints the device model number, serial number, firmware version, and
184ATA Standard version/revision information. Says if the device
185supports SMART, and if so, whether SMART support is currently enabled
186or disabled. If the device supports Logical Block Address mode (LBA
187mode) print current user drive capacity in bytes. (If drive is has a
188user protected area reserved, or is "clipped", this may be smaller
189than the potential maximum drive capacity.) Indicates if the drive is
190in the smartmontools database (see \'\-v\' options below). If so, the
4d59bff9
GG
191drive model family may also be printed. If \'\-n\' (see below) is
192specified, the power mode of the drive is printed.
a86ec89e
GI
193.\" %IF OS FreeBSD Linux Windows Cygwin
194
195[NVMe] [FreeBSD, Linux, Windows and Cygwin only]
196[NEW EXPERIMENTAL SMARTCTL FEATURE]
197For NVMe devices the information is obtained from the Identify Controller
198and the Identify Namespace data structure.
199.\" %ENDIF OS FreeBSD Linux Windows Cygwin
832b75ed 200.TP
ee38a438 201.B \-\-identify[=[w][nvb]]
d2e702cf 202[ATA only] Prints an annotated table of the IDENTIFY DEVICE data.
ee38a438
GI
203By default, only valid words (words not equal to 0x0000 or 0xffff)
204and nonzero bits and bit fields are printed.
205This can be changed by the optional argument which consists of one or
206two characters from the set \'wnvb\'.
207The character \'w\' enables printing of all 256 words. The character
208\'n\' suppresses printing of bits, \'v\' enables printing of all bits
209from valid words, \'b\' enables printing of all bits.
210For example \'\-\-identify=n\' (valid words, no bits) produces the
211shortest output and \'\-\-identify=wb\' (all words, all bits) produces
212the longest output.
213.TP
832b75ed
GG
214.B \-a, \-\-all
215Prints all SMART information about the disk, or TapeAlert information
216about the tape drive or changer. For ATA devices this is equivalent
217to
218.nf
a37e7145 219\'\-H \-i \-c \-A \-l error \-l selftest \-l selective\'
832b75ed
GG
220.fi
221and for SCSI, this is equivalent to
222.nf
223\'\-H \-i \-A \-l error \-l selftest\'.
224.fi
a86ec89e
GI
225.\" %IF OS FreeBSD Linux Windows Cygwin
226For NVMe, this is equivalent to
227.nf
228\'\-H \-i \-c \-A \-l error'.
229.fi
230.\" %ENDIF OS FreeBSD Linux Windows Cygwin
2127e193
GI
231Note that for ATA disks this does \fBnot\fP enable the non-SMART options
232and the SMART options which require support for 48-bit ATA commands.
233.TP
234.B \-x, \-\-xall
235Prints all SMART and non-SMART information about the device. For ATA
236devices this is equivalent to
237.nf
d008864d 238\'\-H \-i \-g all \-c \-A \-f brief \-l xerror,error \-l xselftest,selftest
ee38a438 239\-l selective \-l directory \-l scttemp \-l scterc \-l devstat \-l sataphy\'.
2127e193
GI
240.fi
241and for SCSI, this is equivalent to
242.nf
243\'\-H \-i \-A \-l error \-l selftest \-l background \-l sasphy\'.
244.fi
a86ec89e
GI
245.\" %IF OS FreeBSD Linux Windows Cygwin
246For NVMe, this is equivalent to
247.nf
248\'\-H \-i \-c \-A \-l error'.
249.fi
250.\" %ENDIF OS FreeBSD Linux Windows Cygwin
e9583e0c
GI
251.TP
252.B \-\-scan
253Scans for devices and prints each device name, device type and protocol
254([ATA] or [SCSI]) info. May be used in conjunction with \'\-d TYPE\'
255to restrict the scan to a specific TYPE. See also info about platform
256specific device scan and the \fBDEVICESCAN\fP directive on
257\fBsmartd\fP(8) man page.
258.TP
259.B \-\-scan\-open
260Same as \-\-scan, but also tries to open each device before printing
261device info. The device open may change the device type due
262to autodetection (see also \'\-d test\').
832b75ed 263
cfbba5b9
GI
264This option can be used to create a draft \fBsmartd.conf\fP file.
265All options after \'\-\-\' are appended to each output line.
266For example:
267.nf
ee38a438 268smartctl \-\-scan\-open \-\- \-a \-W 4,45,50 \-m admin@work > smartd.conf
cfbba5b9 269.fi
a86ec89e
GI
270
271[NEW EXPERIMENTAL SMARTCTL FEATURE]
272Multiple \'\-d TYPE\' options may be specified with \'\-\-scan[\-open]\'
273to combine the scan results of more than one TYPE.
d008864d
GI
274.TP
275.B \-g NAME, \-\-get=NAME
ee38a438 276Get non-SMART device settings. See \'\-s, \-\-set\' below for further info.
cfbba5b9 277
832b75ed 278.TP
ee38a438 279.B RUN-TIME BEHAVIOR OPTIONS:
832b75ed
GG
280.TP
281.B \-q TYPE, \-\-quietmode=TYPE
282Specifies that \fBsmartctl\fP should run in one of the two quiet modes
283described here. The valid arguments to this option are:
284
285.I errorsonly
286\- only print: For the \'\-l error\' option, if nonzero, the number
ee38a438 287of errors recorded in the SMART error log and the power-on time when
832b75ed 288they occurred; For the \'\-l selftest\' option, errors recorded in the device
ee38a438
GI
289self-test log; For the \'\-H\' option, SMART "disk failing" status or device
290Attributes (pre-failure or usage) which failed either now or in the
291past; For the \'\-A\' option, device Attributes (pre-failure or usage)
832b75ed
GG
292which failed either now or in the past.
293
294.I silent
295\- print no output. The only way to learn about what was found is to
a86ec89e 296use the exit status of \fBsmartctl\fP (see EXIT STATUS below).
a37e7145
GG
297
298.I noserial
299\- Do not print the serial number of the device.
832b75ed
GG
300.TP
301.B \-d TYPE, \-\-device=TYPE
cfbba5b9
GI
302Specifies the type of the device.
303The valid arguments to this option are:
4d59bff9 304
cfbba5b9 305.I auto
ee38a438 306\- attempt to guess the device type from the device name or from
cfbba5b9
GI
307controller type info provided by the operating system or from
308a matching USB ID entry in the drive database.
309This is the default.
310
311.I test
ee38a438 312\- prints the guessed type, then opens the device and prints the
cfbba5b9
GI
313(possibly changed) TYPE name and then exists without performing
314any further commands.
315
316.I ata
317\- the device type is ATA. This prevents
318\fBsmartctl\fP
319from issuing SCSI commands to an ATA device.
320
d008864d 321.\" %IF NOT OS Darwin
cfbba5b9
GI
322.I scsi
323\- the device type is SCSI. This prevents
324\fBsmartctl\fP
325from issuing ATA commands to a SCSI device.
326
a86ec89e
GI
327.\" %ENDIF NOT OS Darwin
328.\" %IF OS FreeBSD Linux Windows Cygwin
329.I nvme[,NSID]
330\- [FreeBSD, Linux, Windows and Cygwin only]
331[NEW EXPERIMENTAL SMARTCTL FEATURE]
332the device type is NVM Express (NVMe).
333The optional parameter NSID specifies the namespace id (in hex) passed
334to the driver.
335Use 0xffffffff for the broadcast namespace id.
336The default for NSID is the namespace id addressed by the device name.
337
338.\" %ENDIF OS FreeBSD Linux Windows Cygwin
339.\" %IF NOT OS Darwin
d008864d 340.I sat[,auto][,N]
cfbba5b9
GI
341\- the device type is SCSI to ATA Translation (SAT).
342This is for ATA disks that have a SCSI to ATA Translation (SAT) Layer
343(SATL) between the disk and the operating system.
4d59bff9 344SAT defines two ATA PASS THROUGH SCSI commands, one 12 bytes long and
cfbba5b9 345the other 16 bytes long. The default is the 16 byte variant which can be
4d59bff9 346overridden with either \'\-d sat,12\' or \'\-d sat,16\'.
832b75ed 347
ee38a438 348If \'\-d sat,auto\' is specified, device type SAT (for ATA/SATA disks) is
d008864d
GI
349only used if the SCSI INQUIRY data reports a SATL (VENDOR: "ATA ").
350Otherwise device type SCSI (for SCSI/SAS disks) is used.
351
cfbba5b9
GI
352.I usbcypress
353\- this device type is for ATA disks that are behind a Cypress USB to PATA
354bridge. This will use the ATACB proprietary scsi pass through command.
355The default SCSI operation code is 0x24, but although it can be overridden
356with \'\-d usbcypress,0xN\', where N is the scsi operation code,
2127e193
GI
357you're running the risk of damage to the device or filesystems on it.
358
ee38a438
GI
359.I usbjmicron[,p][,x][,PORT]
360\- this device type is for SATA disks that are behind a JMicron USB to
cfbba5b9
GI
361PATA/SATA bridge. The 48-bit ATA commands (required e.g. for \'\-l xerror\',
362see below) do not work with all of these bridges and are therefore disabled by
363default. These commands can be enabled by \'\-d usbjmicron,x\'.
364If two disks are connected to a bridge with two ports, an error message is printed
365if no PORT is specified.
366The port can be specified by \'\-d usbjmicron[,x],PORT\' where PORT is 0
367(master) or 1 (slave). This is not necessary if the device uses a port
368multiplier to connect multiple disks to one port. The disks appear under
369separate /dev/ice names then.
370CAUTION: Specifying \',x\' for a device which does not support it results
371in I/O errors and may disconnect the drive. The same applies if the specified
372PORT does not exist or is not connected to a disk.
373
ee38a438
GI
374The Prolific PL2507/3507 USB bridges with older firmware support a pass-through
375command similar to JMicron and work with \'\-d usbjmicron,0\'.
376Newer Prolific firmware requires a modified command which can be selected by
377\'\-d usbjmicron,p\'.
378Note that this does not yet support the SMART status command.
379
a86ec89e
GI
380.I usbprolific
381\- [NEW EXPERIMENTAL SMARTCTL FEATURE]
382this device type is for SATA disks that are behind a Prolific PL2571/2771/2773/2775
383USB to SATA bridge.
384
cfbba5b9
GI
385.I usbsunplus
386\- this device type is for SATA disks that are behind a SunplusIT USB to SATA
387bridge.
388
d008864d
GI
389.\" %ENDIF NOT OS Darwin
390.\" %IF OS Linux
cfbba5b9
GI
391.I marvell
392\- [Linux only] interact with SATA disks behind Marvell chip-set
393controllers (using the Marvell rather than libata driver).
394
395.I megaraid,N
396\- [Linux only] the device consists of one or more SCSI/SAS disks connected
397to a MegaRAID controller. The non-negative integer N (in the range of 0 to
398127 inclusive) denotes which disk on the controller is monitored.
399Use syntax such as:
2127e193
GI
400.nf
401\fBsmartctl \-a \-d megaraid,2 /dev/sda\fP
402.fi
403.nf
404\fBsmartctl \-a \-d megaraid,0 /dev/sdb\fP
405.fi
ee38a438
GI
406.nf
407\fBsmartctl \-a \-d megaraid,0 /dev/bus/0\fP
408.fi
cfbba5b9 409This interface will also work for Dell PERC controllers.
ee38a438
GI
410It is possible to set RAID device name as /dev/bus/N, where N is a SCSI bus
411number.
412
413The following entry in /proc/devices must exist:
d2e702cf 414.br
ee38a438 415For PERC2/3/4 controllers: \fBmegadevN\fP
d2e702cf 416.br
ee38a438 417For PERC5/6 controllers: \fBmegaraid_sas_ioctlN\fP
2127e193 418
a86ec89e
GI
419.\" %ENDIF OS Linux
420.\" %IF OS Linux Windows Cygwin
d2e702cf 421.I aacraid,H,L,ID
a86ec89e 422\- [Linux, Windows and Cygwin only] [NEW EXPERIMENTAL SMARTCTL FEATURE]
d2e702cf
GI
423the device consists of one or more SCSI/SAS disks connected to an AacRaid controller.
424The non-negative integers H,L,ID (Host number, Lun, ID) denote which disk
425on the controller is monitored.
426Use syntax such as:
427.nf
a86ec89e 428\fBsmartctl \-a \-d aacraid,0,0,2 /dev/sda\fP
d2e702cf
GI
429.fi
430.nf
a86ec89e 431\fBsmartctl \-a \-d aacraid,1,0,4 /dev/sdb\fP
d2e702cf 432.fi
d2e702cf 433
a86ec89e
GI
434.\" %ENDIF OS Linux Windows Cygwin
435.\" %IF OS Linux
436On Linux, the following entry in /proc/devices must exist: \fBaac\fP.
d2e702cf
GI
437Character device nodes /dev/aacH (H=Host number) are created if required.
438
d008864d 439.\" %ENDIF OS Linux
a86ec89e
GI
440.\" %IF OS Windows Cygwin
441On Windows, the device name parameter /dev/sdX is ignored if \'-d aacraid\'
442is specified.
443
444.\" %ENDIF OS Windows Cygwin
d008864d 445.\" %IF OS FreeBSD Linux
cfbba5b9
GI
446.I 3ware,N
447\- [FreeBSD and Linux only] the device consists of one or more ATA disks
448connected to a 3ware RAID controller. The non-negative integer N
449(in the range from 0 to 127 inclusive) denotes which disk on the controller
450is monitored.
451Use syntax such as:
832b75ed 452.nf
ee38a438 453\fBsmartctl \-a \-d 3ware,2 /dev/sda\fP [Linux only]
832b75ed
GG
454.fi
455.nf
456\fBsmartctl \-a \-d 3ware,0 /dev/twe0\fP
457.fi
458.nf
459\fBsmartctl \-a \-d 3ware,1 /dev/twa0\fP
460.fi
cfbba5b9 461.nf
ee38a438
GI
462\fBsmartctl \-a \-d 3ware,1 /dev/twl0\fP [Linux only]
463.fi
464.nf
465\fBsmartctl \-a \-d 3ware,1 /dev/tws0\fP [FreeBSD only]
cfbba5b9
GI
466.fi
467The first two forms, which refer to devices /dev/sda\-z and /dev/twe0\-15,
468may be used with 3ware series 6000, 7000, and 8000 series controllers
ee38a438 469that use the 3x-xxxx driver.
cfbba5b9
GI
470\fBNote that the /dev/sda\-z form is deprecated\fP starting with
471the Linux 2.6 kernel series and may not be supported by the Linux
472kernel in the near future. The final form, which refers to devices
a37e7145
GG
473/dev/twa0\-15, must be used with 3ware 9000 series controllers, which
474use the 3w\-9xxx driver.
832b75ed 475
ee38a438 476The devices /dev/twl0\-15 [Linux] or /dev/tws0\-15 [FreeBSD] must be used with the 3ware/LSI 9750 series
cfbba5b9
GI
477controllers which use the 3w-sas driver.
478
ee38a438 479Note that if the special character device nodes /dev/tw[ls]?, /dev/twa?
cfbba5b9 480and /dev/twe? do not exist, or exist with the incorrect major or minor
832b75ed 481numbers, smartctl will recreate them on the fly. Typically /dev/twa0
ee38a438 482refers to the first 9000-series controller, /dev/twa1 refers to the
cfbba5b9
GI
483second 9000 series controller, and so on. The /dev/twl0 devices refers
484to the first 9750 series controller, /dev/twl1 resfers to the second
4859750 series controller, and so on. Likewise /dev/twe0 refers to
ee38a438 486the first 6/7/8000-series controller, /dev/twe1 refers to the second
832b75ed
GG
4876/7/8000 series controller, and so on.
488
489Note that for the 6/7/8000 controllers, \fBany\fP of the physical
490disks can be queried or examined using \fBany\fP of the 3ware's SCSI
491logical device /dev/sd? entries. Thus, if logical device /dev/sda is
492made up of two physical disks (3ware ports zero and one) and logical
493device /dev/sdb is made up of two other physical disks (3ware ports
494two and three) then you can examine the SMART data on \fBany\fP of the
495four physical disks using \fBeither\fP SCSI device /dev/sda \fBor\fP
496/dev/sdb. If you need to know which logical SCSI device a particular
497physical disk (3ware port) is associated with, use the dmesg or SYSLOG
498output to show which SCSI ID corresponds to a particular 3ware unit,
499and then use the 3ware CLI or 3dm tool to determine which ports
500(physical disks) correspond to particular 3ware units.
501
502If the value of N corresponds to a port that does \fBnot\fP exist on
503the 3ware controller, or to a port that does not physically have a
504disk attached to it, the behavior of \fBsmartctl\fP depends upon the
505specific controller model, firmware, Linux kernel and platform. In
506some cases you will get a warning message that the device does not
cfbba5b9 507exist. In other cases you will be presented with \'void\' data for a
ee38a438 508non-existent device.
832b75ed 509
ee38a438 510Note that if the /dev/sd? addressing form is used, then older 3w-xxxx
832b75ed
GG
511drivers do not pass the "Enable Autosave"
512(\'\fB\-S on\fP\') and "Enable Automatic Offline" (\'\fB\-o on\fP\')
513commands to the disk, and produce these types of harmless syslog error
ee38a438 514messages instead: "\fB3w-xxxx: tw_ioctl(): Passthru size (123392) too
cfbba5b9 515big\fP". This can be fixed by upgrading to version 1.02.00.037 or
ee38a438 516later of the 3w-xxxx driver, or by applying a patch to older
cfbba5b9 517versions. Alternatively, use the character device /dev/twe0\-15 interface.
832b75ed 518
ee38a438
GI
519The selective self-test functions (\'\-t select,A\-B\') are only supported
520using the character device interface /dev/twl0\-15, /dev/tws0\-15, /dev/twa0\-15 and /dev/twe0\-15.
832b75ed
GG
521The necessary WRITE LOG commands can not be passed through the SCSI
522interface.
523
d008864d 524.\" %ENDIF OS FreeBSD Linux
f4e463df 525.\" %IF OS FreeBSD Linux Windows Cygwin
cfbba5b9 526.I areca,N
f4e463df
GI
527\- [FreeBSD, Linux, Windows and Cygwin only] the device consists of one or more SATA disks
528connected to an Areca SATA RAID controller. The positive integer N (in the range
529from 1 to 24 inclusive) denotes which disk on the controller is monitored.
530.\" %ENDIF OS FreeBSD Linux Windows Cygwin
d008864d
GI
531.\" %IF OS Linux
532On Linux use syntax such as:
2127e193
GI
533.nf
534\fBsmartctl \-a \-d areca,2 /dev/sg2\fP
535.fi
536.nf
537\fBsmartctl \-a \-d areca,3 /dev/sg3\fP
538.fi
d008864d
GI
539.\" %ENDIF OS Linux
540.\" %IF OS FreeBSD
541On FreeBSD use syntax such as:
542.nf
543\fBsmartctl \-a \-d areca,2 /dev/arcmsr1\fP
544.fi
545.nf
546\fBsmartctl \-a \-d areca,3 /dev/arcmsr2\fP
547.fi
548.\" %ENDIF OS FreeBSD
f4e463df 549.\" %IF OS Windows Cygwin
a86ec89e 550On Windows and Cygwin use syntax such as:
f4e463df
GI
551.nf
552\fBsmartctl \-a \-d areca,2 /dev/arcmsr0\fP
553.fi
554.nf
555\fBsmartctl \-a \-d areca,3 /dev/arcmsr1\fP
556.fi
557.\" %ENDIF OS Windows Cygwin
558.\" %IF OS FreeBSD Linux Windows Cygwin
cfbba5b9
GI
559The first line above addresses the second disk on the first Areca RAID controller.
560The second line addresses the third disk on the second Areca RAID
d008864d 561controller.
f4e463df 562.\" %ENDIF OS FreeBSD Linux Windows Cygwin
d008864d 563.\" %IF OS Linux
f4e463df 564To help identify the correct device on Linux, use the command:
2127e193
GI
565.nf
566\fBcat /proc/scsi/sg/device_hdr /proc/scsi/sg/devices\fP
567.fi
568to show the SCSI generic devices (one per line, starting with
cfbba5b9 569/dev/sg0). The correct SCSI generic devices to address for
2127e193
GI
570smartmontools are the ones with the type field equal to 3. If the
571incorrect device is addressed, please read the warning/error messages
572carefully. They should provide hints about what devices to use.
d008864d 573.\" %ENDIF OS Linux
f4e463df 574.\" %IF OS FreeBSD Linux Windows Cygwin
2127e193
GI
575
576Important: the Areca controller must have firmware version 1.46 or
cfbba5b9 577later. Lower-numbered firmware versions will give (harmless) SCSI
2127e193 578error messages and no SMART information.
4d59bff9 579
f4e463df 580.I areca,N/E
a86ec89e
GI
581\- [FreeBSD, Linux, Windows and Cygwin only] the device consists of one
582or more SATA or SAS disks connected to an Areca SAS RAID controller.
f4e463df
GI
583The integer N (range 1 to 128) denotes the channel (slot) and E (range
5841 to 8) denotes the enclosure.
ee38a438 585Important: This requires Areca SAS controller firmware version 1.51 or later.
f4e463df
GI
586
587.\" %ENDIF OS FreeBSD Linux Windows Cygwin
d008864d 588.\" %IF OS FreeBSD Linux
cfbba5b9 589.I cciss,N
ee38a438 590\- [FreeBSD and Linux only] the device consists of one or more SCSI/SAS or SATA disks
cfbba5b9
GI
591connected to a cciss RAID controller. The non-negative integer N (in the range
592from 0 to 15 inclusive) denotes which disk on the controller is monitored.
593
ee38a438
GI
594To look at disks behind HP Smart Array controllers, use syntax
595such as:
596.\" %ENDIF OS FreeBSD Linux
597.\" %IF OS Linux
598.nf
599\fBsmartctl \-a \-d cciss,0 /dev/cciss/c0d0\fP (cciss driver under Linux)
600.fi
601.nf
602\fBsmartctl \-a \-d cciss,0 /dev/sg2\fP (hpsa or hpahcisr drivers under Linux)
603.fi
604.\" %ENDIF OS Linux
605.\" %IF OS FreeBSD
606.nf
607\fBsmartctl \-a \-d cciss,0 /dev/ciss0\fP (under FreeBSD)
608.fi
609.\" %ENDIF OS FreeBSD
610.\" %IF OS FreeBSD Linux
cfbba5b9
GI
611
612.I hpt,L/M/N
613\- [FreeBSD and Linux only] the device consists of one or more ATA disks
614connected to a HighPoint RocketRAID controller. The integer L is the
615controller id, the integer M is the channel number, and the integer N
616is the PMPort number if it is available. The allowed values of L are
3d17a85c 617from 1 to 4 inclusive, M are from 1 to 128 inclusive and N from 1 to 4
cfbba5b9
GI
618if PMPort available. And also these values are limited by the model
619of the HighPoint RocketRAID controller.
620Use syntax such as:
d008864d
GI
621.\" %ENDIF OS FreeBSD Linux
622.\" %IF OS Linux
4d59bff9 623.nf
2127e193
GI
624\fBsmartctl \-a \-d hpt,1/3 /dev/sda\fP (under Linux)
625.fi
626.nf
627\fBsmartctl \-a \-d hpt,1/2/3 /dev/sda\fP (under Linux)
4d59bff9 628.fi
d008864d
GI
629.\" %ENDIF OS Linux
630.\" %IF OS FreeBSD
4d59bff9 631.nf
2127e193
GI
632\fBsmartctl \-a \-d hpt,1/3 /dev/hptrr\fP (under FreeBSD)
633.fi
634.nf
635\fBsmartctl \-a \-d hpt,1/2/3 /dev/hptrr\fP (under FreeBSD)
4d59bff9 636.fi
d008864d
GI
637.\" %ENDIF OS FreeBSD
638.\" %IF OS FreeBSD Linux
a37e7145 639Note that the /dev/sda\-z form should be the device node which stands for
2127e193
GI
640the disks derived from the HighPoint RocketRAID controllers under Linux and
641under FreeBSD, it is the character device which the driver registered (eg,
cfbba5b9 642/dev/hptrr, /dev/hptmv6).
d008864d 643.\" %ENDIF OS FreeBSD Linux
832b75ed
GG
644.TP
645.B \-T TYPE, \-\-tolerance=TYPE
2127e193
GI
646[ATA only] Specifies how tolerant \fBsmartctl\fP should be of ATA and SMART
647command failures.
832b75ed
GG
648
649The behavior of \fBsmartctl\fP depends upon whether the command is
650"\fBoptional\fP" or "\fBmandatory\fP". Here "\fBmandatory\fP" means
ee38a438 651"required by the ATA Specification if the device implements
832b75ed 652the SMART command set" and "\fBoptional\fP" means "not required by the
ee38a438 653ATA Specification even if the device implements the SMART
832b75ed
GG
654command set." The "\fBmandatory\fP" ATA and SMART commands are: (1)
655ATA IDENTIFY DEVICE, (2) SMART ENABLE/DISABLE ATTRIBUTE AUTOSAVE, (3)
656SMART ENABLE/DISABLE, and (4) SMART RETURN STATUS.
657
658The valid arguments to this option are:
659
660.I normal
661\- exit on failure of any \fBmandatory\fP SMART command, and ignore
662all failures of \fBoptional\fP SMART commands. This is the default.
663Note that on some devices, issuing unimplemented optional SMART
664commands doesn\'t cause an error. This can result in misleading
665\fBsmartctl\fP messages such as "Feature X not implemented", followed
666shortly by "Feature X: enabled". In most such cases, contrary to the
667final message, Feature X is \fBnot\fP enabled.
668
669.I conservative
670\- exit on failure of any \fBoptional\fP SMART command.
671
672.I permissive
673\- ignore failure(s) of \fBmandatory\fP SMART commands. This option
674may be given more than once. Each additional use of this option will
675cause one more additional failure to be ignored. Note that the use of
ee38a438
GI
676this option can lead to messages like "Feature X not supported",
677followed shortly by "Feature X enable failed". In a few
832b75ed
GG
678such cases, contrary to the final message, Feature X \fBis\fP enabled.
679
680.I verypermissive
681\- equivalent to giving a large number of \'\-T permissive\' options:
682ignore failures of \fBany number\fP of \fBmandatory\fP SMART commands.
683Please see the note above.
832b75ed
GG
684.TP
685.B \-b TYPE, \-\-badsum=TYPE
2127e193
GI
686[ATA only] Specifies the action \fBsmartctl\fP should take if a checksum
687error is detected in the: (1) Device Identity Structure, (2) SMART
ee38a438 688Self-Test Log Structure, (3) SMART Attribute Value Structure, (4) SMART
832b75ed
GG
689Attribute Threshold Structure, or (5) ATA Error Log Structure.
690
691The valid arguments to this option are:
692
693.I warn
694\- report the incorrect checksum but carry on in spite of it. This is the
695default.
696
697.I exit
698\- exit \fBsmartctl\fP.
699
700.I ignore
701\- continue silently without issuing a warning.
832b75ed
GG
702.TP
703.B \-r TYPE, \-\-report=TYPE
704Intended primarily to help \fBsmartmontools\fP developers understand
ee38a438 705the behavior of \fBsmartmontools\fP on non-conforming or poorly
832b75ed
GG
706conforming hardware. This option reports details of \fBsmartctl\fP
707transactions with the device. The option can be used multiple times.
708When used just once, it shows a record of the ioctl() transactions
709with the device. When used more than once, the detail of these
710ioctl() transactions are reported in greater detail. The valid
711arguments to this option are:
712
713.I ioctl
714\- report all ioctl() transactions.
715
716.I ataioctl
717\- report only ioctl() transactions with ATA devices.
718
719.I scsiioctl
720\- report only ioctl() transactions with SCSI devices. Invoking this once
721shows the SCSI commands in hex and the corresponding status. Invoking
722it a second time adds a hex listing of the first 64 bytes of data send to,
723or received from the device.
724
a86ec89e
GI
725.\" %IF OS FreeBSD Linux Windows Cygwin
726.I nvmeioctl
727\- [FreeBSD, Linux, Windows and Cygwin only]
728[NEW EXPERIMENTAL SMARTCTL FEATURE]
729report only ioctl() transactions with NVMe devices.
730
731.\" %ENDIF OS FreeBSD Linux Windows Cygwin
832b75ed
GG
732Any argument may include a positive integer to specify the level of detail
733that should be reported. The argument should be followed by a comma then
734the integer with no spaces. For example,
735.I ataioctl,2
736The default
737level is 1, so \'\-r ataioctl,1\' and \'\-r ataioctl\' are equivalent.
738
a37e7145
GG
739For testing purposes, the output of \'\-r ataioctl,2\' can later be parsed
740by \fBsmartctl\fP itself if \'\-\' is used as device path argument.
741The ATA command input parameters, sector data and return values are
742reconstructed from the debug report read from stdin.
743Then \fBsmartctl\fP internally simulates an ATA device with the same
744behaviour. This is does not work for SCSI devices yet.
4d59bff9
GG
745.TP
746.B \-n POWERMODE, \-\-nocheck=POWERMODE
2127e193 747[ATA only] Specifies if \fBsmartctl\fP should exit before performing any
ee38a438
GI
748checks when the device is in a low-power mode. It may be used to prevent
749a disk from being spun-up by \fBsmartctl\fP. The power mode is ignored by
cfbba5b9 750default. A nonzero exit status is returned if the device is in one of the
a86ec89e 751specified low-power modes (see EXIT STATUS below).
cfbba5b9
GI
752
753Note: If this option is used it may also be necessary to specify the device
ee38a438 754type with the \'\-d\' option. Otherwise the device may spin up due to
cfbba5b9
GI
755commands issued during device type autodetection.
756
757The valid arguments to this option are:
4d59bff9
GG
758
759.I never
760\- check the device always, but print the power mode if \'\-i\' is
761specified.
762
763.I sleep
764\- check the device unless it is in SLEEP mode.
765
766.I standby
767\- check the device unless it is in SLEEP or STANDBY mode. In
768these modes most disks are not spinning, so if you want to prevent
769a disk from spinning up, this is probably what you want.
770
771.I idle
772\- check the device unless it is in SLEEP, STANDBY or IDLE mode.
773In the IDLE state, most disks are still spinning, so this is probably
774not what you want.
775
832b75ed
GG
776.TP
777.B SMART FEATURE ENABLE/DISABLE COMMANDS:
778.IP
779.B Note:
780if multiple options are used to both enable and disable a
781feature, then
782.B both
783the enable and disable commands will be issued. The enable command
784will always be issued
785.B before
786the corresponding disable command.
787.TP
788.B \-s VALUE, \-\-smart=VALUE
789Enables or disables SMART on device. The valid arguments to
790this option are \fIon\fP and \fIoff\fP. Note that the command \'\-s on\'
2127e193 791(perhaps used with with the \'\-o on\' and \'\-S on\' options) should be
ee38a438 792placed in a start-up script for your machine, for example in rc.local or
2127e193 793rc.sysinit. In principle the SMART feature settings are preserved over
ee38a438 794power-cycling, but it doesn\'t hurt to be sure. It is not necessary (or
832b75ed
GG
795useful) to enable SMART to see the TapeAlert messages.
796.TP
797.B \-o VALUE, \-\-offlineauto=VALUE
2127e193
GI
798[ATA only] Enables or disables SMART automatic offline test, which scans the
799drive every four hours for disk defects. This command can be given during
800normal system operation. The valid arguments to this option are \fIon\fP
832b75ed
GG
801and \fIoff\fP.
802
803Note that the SMART automatic offline test command is listed as
804"Obsolete" in every version of the ATA and ATA/ATAPI Specifications.
ee38a438 805It was originally part of the SFF-8035i Revision 2.0 specification,
832b75ed 806but was never part of any ATA specification. However it is
d2e702cf 807implemented and used by many vendors.
832b75ed
GG
808You can tell if automatic offline testing is supported by seeing if
809this command enables and disables it, as indicated by the \'Auto
810Offline Data Collection\' part of the SMART capabilities report
811(displayed with \'\-c\').
812
813SMART provides \fBthree\fP basic categories of testing. The
814\fBfirst\fP category, called "online" testing, has no effect on the
815performance of the device. It is turned on by the \'\-s on\' option.
816
817The \fBsecond\fP category of testing is called "offline" testing. This
818type of test can, in principle, degrade the device performance. The
819\'\-o on\' option causes this offline testing to be carried out,
820automatically, on a regular scheduled basis. Normally, the disk will
821suspend offline testing while disk accesses are taking place, and then
822automatically resume it when the disk would otherwise be idle, so in
ee38a438 823practice it has little effect. Note that a one-time offline test can
832b75ed 824also be carried out immediately upon receipt of a user command. See
ee38a438 825the \'\-t offline\' option below, which causes a one-time offline test
832b75ed
GG
826to be carried out immediately.
827
ee38a438 828The choice (made by the SFF-8035i and ATA specification authors) of
832b75ed
GG
829the word \fItesting\fP for these first two categories is unfortunate,
830and often leads to confusion. In fact these first two categories of
831online and offline testing could have been more accurately described
832as online and offline \fBdata collection\fP.
833
834The results of this automatic or immediate offline testing (data
835collection) are reflected in the values of the SMART Attributes.
836Thus, if problems or errors are detected, the values of these
837Attributes will go below their failure thresholds; some types of
838errors may also appear in the SMART error log. These are visible with
839the \'\-A\' and \'\-l error\' options respectively.
840
ee38a438 841Some SMART attribute values are updated only during off-line data
832b75ed 842collection activities; the rest are updated during normal operation of
ee38a438 843the device or during both normal operation and off-line testing. The
832b75ed
GG
844Attribute value table produced by the \'\-A\' option indicates this in
845the UPDATED column. Attributes of the first type are labeled
846"Offline" and Attributes of the second type are labeled "Always".
847
848The \fBthird\fP category of testing (and the \fIonly\fP category for
849which the word \'testing\' is really an appropriate choice) is "self"
850testing. This third type of test is only performed (immediately) when
851a command to run it is issued. The \'\-t\' and \'\-X\' options can be
ee38a438 852used to carry out and abort such self-tests; please see below for
832b75ed
GG
853further details.
854
855Any errors detected in the self testing will be shown in the
ee38a438 856SMART self-test log, which can be examined using the \'\-l selftest\'
832b75ed
GG
857option.
858
859\fBNote:\fP in this manual page, the word \fB"Test"\fP is used in
860connection with the second category just described, e.g. for the
ee38a438 861"offline" testing. The words \fB"Self-test"\fP are used in
832b75ed
GG
862connection with the third category.
863.TP
864.B \-S VALUE, \-\-saveauto=VALUE
ee38a438 865[ATA] Enables or disables SMART autosave of device vendor-specific
832b75ed
GG
866Attributes. The valid arguments to this option are \fIon\fP
867and \fIoff\fP. Note that this feature is preserved across disk power
868cycles, so you should only need to issue it once.
869
e9583e0c
GI
870The ATA standard does not specify a method to check whether SMART
871autosave is enabled. Unlike SCSI (below), smartctl is unable to print
872a warning if autosave is disabled.
873
874[SCSI] For SCSI devices this toggles the value of the Global Logging
875Target Save Disabled (GLTSD) bit in the Control Mode Page. Some disk
832b75ed 876manufacturers set this bit by default. This prevents error counters,
ee38a438 877power-up hours and other useful data from being placed in non-volatile
832b75ed 878storage, so these values may be reset to zero the next time the device
ee38a438 879is power-cycled. If the GLTSD bit is set then \'smartctl \-a\' will
832b75ed 880issue a warning. Use \fIon\fP to clear the GLTSD bit and thus enable
ee38a438 881saving counters to non-volatile storage. For extreme streaming-video
832b75ed
GG
882type applications you might consider using \fIoff\fP to set the GLTSD
883bit.
d008864d
GI
884.TP
885.B \-g NAME, \-\-get=NAME, \-s NAME[,VALUE], \-\-set=NAME[,VALUE]
ee38a438 886Gets/sets non-SMART device settings.
d008864d
GI
887Note that the \'\-\-set\' option shares its short option \'\-s\' with
888\'\-\-smart\'. Valid arguments are:
889
890.I all
891\- Gets all values. This is equivalent to
892.nf
893\'-g aam -g apm -g lookahead -g security -g wcache\'
894.fi
895
896.I aam[,N|off]
897\- [ATA only] Gets/sets the Automatic Acoustic Management (AAM) feature
898(if supported). A value of 128 sets the most quiet (slowest) mode and 254
899the fastest (loudest) mode, \'off\' disables AAM. Devices may support
900intermediate levels. Values below 128 are defined as vendor specific (0)
ee38a438 901or retired (1 to 127). Note that the AAM feature was declared obsolete in
d008864d
GI
902ATA ACS-2 Revision 4a (Dec 2010).
903
904.I apm[,N|off]
905\- [ATA only] Gets/sets the Advanced Power Management (APM) feature on
906device (if supported). If a value between 1 and 254 is provided, it will
907attempt to enable APM and set the specified value, \'off\' disables APM.
908Note the actual behavior depends on the drive, for example some drives disable
909APM if their value is set above 128. Values below 128 are supposed to allow
910drive spindown, values 128 and above adjust only head-parking frequency,
911although the actual behavior defined is also vendor-specific.
912
913.I lookahead[,on|off]
914\- [ATA only] Gets/sets the read look-ahead feature (if supported).
915Read look-ahead is usually enabled by default.
916
917.I security
918\- [ATA only] Gets the status of ATA Security feature (if supported).
919If ATA Security is enabled an ATA user password is set. The drive will be
920locked on next reset then.
921
922.I security-freeze
923\- [ATA only] Sets ATA Security feature to frozen mode. This prevents that
924the drive accepts any security commands until next reset. Note that the
925frozen mode may already be set by BIOS or OS.
926
927.I standby,[N|off]
928\- [ATA only] Sets the standby (spindown) timer and places the drive in the
929IDLE mode. A value of 0 or \'off\' disables the standby timer.
930Values from 1 to 240 specify timeouts from 5 seconds to 20 minutes in 5
931second increments. Values from 241 to 251 specify timeouts from 30 minutes
932to 330 minutes in 30 minute increments. Value 252 specifies 21 minutes.
933Value 253 specifies a vendor specific time between 8 and 12 hours. Value
934255 specifies 21 minutes and 15 seconds. Some drives may use a vendor
935specific interpretation for the values. Note that there is no get option
936because ATA standards do not specify a method to read the standby timer.
937
938.I standby,now
939\- [ATA only] Places the drive in the STANDBY mode. This usually spins down
940the drive. The setting of the standby timer is not affected.
941
942.I wcache[,on|off]
ee38a438 943\- [ATA] Gets/sets the volatile write cache feature (if supported).
d008864d 944The write cache is usually enabled by default.
832b75ed 945
ee38a438 946.I wcache[,on|off]
a86ec89e 947\- [SCSI] Gets/sets the \'Write Cache Enable\' (WCE) bit (if supported).
ee38a438
GI
948The write cache is usually enabled by default.
949
3d17a85c 950.I wcreorder[,on|off]
a86ec89e 951\- [ATA only] Gets/sets Write Cache Reordering.
3d17a85c
GI
952If it is disabled (off), disk write scheduling is executed on a
953first-in-first-out (FIFO) basis. If Write Cache Reordering is enabled (on),
954then disk write scheduling may be reordered by the drive. If write cache is
955disabled, the current Write Cache Reordering state is remembered but has
956no effect on non-cached writes, which are always written in the order received.
957The state of Write Cache Reordering has no effect on either NCQ or LCQ queued
958commands.
959
ee38a438 960.I rcache[,on|off]
a86ec89e
GI
961\- [SCSI only] Gets/sets the \'Read Cache Disable\' (RCE) bit.
962\'Off\' value disables read cache (if supported).
ee38a438
GI
963The read cache is usually enabled by default.
964
832b75ed
GG
965.TP
966.B SMART READ AND DISPLAY DATA OPTIONS:
967.TP
968.B \-H, \-\-health
a86ec89e 969Prints the health status of the device or pending TapeAlert messages.
832b75ed
GG
970
971If the device reports failing health status, this means
972.B either
973that the device has already failed,
974.B or
975that it is predicting its own failure within the next 24 hours. If
976this happens, use the \'\-a\' option to get more information, and
1953ff6d 977.B get your data off the disk and to someplace safe as soon as you can.
a86ec89e
GI
978
979[ATA] Health status is obtained by checking the (boolean) result returned
980by the SMART RETURN STATUS command.
981The return value of this ATA command may be unknown due to limitations or
982bugs in some layer (e.g. RAID controller or USB bridge firmware) between
983disk and operating system.
984In this case, \fBsmartctl\fP prints a warning and checks whether any
985Prefailure SMART Attribute value is less than or equal to its threshold
986(see \'\-A\' below).
987
988[SCSI] Health status is obtained by checking the Additional Sense Code
989(ASC) and Additional Sense Code Qualifier (ASCQ) from Informal Exceptions
990(IE) log page (if supported) and/or from SCSI sense data.
991
992[SCSI tape drive or changer] TapeAlert status is obtained by reading the
993TapeAlert log page.
994Please note that the TapeAlert log page flags are cleared for the initiator
995when the page is read.
996This means that each alert condition is reported only once by \fBsmartctl\fP
997for each initiator for each activation of the condition.
998.\" %IF OS FreeBSD Linux Windows Cygwin
999
1000[NVMe] [FreeBSD, Linux, Windows and Cygwin only]
1001[NEW EXPERIMENTAL SMARTCTL FEATURE]
1002NVMe status is obtained by reading the "Critical Warning" byte from
1003the SMART/Health Information log.
1004.\" %ENDIF OS FreeBSD Linux Windows Cygwin
832b75ed
GG
1005.TP
1006.B \-c, \-\-capabilities
a86ec89e 1007[ATA] Prints only the generic SMART capabilities. These
2127e193 1008show what SMART features are implemented and how the device will
832b75ed
GG
1009respond to some of the different SMART commands. For example it
1010shows if the device logs errors, if it supports offline surface
ee38a438 1011scanning, and so on. If the device can carry out self-tests, this
832b75ed
GG
1012option also shows the estimated time required to run those tests.
1013
ee38a438 1014Note that the time required to run the Self-tests (listed in minutes)
832b75ed
GG
1015are fixed. However the time required to run the Immediate Offline
1016Test (listed in seconds) is variable. This means that if you issue a
1017command to perform an Immediate Offline test with the \'\-t offline\' option,
1018then the time may jump to a larger value and then count down as the
1019Immediate Offline Test is carried out. Please see REFERENCES below
1020for further information about the the flags and capabilities described
1021by this option.
a86ec89e
GI
1022.\" %IF OS FreeBSD Linux Windows Cygwin
1023
1024[NVMe] [FreeBSD, Linux, Windows and Cygwin only]
1025[NEW EXPERIMENTAL SMARTCTL FEATURE]
1026Prints various NVMe device capabilities obtained from the Identify Controller
1027and the Identify Namespace data structure.
1028.\" %ENDIF OS FreeBSD Linux Windows Cygwin
832b75ed
GG
1029.TP
1030.B \-A, \-\-attributes
2127e193
GI
1031[ATA] Prints only the vendor specific SMART Attributes. The Attributes
1032are numbered from 1 to 253 and have specific names and ID numbers. For
832b75ed
GG
1033example Attribute 12 is "power cycle count": how many times has the
1034disk been powered up.
1035
1036Each Attribute has a "Raw" value, printed under the heading
1037"RAW_VALUE", and a "Normalized" value printed under the heading
ee38a438 1038"VALUE". [Note: \fBsmartctl\fP prints these values in base-10.] In
832b75ed 1039the example just given, the "Raw Value" for Attribute 12 would be the
ee38a438 1040actual number of times that the disk has been power-cycled, for
832b75ed
GG
1041example 365 if the disk has been turned on once per day for exactly
1042one year. Each vendor uses their own algorithm to convert this "Raw"
1043value to a "Normalized" value in the range from 1 to 254. Please keep
1044in mind that \fBsmartctl\fP only reports the different Attribute
1045types, values, and thresholds as read from the device. It does
1046\fBnot\fP carry out the conversion between "Raw" and "Normalized"
1047values: this is done by the disk\'s firmware.
1048
1049The conversion from Raw value to a quantity with physical units is
1050not specified by the SMART standard. In most cases, the values printed
1051by \fBsmartctl\fP are sensible. For example the temperature Attribute
1052generally has its raw value equal to the temperature in Celsius.
1053However in some cases vendors use unusual conventions. For example
ee38a438 1054the Hitachi disk on my laptop reports its power-on hours in minutes,
832b75ed
GG
1055not hours. Some IBM disks track three temperatures rather than one, in
1056their raw values. And so on.
1057
1058Each Attribute also has a Threshold value (whose range is 0 to 255)
1059which is printed under the heading "THRESH". If the Normalized value
1060is \fBless than or equal to\fP the Threshold value, then the Attribute
ee38a438 1061is said to have failed. If the Attribute is a pre-failure Attribute,
832b75ed
GG
1062then disk failure is imminent.
1063
1064Each Attribute also has a "Worst" value shown under the heading
1065"WORST". This is the smallest (closest to failure) value that the
1066disk has recorded at any time during its lifetime when SMART was
1067enabled. [Note however that some vendors firmware may actually
ee38a438 1068\fBincrease\fP the "Worst" value for some "rate-type" Attributes.]
832b75ed
GG
1069
1070The Attribute table printed out by \fBsmartctl\fP also shows the
1071"TYPE" of the Attribute. Attributes are one of two possible types:
ee38a438 1072Pre-failure or Old age. Pre-failure Attributes are ones which, if
832b75ed
GG
1073less than or equal to their threshold values, indicate pending disk
1074failure. Old age, or usage Attributes, are ones which indicate
ee38a438 1075end-of-product life from old-age or normal aging and wearout, if
832b75ed 1076the Attribute value is less than or equal to the threshold. \fBPlease
ee38a438 1077note\fP: the fact that an Attribute is of type 'Pre-fail' does
832b75ed
GG
1078\fBnot\fP mean that your disk is about to fail! It only has this
1079meaning if the Attribute\'s current Normalized value is less than or
1080equal to the threshold value.
1081
1082If the Attribute\'s current Normalized value is less than or equal to
1083the threshold value, then the "WHEN_FAILED" column will display
1084"FAILING_NOW". If not, but the worst recorded value is less than or
1085equal to the threshold value, then this column will display
1086"In_the_past". If the "WHEN_FAILED" column has no entry (indicated by
1087a dash: \'\-\') then this Attribute is OK now (not failing) and has
1088also never failed in the past.
1089
1090The table column labeled "UPDATED" shows if the SMART Attribute values
ee38a438 1091are updated during both normal operation and off-line testing, or
832b75ed
GG
1092only during offline testing. The former are labeled "Always" and the
1093latter are labeled "Offline".
1094
1095So to summarize: the Raw Attribute values are the ones that might have
1096a real physical interpretation, such as "Temperature Celsius",
ee38a438 1097"Hours", or "Start-Stop Cycles". Each manufacturer converts these,
832b75ed
GG
1098using their detailed knowledge of the disk\'s operations and failure
1099modes, to Normalized Attribute values in the range 1\-254. The
1100current and worst (lowest measured) of these Normalized Attribute
1101values are stored on the disk, along with a Threshold value that the
1102manufacturer has determined will indicate that the disk is going to
1103fail, or that it has exceeded its design age or aging limit.
1104\fBsmartctl\fP does \fBnot\fP calculate any of the Attribute values,
1105thresholds, or types, it merely reports them from the SMART data on
1106the device.
1107
ee38a438
GI
1108Note that starting with ATA/ATAPI-4, revision 4, the meaning of these
1109Attribute fields has been made entirely vendor-specific. However most
1110newer ATA/SATA disks seem to respect their meaning, so we have retained
832b75ed
GG
1111the option of printing the Attribute values.
1112
ee38a438
GI
1113Solid-state drives use different meanings for some of the attributes.
1114In this case the attribute name printed by smartctl is incorrect unless
1115the drive is already in the smartmontools drive database.
1116
2127e193 1117[SCSI] For SCSI devices the "attributes" are obtained from the temperature
ee38a438 1118and start-stop cycle counter log pages. Certain vendor specific
832b75ed
GG
1119attributes are listed if recognised. The attributes are output in a
1120relatively free format (compared with ATA disk attributes).
a86ec89e
GI
1121.\" %IF OS FreeBSD Linux Windows Cygwin
1122
1123[NVMe] [FreeBSD, Linux, Windows and Cygwin only]
1124[NEW EXPERIMENTAL SMARTCTL FEATURE]
1125For NVMe devices the attributes are obtained from the SMART/Health
1126Information log.
1127.\" %ENDIF OS FreeBSD Linux Windows Cygwin
832b75ed 1128.TP
a7e8ffec 1129.B \-f FORMAT, \-\-format=FORMAT
e165493d 1130[ATA only] Selects the output format of the attributes:
a7e8ffec
GI
1131
1132.I old
1133\- Old smartctl format. This is the default unless the \'\-x\' option is
1134specified.
1135
1136.I brief
1137\- New format which fits into 80 colums (except in some rare cases).
1138This format also decodes four additional attribute flags.
1139This is the default if the '\-x\' option is specified.
e165493d
GI
1140
1141.I hex,id
1142\- Print all attribute IDs as hexadecimal numbers.
1143
1144.I hex,val
1145\- Print all normalized values as hexadecimal numbers.
1146
1147.I hex
1148\- Same as \'\-f hex,id \-f hex,val\'.
a7e8ffec 1149.TP
832b75ed 1150.B \-l TYPE, \-\-log=TYPE
ee38a438
GI
1151Prints either the SMART Error Log, the SMART Self-Test Log, the SMART
1152Selective Self-Test Log [ATA only], the Log Directory [ATA only], or
4d59bff9 1153the Background Scan Results Log [SCSI only].
832b75ed
GG
1154The valid arguments to this option are:
1155
1156.I error
2127e193 1157\- [ATA] prints the Summary SMART error log. SMART disks maintain a log
ee38a438
GI
1158of the most recent five non-trivial errors. For each of these errors, the
1159disk power-on lifetime at which the error occurred is recorded, as is
832b75ed
GG
1160the device status (idle, standby, etc) at the time of the error. For
1161some common types of errors, the Error Register (ER) and Status
1162Register (SR) values are decoded and printed as text. The meanings of these
1163are:
1164.nf
1165 \fBABRT\fP: Command \fBAB\fPo\fBRT\fPed
1166 \fBAMNF\fP: \fBA\fPddress \fBM\fPark \fBN\fPot \fBF\fPound
1167 \fBCCTO\fP: \fBC\fPommand \fBC\fPompletion \fBT\fPimed \fBO\fPut
1168 \fBEOM\fP: \fBE\fPnd \fBO\fPf \fBM\fPedia
1169 \fBICRC\fP: \fBI\fPnterface \fBC\fPyclic \fBR\fPedundancy \fBC\fPode (CRC) error
1170 \fBIDNF\fP: \fBID\fPentity \fBN\fPot \fBF\fPound
ee38a438 1171 \fBILI\fP: (packet command-set specific)
832b75ed
GG
1172 \fBMC\fP: \fBM\fPedia \fBC\fPhanged
1173 \fBMCR\fP: \fBM\fPedia \fBC\fPhange \fBR\fPequest
1174 \fBNM\fP: \fBN\fPo \fBM\fPedia
1175 \fBobs\fP: \fBobs\fPolete
1176 \fBTK0NF\fP: \fBT\fPrac\fBK 0 N\fPot \fBF\fPound
1177 \fBUNC\fP: \fBUNC\fPorrectable Error in Data
1178 \fBWP\fP: Media is \fBW\fPrite \fBP\fProtected
1179.fi
1180In addition, up to the last five commands that preceded the error are
1181listed, along with a timestamp measured from the start of the
1182corresponding power cycle. This is displayed in the form
1183Dd+HH:MM:SS.msec where D is the number of days, HH is hours, MM is
1184minutes, SS is seconds and msec is milliseconds. [Note: this time
1185stamp wraps after 2^32 milliseconds, or 49 days 17 hours 2 minutes and
118647.296 seconds.] The key ATA disk registers are also recorded in the
ee38a438 1187log. The final column of the error log is a text-string description
832b75ed
GG
1188of the ATA command defined by the Command Register (CR) and Feature
1189Register (FR) values. Commands that are obsolete in the most current
ee38a438
GI
1190spec are listed like this: \fBREAD LONG (w/ retry) [OBS-4]\fP,
1191indicating that the command became obsolete with or in the ATA-4
832b75ed 1192specification. Similarly, the notation \fB[RET\-\fP\fIN\fP\fB]\fP is
ee38a438 1193used to indicate that a command was retired in the ATA-\fIN\fP
832b75ed
GG
1194specification. Some commands are not defined in any version of the
1195ATA specification but are in common use nonetheless; these are marked
ee38a438 1196\fB[NS]\fP, meaning non-standard.
832b75ed 1197
d2e702cf
GI
1198The ATA Specification (ATA ACS-2 Revision 7, Section A.7.1) says:
1199\fB"Error log data structures shall include, but are not limited to,
1200Uncorrectable errors, ID Not Found errors for which the LBA requested was
1201valid, servo errors, and write fault errors. Error log data structures
1202shall not include errors attributed to the receipt of faulty commands."\fP
1203The definitions of these terms are:
832b75ed
GG
1204.br
1205\fBUNC\fP (\fBUNC\fPorrectable): data is uncorrectable. This refers
1206to data which has been read from the disk, but for which the Error
1207Checking and Correction (ECC) codes are inconsistent. In effect, this
1208means that the data can not be read.
1209.br
ee38a438 1210\fBIDNF\fP (\fBID N\fPot \fBF\fPound): user-accessible address could
832b75ed
GG
1211not be found. For READ LOG type commands, \fBIDNF\fP can also indicate
1212that a device data log structure checksum was incorrect.
1213
1214If the command that caused the error was a READ or WRITE command, then
1215the Logical Block Address (LBA) at which the error occurred will be
1216printed in base 10 and base 16. The LBA is a linear address, which
ee38a438 1217counts 512-byte sectors on the disk, starting from zero. (Because of
832b75ed
GG
1218the limitations of the SMART error log, if the LBA is greater than
12190xfffffff, then either no error log entry will be made, or the error
1220log entry will have an incorrect LBA. This may happen for drives with
1221a capacity greater than 128 GiB or 137 GB.) On Linux systems the
1222smartmontools web page has instructions about how to convert the LBA
1223address to the name of the disk file containing the erroneous disk
1224sector.
1225
1226Please note that some manufacturers \fBignore\fP the ATA
1227specifications, and make entries in the error log if the device
1228receives a command which is not implemented or is not valid.
1229
2127e193
GI
1230.I error
1231\- [SCSI] prints the error counter log pages for reads, write and verifies.
832b75ed
GG
1232The verify row is only output if it has an element other than zero.
1233
a86ec89e
GI
1234.\" %IF OS FreeBSD Linux Windows Cygwin
1235.I error[,NUM]
1236\- [NVMe] [FreeBSD, Linux, Windows and Cygwin only]
1237[NEW EXPERIMENTAL SMARTCTL FEATURE]
1238prints the NVMe Error Information log.
1239Only the 16 most recent log entries are printed by default.
1240This number can be changed by the optional parameter NUM.
1241The maximum number of log entries is vendor specific
1242(in the range from 1 to 256 inclusive).
1243
1244.\" %ENDIF OS FreeBSD Linux Windows Cygwin
2127e193 1245.I xerror[,NUM][,error]
cfbba5b9
GI
1246\- [ATA only] prints the Extended Comprehensive SMART error log
1247(General Purpose Log address 0x03). Unlike the Summary SMART error
1248log (see \'\-l error\' above), it provides sufficient space to log
1249the contents of the 48-bit LBA register set introduced with ATA-6.
1250It also supports logs with more than one sector. Each sector holds
1251up to 4 log entries. The actual number of log sectors is vendor
d2e702cf 1252specific.
2127e193
GI
1253
1254Only the 8 most recent error log entries are printed by default.
1255This number can be changed by the optional parameter NUM.
1256
1257If ',error' is appended and the Extended Comprehensive SMART error
1258log is not supported, the Summary SMART self-test log is printed.
1259
f4e463df
GI
1260Please note that recent drives may report errors only in the Extended
1261Comprehensive SMART error log. The Summary SMART error log may be reported
1262as supported but is always empty then.
2127e193 1263
832b75ed 1264.I selftest
ee38a438 1265\- [ATA] prints the SMART self-test log. The disk maintains a self-test
2127e193 1266log showing the results of the self tests, which can be run using the
832b75ed 1267\'\-t\' option described below. For each of the most recent
ee38a438
GI
1268twenty-one self-tests, the log shows the type of test (short or
1269extended, off-line or captive) and the final status of the test. If
832b75ed
GG
1270the test did not complete successfully, then the percentage of the
1271test remaining is shown. The time at which the test took place,
eb07ddf2
GI
1272measured in hours of disk lifetime, is also printed. [Note: this time
1273stamp wraps after 2^16 hours, or 2730 days and 16 hours, or about 7.5
1274years.] If any errors were detected, the Logical Block Address (LBA)
1275of the first error is printed in decimal notation. On Linux systems the
1276smartmontools web page has instructions about how to convert this LBA
1277address to the name of the disk file containing the erroneous block.
832b75ed 1278
2127e193 1279.I selftest
ee38a438 1280\- [SCSI] the self-test log for a SCSI device has a slightly different
2127e193 1281format than for an ATA device. For each of the most recent twenty
ee38a438 1282self-tests, it shows the type of test and the status (final or in
832b75ed
GG
1283progress) of the test. SCSI standards use the terms "foreground" and
1284"background" (rather than ATA\'s corresponding "captive" and
ee38a438 1285"off-line") and "short" and "long" (rather than ATA\'s corresponding
832b75ed
GG
1286"short" and "extended") to describe the type of the test. The printed
1287segment number is only relevant when a test fails in the third or
1288later test segment. It identifies the test that failed and consists
1289of either the number of the segment that failed during the test, or
1290the number of the test that failed and the number of the segment in
ee38a438 1291which the test was run, using a vendor-specific method of putting both
832b75ed
GG
1292numbers into a single byte. The Logical Block Address (LBA) of the
1293first error is printed in hexadecimal notation. On Linux systems the
1294smartmontools web page has instructions about how to convert this LBA
1295address to the name of the disk file containing the erroneous block.
1296If provided, the SCSI Sense Key (SK), Additional Sense Code (ASC) and
1297Additional Sense Code Qualifier (ASQ) are also printed. The self tests
1298can be run using the \'\-t\' option described below (using the ATA
1299test terminology).
1300
2127e193 1301.I xselftest[,NUM][,selftest]
ee38a438
GI
1302\- [ATA only] prints the Extended SMART self-test log (General Purpose
1303Log address 0x07). Unlike the SMART self-test log (see \'\-l selftest\'
cfbba5b9
GI
1304above), it supports 48-bit LBA and logs with more than one sector.
1305Each sector holds up to 19 log entries. The actual number of log sectors
d2e702cf 1306is vendor specific.
2127e193
GI
1307
1308Only the 25 most recent log entries are printed by default. This number
1309can be changed by the optional parameter NUM.
1310
1311If ',selftest' is appended and the Extended SMART self-test log is not
1312supported, the old SMART self-test log is printed.
1313
1314.I selective
1315\- [ATA only] Please see the \'\-t select\' option below for a
ee38a438 1316description of selective self-tests. The selective self-test log
832b75ed
GG
1317shows the start/end Logical Block Addresses (LBA) of each of the five
1318test spans, and their current test status. If the span is being
ee38a438
GI
1319tested or the remainder of the disk is being read-scanned, the
1320current 65536-sector block of LBAs being tested is also displayed.
1321The selective self-test log also shows if a read-scan of the
832b75ed 1322remainder of the disk will be carried out after the selective
ee38a438
GI
1323self-test has completed (see \'\-t afterselect\' option) and the time
1324delay before restarting this read-scan if it is interrupted (see
1325\'\-t pending\' option).
832b75ed 1326
2127e193
GI
1327.I directory[,gs]
1328\- [ATA only] if the device supports the General Purpose Logging feature
ee38a438 1329set (ATA-6 and above) then this prints the Log Directory (the log at
832b75ed
GG
1330address 0). The Log Directory shows what logs are available and their
1331length in sectors (512 bytes). The contents of the logs at address 1
ee38a438
GI
1332[Summary SMART error log] and at address 6 [SMART self-test log] may
1333be printed using the previously-described
832b75ed
GG
1334.I error
1335and
1336.I selftest
2127e193
GI
1337arguments to this option.
1338If your version of smartctl supports 48-bit ATA commands, both the
1339General Purpose Log (GPL) and SMART Log (SL) directories are printed in
1340one combined table. The output can be restricted to the GPL directory or
1341SL directory by \'\-l directory,q\' or \'\-l directory,s\' respectively.
1342
1343.I background
1344\- [SCSI only] the background scan results log outputs information derived
ee38a438 1345from Background Media Scans (BMS) done after power up and/or periodically
2127e193 1346(e.g. every 24 hours) on recent SCSI disks. If supported, the BMS status
4d59bff9
GG
1347is output first, indicating whether a background scan is currently
1348underway (and if so a progress percentage), the amount of time the disk
1349has been powered up and the number of scans already completed. Then there
1350is a header and a line for each background scan "event". These will
1351typically be either recovered or unrecoverable errors. That latter group
1352may need some attention. There is a description of the background scan
ee38a438 1353mechanism in section 4.18 of SBC-3 revision 6 (see www.t10.org ).
4d59bff9 1354
2127e193
GI
1355.I scttemp, scttempsts, scttemphist
1356\- [ATA only] prints the disk temperature information provided by the
1357SMART Command Transport (SCT) commands.
a37e7145
GG
1358The option \'scttempsts\' prints current temperature and temperature
1359ranges returned by the SCT Status command, \'scttemphist\' prints
1360temperature limits and the temperature history table returned by
1361the SCT Data Table command, and \'scttemp\' prints both.
1362The temperature values are preserved across power cycles.
d008864d
GI
1363The logging interval can be configured with the
1364\'\-l scttempint,N[,p]\' option, see below.
ee38a438
GI
1365The SCT commands were introduced in ATA8-ACS and were also
1366supported by many ATA-7 disks.
d008864d
GI
1367
1368.I scttempint,N[,p]
1369\- [ATA only] clears the SCT temperature history table and sets the
1370time interval for temperature logging to N minutes.
1371If \',p\' is specified, the setting is preserved across power cycles.
1372Otherwise, the setting is volatile and will be reverted to the last
1373non-volatile setting by the next hard reset. The default interval
1374is vendor specific, typical values are 1, 2, or 5 minutes.
a37e7145 1375
7f0798ef 1376.I scterc[,READTIME,WRITETIME]
d008864d
GI
1377\- [ATA only] prints values and descriptions of the SCT Error Recovery
1378Control settings. These are equivalent to TLER (as used by Western
d2e702cf 1379Digital), CCTL (as used by Samsung and Hitachi/HGST) and ERC (as used by
d008864d
GI
1380Seagate). READTIME and WRITETIME arguments (deciseconds) set the
1381specified values. Values of 0 disable the feature, other values less
1382than 65 are probably not supported. For RAID configurations, this is
1383typically set to 70,70 deciseconds.
1384
1385.I devstat[,PAGE]
ee38a438
GI
1386\- [ATA only] prints values and descriptions of the ATA Device Statistics
1387log pages (General Purpose Log address 0x04). If no PAGE number is specified,
d008864d
GI
1388entries from all supported pages are printed. If PAGE 0 is specified,
1389the list of supported pages is printed. Device Statistics was
d2e702cf 1390introduced in ACS-2 and is only supported by some recent devices.
7f0798ef 1391
2127e193 1392.I sataphy[,reset]
cfbba5b9
GI
1393\- [SATA only] prints values and descriptions of the SATA Phy Event
1394Counters (General Purpose Log address 0x11). If \'\-l sataphy,reset\'
1395is specified, all counters are reset after reading the values.
ee38a438
GI
1396This also works for SATA devices with Packet interface like CD/DVD
1397drives.
2127e193
GI
1398
1399.I sasphy[,reset]
cfbba5b9
GI
1400\- [SAS (SCSI) only] prints values and descriptions of the SAS (SSP)
1401Protocol Specific log page (log page 0x18). If \'\-l sasphy,reset\'
1402is specified, all counters are reset after reading the values.
2127e193
GI
1403
1404.I gplog,ADDR[,FIRST[\-LAST|+SIZE]]
cfbba5b9
GI
1405\- [ATA only] prints a hex dump of any log accessible via General
1406Purpose Logging (GPL) feature. The log address ADDR is the hex address
1407listed in the log directory (see \'\-l directory\' above).
1408The range of log sectors (pages) can be specified by decimal values
1409FIRST\-LAST or FIRST+SIZE. FIRST defaults to 0, SIZE defaults to 1.
1410LAST can be set to \'max\' to specify the last page of the log.
2127e193
GI
1411
1412.I smartlog,ADDR[,FIRST[\-LAST|+SIZE]]
cfbba5b9
GI
1413\- [ATA only] prints a hex dump of any log accessible via SMART Read
1414Log command. See \'\-l gplog,...\' above for parameter syntax.
2127e193
GI
1415
1416For example, all these commands:
1417.nf
1418 smartctl \-l gplog,0x80,10-15 /dev/sda
1419 smartctl \-l gplog,0x80,10+6 /dev/sda
1420 smartctl \-l smartlog,0x80,10-15 /dev/sda
1421.fi
1422print pages 10-15 of log 0x80 (first host vendor specific log).
1423
1424The hex dump format is compatible with the \'xxd \-r\' command.
1425This command:
1426.nf
1427 smartctl \-l gplog,0x11 /dev/sda | grep ^0 | xxd -r >log.bin
1428.fi
1429writes a binary representation of the one sector log 0x11
1430(SATA Phy Event Counters) to file log.bin.
d008864d 1431
a86ec89e
GI
1432.\" %IF OS FreeBSD Linux Windows Cygwin
1433.I nvmelog,PAGE,SIZE
1434\- [NVMe only] [FreeBSD, Linux, Windows and Cygwin only]
1435[NEW EXPERIMENTAL SMARTCTL FEATURE]
1436prints a hex dump of the first SIZE bytes from the NVMe log with
1437identifier PAGE.
1438PAGE is a hexadecimal number in the range from 0x1 to 0xff.
1439SIZE is a hexadecimal number in the range from 0x4 to 0x4000 (16 KiB).
1440\fBWARNING: Do not specify the identifier of an unknown log page.
1441Reading a log page may have undesirable side effects.\fP
1442
1443.\" %ENDIF OS FreeBSD Linux Windows Cygwin
d008864d
GI
1444.I ssd
1445\- [ATA] prints the Solid State Device Statistics log page.
1446This has the same effect as \'\-l devstat,7\', see above.
1447
1448.I ssd
1449\- [SCSI] prints the Solid State Media percentage used endurance
1450indicator. A value of 0 indicates as new condition while 100
1451indicates the device is at the end of its lifetime as projected by the
1452manufacturer. The value may reach 255.
832b75ed 1453.TP
a23d5117 1454.B \-v ID,FORMAT[:BYTEORDER][,NAME], \-\-vendorattribute=ID,FORMAT[:BYTEORDER][,NAME]
ee38a438 1455[ATA only] Sets a vendor-specific raw value print FORMAT, an optional
a23d5117 1456BYTEORDER and an optional NAME for Attribute ID.
bed94269 1457This option may be used multiple times.
832b75ed 1458
bed94269 1459The Attribute ID can be in the range 1 to 255. If \'N\' is specified as
a23d5117
GI
1460ID, the settings for all Attributes are changed.
1461
1462The optional BYTEORDER consists of 1 to 8 characters from the
1463set \'012345rvwz\'. The characters \'0\' to \'5\' select the byte 0
ee38a438 1464to 5 from the 48-bit raw value, \'r\' selects the reserved byte of
a23d5117
GI
1465the attribute data block, \'v\' selects the normalized value, \'w\'
1466selects the worst value and \'z\' inserts a zero byte.
ee38a438
GI
1467The default BYTEORDER is \'543210\' for all 48-bit formats, \'r543210\'
1468for the 54-bit formats, and \'543210wv\' for the 64-bit formats.
a23d5117
GI
1469For example, \'\-v 5,raw48:012345\' prints the raw value of
1470attribute 5 with big endian instead of little endian
1471byte ordering.
1472
d008864d
GI
1473The NAME is a string of letters, digits and underscore. Its length should
1474not exceed 23 characters. The \'\-P showall\' option reports an error if
1475this is the case.
bed94269
GI
1476
1477.I \-v help
832b75ed
GG
1478\- Prints (to STDOUT) a list of all valid arguments to this option,
1479then exits.
1480
bed94269
GI
1481Valid arguments for FORMAT are:
1482
1483.I raw8
ee38a438 1484\- Print the Raw value as six 8-bit unsigned base-10 integers.
bed94269
GI
1485This may be useful for decoding the meaning of the Raw value.
1486
1487.I raw16
ee38a438 1488\- Print the Raw value as three 16-bit unsigned base-10 integers.
bed94269
GI
1489This may be useful for decoding the meaning of the Raw value.
1490
1491.I raw48
ee38a438 1492\- Print the Raw value as a 48-bit unsigned base-10 integer.
bed94269
GI
1493This is the default for most attributes.
1494
1495.I hex48
1496\- Print the Raw value as a 12 digit hexadecimal number.
1497This may be useful for decoding the meaning of the Raw value.
1498
e165493d 1499.I raw56
ee38a438
GI
1500\- Print the Raw value as a 54-bit unsigned base-10 integer.
1501This includes the reserved byte which follows the 48-bit raw value.
e165493d
GI
1502
1503.I hex56
1504\- Print the Raw value as a 14 digit hexadecimal number.
ee38a438 1505This includes the reserved byte which follows the 48-bit raw value.
e165493d 1506
bed94269 1507.I raw64
ee38a438 1508\- Print the Raw value as a 64-bit unsigned base-10 integer.
bed94269 1509This includes two bytes from the normalized and worst attribute value.
e165493d 1510This raw format is used by some SSD devices with Indilinx controller.
bed94269
GI
1511
1512.I hex64
1513\- Print the Raw value as a 16 digit hexadecimal number.
1514This includes two bytes from the normalized and worst attribute value.
e165493d 1515This raw format is used by some SSD devices with Indilinx controller.
bed94269
GI
1516
1517.I min2hour
ee38a438 1518\- Raw Attribute is power-on time in minutes. Its raw value
832b75ed
GG
1519will be displayed in the form "Xh+Ym". Here X is hours, and Y is
1520minutes in the range 0\-59 inclusive. Y is always printed with two
1521digits, for example "06" or "31" or "00".
1522
bed94269 1523.I sec2hour
ee38a438 1524\- Raw Attribute is power-on time in seconds. Its raw value
832b75ed
GG
1525will be displayed in the form "Xh+Ym+Zs". Here X is hours, Y is
1526minutes in the range 0\-59 inclusive, and Z is seconds in the range
15270\-59 inclusive. Y and Z are always printed with two digits, for
1528example "06" or "31" or "00".
1529
bed94269 1530.I halfmin2hour
ee38a438 1531\- Raw Attribute is power-on time, measured in units of 30
832b75ed
GG
1532seconds. This format is used by some Samsung disks. Its raw value
1533will be displayed in the form "Xh+Ym". Here X is hours, and Y is
1534minutes in the range 0\-59 inclusive. Y is always printed with two
1535digits, for example "06" or "31" or "00".
1536
cfbba5b9 1537.I msec24hour32
ee38a438 1538\- Raw Attribute is power-on time measured in 32-bit hours and 24-bit
cfbba5b9
GI
1539milliseconds since last hour update. It will be displayed in the form
1540"Xh+Ym+Z.Ms". Here X is hours, Y is minutes, Z is seconds and M is
1541milliseconds.
1542
bed94269
GI
1543.I tempminmax
1544\- Raw Attribute is the disk temperature in Celsius. Info about
cfbba5b9
GI
1545Min/Max temperature is printed if available. This is the default
1546for Attributes 190 and 194. The recording interval (lifetime,
1547last power cycle, last soft reset) of the min/max values is device
1548specific.
832b75ed 1549
bed94269
GI
1550.I temp10x
1551\- Raw Attribute is ten times the disk temperature in Celsius.
832b75ed 1552
bed94269 1553.I raw16(raw16)
ee38a438
GI
1554\- Print the raw attribute as a 16-bit value and two optional
155516-bit values if these words are nonzero. This is the default
bed94269
GI
1556for Attributes 5 and 196.
1557
1558.I raw16(avg16)
1559\- Raw attribute is spin-up time. It is printed as a 16-bit value
1560and an optional "Average" 16-bit value if the word is nonzero.
1561This is the default for Attribute 3.
1562
e165493d 1563.I raw24(raw8)
ee38a438
GI
1564\- Print the raw attribute as a 24-bit value and three optional
15658-bit values if these bytes are nonzero. This is the default
e165493d
GI
1566for Attribute 9.
1567
bed94269 1568.I raw24/raw24
ee38a438 1569\- Raw Attribute contains two 24-bit values. The first is the
832b75ed
GG
1570number of load cycles. The second is the number of unload cycles.
1571The difference between these two values is the number of times that
1572the drive was unexpectedly powered off (also called an emergency
1573unload). As a rule of thumb, the mechanical stress created by one
1574emergency unload is equivalent to that created by one hundred normal
1575unloads.
1576
cfbba5b9 1577.I raw24/raw32
ee38a438
GI
1578\- Raw attribute is an error rate which consists of a 24-bit error
1579count and a 32-bit total count.
cfbba5b9 1580
bed94269
GI
1581The following old arguments to \'\-v\' are also still valid:
1582
1583.I 9,minutes
1584\- same as:
1585.I 9,min2hour,Power_On_Minutes.
1586
1587.I 9,seconds
1588\- same as:
1589.I 9,sec2hour,Power_On_Seconds.
1590
1591.I 9,halfminutes
1592\- same as:
1593.I 9,halfmin2hour,Power_On_Half_Minutes.
1594
1595.I 9,temp
1596\- same as:
1597.I 9,tempminmax,Temperature_Celsius.
1598
1599.I 192,emergencyretractcyclect
1600\- same as:
1601.I 192,raw48,Emerg_Retract_Cycle_Ct
1602
1603.I 193,loadunload
1604\- same as:
1605.I 193,raw24/raw24.
1606
832b75ed 1607.I 194,10xCelsius
bed94269
GI
1608\- same as:
1609.I 194,temp10x,Temperature_Celsius_x10.
832b75ed
GG
1610
1611.I 194,unknown
bed94269
GI
1612\- same as:
1613.I 194,raw48,Unknown_Attribute.
832b75ed 1614
2127e193 1615.I 197,increasing
bed94269
GI
1616\- same as:
1617.I 197,raw48,Total_Pending_Sectors.
1618Also means that Attribute number 197 (Current Pending Sector Count)
1619is not reset if uncorrectable sectors are reallocated
1620(see \fBsmartd.conf\fP(5) man page).
2127e193
GI
1621
1622.I 198,increasing
bed94269
GI
1623\- same as:
1624.I 198,raw48,Total_Offl_Uncorrectabl.
1625Also means that Attribute number 198 (Offline Uncorrectable Sector Count)
1626is not reset if uncorrectable sectors are reallocated
1627(see \fBsmartd.conf\fP(5) man page).
2127e193 1628
832b75ed 1629.I 198,offlinescanuncsectorct
bed94269
GI
1630\- same as:
1631.I 198,raw48,Offline_Scan_UNC_SectCt.
832b75ed
GG
1632
1633.I 200,writeerrorcount
bed94269
GI
1634\- same as:
1635.I 200,raw48,Write_Error_Count.
832b75ed
GG
1636
1637.I 201,detectedtacount
bed94269
GI
1638\- same as:
1639.I 201,raw48,Detected_TA_Count.
832b75ed
GG
1640
1641.I 220,temp
bed94269 1642\- same as:
ee38a438 1643.I 220,tempminmax,Temperature_Celsius.
832b75ed
GG
1644.TP
1645.B \-F TYPE, \-\-firmwarebug=TYPE
2127e193 1646[ATA only] Modifies the behavior of \fBsmartctl\fP to compensate for some
ee38a438
GI
1647known and understood device firmware or driver bug. This option may be used
1648multiple times. The valid arguments are:
832b75ed
GG
1649
1650.I none
1651\- Assume that the device firmware obeys the ATA specifications. This
1652is the default, unless the device has presets for \'\-F\' in the
d2e702cf 1653drive database. Using this option on the command line will override any
ee38a438
GI
1654preset values.
1655
1656.I nologdir
1657\- Suppresses read attempts of SMART or GP Log Directory.
1658Support for all standard logs is assumed without an actual check.
1659Some Intel SSDs may freeze if log address 0 is read.
832b75ed
GG
1660
1661.I samsung
1662\- In some Samsung disks (example: model SV4012H Firmware Version:
ee38a438
GI
1663RM100-08) some of the two- and four-byte quantities in the SMART data
1664structures are byte-swapped (relative to the ATA specification).
832b75ed 1665Enabling this option tells \fBsmartctl\fP to evaluate these quantities
ee38a438
GI
1666in byte-reversed order. Some signs that your disk needs this option
1667are (1) no self-test log printed, even though you have run self-tests;
832b75ed
GG
1668(2) very large numbers of ATA errors reported in the ATA error log;
1669(3) strange and impossible values for the ATA error log timestamps.
1670
1671.I samsung2
e9583e0c
GI
1672\- In some Samsung disks the number of ATA errors reported is byte swapped.
1673Enabling this option tells \fBsmartctl\fP to evaluate this quantity in
ee38a438
GI
1674byte-reversed order. An indication that your Samsung disk needs this
1675option is that the self-test log is printed correctly, but there are a
832b75ed
GG
1676very large number of errors in the SMART error log. This is because
1677the error count is byte swapped. Thus a disk with five errors
1678(0x0005) will appear to have 20480 errors (0x5000).
1679
a37e7145 1680.I samsung3
ee38a438
GI
1681\- Some Samsung disks (at least SP2514N with Firmware VF100-37) report
1682a self-test still in progress with 0% remaining when the test was already
1683completed. Enabling this option modifies the output of the self-test
a37e7145
GG
1684execution status (see options \'\-c\' or \'\-a\' above) accordingly.
1685
ee38a438
GI
1686.I xerrorlba
1687\- Fixes LBA byte ordering in Extended Comprehensive SMART error log.
d2e702cf 1688Some disks use little endian byte ordering instead of ATA register
ee38a438 1689ordering to specifiy the LBA addresses in the log entries.
832b75ed 1690
a37e7145
GG
1691.I swapid
1692\- Fixes byte swapped ATA identify strings (device name, serial number,
1693firmware version) returned by some buggy device drivers.
832b75ed
GG
1694.TP
1695.B \-P TYPE, \-\-presets=TYPE
2127e193
GI
1696[ATA only] Specifies whether \fBsmartctl\fP should use any preset options
1697that are available for this drive. By default, if the drive is recognized
832b75ed
GG
1698in the \fBsmartmontools\fP database, then the presets are used.
1699
832b75ed
GG
1700The argument
1701.I show
1702will show any preset options for your drive and the argument
1703.I showall
1704will show all known drives in the \fBsmartmontools\fP database, along
1705with their preset options. If there are no presets for your drive and
1706you think there should be (for example, a \-v or \-F option is needed
1707to get \fBsmartctl\fP to display correct values) then please contact
1708the \fBsmartmontools\fP developers so that this information can be
1709added to the \fBsmartmontools\fP database. Contact information is at the
1710end of this man page.
1711
1712The valid arguments to this option are:
1713
1714.I use
1715\- if a drive is recognized, then use the stored presets for it. This
ee38a438
GI
1716is the default. Note that presets will NOT override additional
1717Attribute interpretation (\'\-v N,something\') command-line options or
1718explicit \'\-F\' command-line options..
832b75ed
GG
1719
1720.I ignore
1721\- do not use presets.
1722
1723.I show
1724\- show if the drive is recognized in the database, and if so, its
1725presets, then exit.
1726
1727.I showall
1728\- list all recognized drives, and the presets that are set for them,
d008864d
GI
1729then exit. This also checks the drive database regular expressions
1730and settings for syntax errors.
832b75ed
GG
1731
1732The \'\-P showall\' option takes up to two optional arguments to
1733match a specific drive type and firmware version. The command:
1734.nf
1735 smartctl \-P showall
1736.fi
1737lists all entries, the command:
1738.nf
1739 smartctl \-P showall \'MODEL\'
1740.fi
1741lists all entries matching MODEL, and the command:
1742.nf
1743 smartctl \-P showall \'MODEL\' \'FIRMWARE\'
1744.fi
1745lists all entries for this MODEL and a specific FIRMWARE version.
2127e193
GI
1746.TP
1747.B \-B [+]FILE, \-\-drivedb=[+]FILE
cfbba5b9
GI
1748[ATA only] Read the drive database from FILE. The new database replaces
1749the built in database by default. If \'+\' is specified, then the new
1750entries prepend the built in entries.
2127e193 1751
d008864d
GI
1752Optional entries are read from the file
1753.\" %IF NOT OS Windows
1754\fB/usr/local/etc/smart_drivedb.h\fP
1755.\" %ENDIF NOT OS Windows
1756.\" %IF OS ALL
1757 (Windows: \fBEXEDIR/drivedb-add.h\fP)
1758.\" %ENDIF OS ALL
1759.\" %IF OS Windows
1760.\"! \fBEXEDIR/drivedb-add.h\fP.
1761.\" %ENDIF OS Windows
1762.\" %IF ENABLE_DRIVEDB
1763if this option is not specified.
1764
1765If
1766.\" %IF NOT OS Windows
1767\fB/usr/local/share/smartmontools/drivedb.h\fP
1768.\" %ENDIF NOT OS Windows
1769.\" %IF OS ALL
1770(Windows: \fBEXEDIR/drivedb.h\fP)
1771.\" %ENDIF OS ALL
1772.\" %IF OS Windows
1773.\"! \fBEXEDIR/drivedb.h\fP
1774.\" %ENDIF OS Windows
1775is present, the contents of this file is used instead of the built in table.
a86ec89e 1776.\" %IF ENABLE_UPDATE_SMART_DRIVEDB
d008864d
GI
1777
1778Run
1779.\" %IF NOT OS Windows
1780\fB/usr/local/sbin/update-smart-drivedb\fP
1781.\" %ENDIF NOT OS Windows
1782.\" %IF OS ALL
1783(Windows: \fBEXEDIR/update-smart-drivedb.exe\fP)
1784.\" %ENDIF OS ALL
1785.\" %IF OS Windows
1786.\"! \fBEXEDIR/update-smart-drivedb.exe\fP
1787.\" %ENDIF OS Windows
1788to update this file from the smartmontools SVN repository.
a86ec89e 1789.\" %ENDIF ENABLE_UPDATE_SMART_DRIVEDB
d008864d 1790.\" %ENDIF ENABLE_DRIVEDB
2127e193
GI
1791
1792The database files use the same C/C++ syntax that is used to initialize
1793the built in database array. C/C++ style comments are allowed.
1794Example:
1795
1796.nf
1797 /* Full entry: */
1798 {
1799 "Model family", // Info about model family/series.
1800 "MODEL1.*REGEX", // Regular expression to match model of device.
1801 "VERSION.*REGEX", // Regular expression to match firmware version(s).
1802 "Some warning", // Warning message.
1803 "\-v 9,minutes" // String of preset \-v and \-F options.
1804 },
1805 /* Minimal entry: */
1806 {
1807 "", // No model family/series info.
1808 "MODEL2.*REGEX", // Regular expression to match model of device.
1809 "", // All firmware versions.
1810 "", // No warning.
1811 "" // No options preset.
1812 },
e9583e0c
GI
1813 /* USB ID entry: */
1814 {
1815 "USB: Device; Bridge", // Info about USB device and bridge name.
1816 "0x1234:0xabcd", // Regular expression to match vendor:product ID.
1817 "0x0101", // Regular expression to match bcdDevice.
1818 "", // Not used.
1819 "\-d sat" // String with device type option.
1820 },
2127e193
GI
1821 /* ... */
1822.fi
1823
832b75ed 1824.TP
ee38a438 1825.B SMART RUN/ABORT OFFLINE TEST AND self-test OPTIONS:
832b75ed
GG
1826.TP
1827.B \-t TEST, \-\-test=TEST
1828Executes TEST immediately. The \'\-C\' option can be used in
1829conjunction with this option to run the short or long (and also for
ee38a438 1830ATA devices, selective or conveyance) self-tests in captive mode
832b75ed
GG
1831(known as "foreground mode" for SCSI devices). Note that only one
1832test type can be run at a time, so only one test type should be
1833specified per command line. Note also that if a computer is shutdown
ee38a438
GI
1834or power cycled during a self-test, no harm should result. The
1835self-test will either be aborted or will resume automatically.
1836
1837All \'\-t TEST\' commands can be given during normal system operation
1838unless captive mode (\'\-C\' option) is used.
1839A running self-test can, however, degrade performance of the drive.
1840Frequent I/O requests from the operating system increase the duration
1841of a test. These impacts may vary from device to device.
832b75ed 1842
ee38a438
GI
1843If a test failure occurs then the device may discontinue the testing
1844and report the result immediately.
1845
1846The valid arguments to this option are:
832b75ed
GG
1847
1848.I offline
e9583e0c 1849\- [ATA] runs SMART Immediate Offline Test. This immediately
832b75ed
GG
1850starts the test described above. This command can be given during
1851normal system operation. The effects of this test are visible only in
1852that it updates the SMART Attribute values, and if errors are
1853found they will appear in the SMART error log, visible with the \'\-l error\'
e9583e0c 1854option.
832b75ed
GG
1855
1856If the \'\-c\' option to \fBsmartctl\fP shows that the device has the
1857"Suspend Offline collection upon new command" capability then you can
1858track the progress of the Immediate Offline test using the \'\-c\'
1859option to \fBsmartctl\fP. If the \'\-c\' option show that the device
1860has the "Abort Offline collection upon new command" capability then
1861most commands will abort the Immediate Offline Test, so you should not
1862try to track the progress of the test with \'\-c\', as it will abort
1863the test.
1864
e9583e0c
GI
1865.I offline
1866\- [SCSI] runs the default self test in foreground. No entry is placed
1867in the self test log.
1868
832b75ed 1869.I short
e9583e0c 1870\- [ATA] runs SMART Short Self Test (usually under ten minutes).
832b75ed
GG
1871This command can be given during normal system operation (unless run in
1872captive mode \- see the \'\-C\' option below). This is a
1873test in a different category than the immediate or automatic offline
1874tests. The "Self" tests check the electrical and mechanical
1875performance as well as the read performance of the disk. Their
1876results are reported in the Self Test Error Log, readable with
1877the \'\-l selftest\' option. Note that on some disks the progress of the
ee38a438 1878self-test can be monitored by watching this log during the self-test; with other disks
832b75ed
GG
1879use the \'\-c\' option to monitor progress.
1880
e9583e0c 1881.I short
ee38a438 1882\- [SCSI] runs the "Background short" self-test.
e9583e0c 1883
832b75ed 1884.I long
e9583e0c 1885\- [ATA] runs SMART Extended Self Test (tens of minutes). This is a
832b75ed
GG
1886longer and more thorough version of the Short Self Test described
1887above. Note that this command can be given during normal
1888system operation (unless run in captive mode \- see the \'\-C\' option below).
1889
e9583e0c 1890.I long
ee38a438 1891\- [SCSI] runs the "Background long" self-test.
e9583e0c 1892
832b75ed 1893.I conveyance
2127e193 1894\- [ATA only] runs a SMART Conveyance Self Test (minutes). This
ee38a438
GI
1895self-test routine is intended to identify damage incurred during
1896transporting of the device. This self-test routine should take on the
832b75ed
GG
1897order of minutes to complete. Note that this command can be given
1898during normal system operation (unless run in captive mode \- see the
1899\'\-C\' option below).
1900
a37e7145 1901.I select,N\-M, select,N+SIZE
2127e193
GI
1902\- [ATA only] runs a SMART Selective Self Test, to test a \fBrange\fP
1903of disk Logical Block Addresses (LBAs), rather than the entire disk.
1904Each range of LBAs that is checked is called a "span" and is specified
1905by a starting LBA (N) and an ending LBA (M) with N less than or equal
1906to M. The range can also be specified as N+SIZE. A span at the end of
1907a disk can be specified by N\-\fBmax\fP.
a37e7145
GG
1908
1909For example the commands:
832b75ed 1910.nf
a86ec89e
GI
1911 smartctl \-t select,10\-20 /dev/sda
1912 smartctl \-t select,10+11 /dev/sda
832b75ed 1913.fi
a37e7145
GG
1914both runs a self test on one span consisting of LBAs ten to twenty
1915(inclusive). The command:
1916.nf
a86ec89e 1917 smartctl \-t select,100000000\-max /dev/sda
a37e7145
GG
1918.fi
1919run a self test from LBA 100000000 up to the end of the disk.
1920The \'\-t\' option can be given up to five times, to test
832b75ed
GG
1921up to five spans. For example the command:
1922.nf
a86ec89e 1923 smartctl \-t select,0\-100 \-t select,1000\-2000 /dev/sda
832b75ed
GG
1924.fi
1925runs a self test on two spans. The first span consists of 101 LBAs
1926and the second span consists of 1001 LBAs. Note that the spans can
1927overlap partially or completely, for example:
1928.nf
a86ec89e 1929 smartctl \-t select,0\-10 \-t select,5\-15 \-t select,10\-20 /dev/sda
832b75ed 1930.fi
ee38a438
GI
1931The results of the selective self-test can be obtained (both during
1932and after the test) by printing the SMART self-test log, using the
832b75ed
GG
1933\'\-l selftest\' option to smartctl.
1934
1935Selective self tests are particularly useful as disk capacities
1936increase: an extended self test (smartctl \-t long) can take several
ee38a438
GI
1937hours. Selective self-tests are helpful if (based on SYSLOG error
1938messages, previous failed self-tests, or SMART error log entries) you
832b75ed
GG
1939suspect that a disk is having problems at a particular range of
1940Logical Block Addresses (LBAs).
1941
ee38a438 1942Selective self-tests can be run during normal system operation (unless
832b75ed
GG
1943done in captive mode \- see the \'\-C\' option below).
1944
ee38a438 1945The following variants of the selective self-test command use spans based
a37e7145
GG
1946on the ranges from past tests already stored on the disk:
1947
1948.I select,redo[+SIZE]
2127e193
GI
1949\- [ATA only] redo the last SMART Selective Self Test using the same LBA
1950range. The starting LBA is identical to the LBA used by last test, same
1951for ending LBA unless a new span size is specified by optional +SIZE
1952argument.
a37e7145
GG
1953
1954For example the commands:
1955.nf
a86ec89e
GI
1956 smartctl \-t select,10\-20 /dev/sda
1957 smartctl \-t select,redo /dev/sda
1958 smartctl \-t select,redo+20 /dev/sda
a37e7145
GG
1959.fi
1960have the same effect as:
1961.nf
a86ec89e
GI
1962 smartctl \-t select,10\-20 /dev/sda
1963 smartctl \-t select,10\-20 /dev/sda
1964 smartctl \-t select,10\-29 /dev/sda
a37e7145
GG
1965.fi
1966
1967.I select,next[+SIZE]
2127e193
GI
1968\- [ATA only] runs a SMART Selective Self Test on the LBA range which
1969follows the range of the last test. The starting LBA is set to (ending
1970LBA +1) of the last test. A new span size may be specified by the
1971optional +SIZE argument.
a37e7145
GG
1972
1973For example the commands:
1974.nf
a86ec89e
GI
1975 smartctl \-t select,0\-999 /dev/sda
1976 smartctl \-t select,next /dev/sda
1977 smartctl \-t select,next+2000 /dev/sda
a37e7145
GG
1978.fi
1979have the same effect as:
1980.nf
a86ec89e
GI
1981 smartctl \-t select,0\-999 /dev/sda
1982 smartctl \-t select,1000\-1999 /dev/sda
1983 smartctl \-t select,2000\-3999 /dev/sda
a37e7145
GG
1984.fi
1985
1986If the last test ended at the last LBA of the disk, the new range starts
1987at LBA 0. The span size of the last span of a disk is adjusted such that
1988the total number of spans to check the full disk will not be changed
1989by future uses of \'\-t select,next\'.
1990
1991.I select,cont[+SIZE]
2127e193
GI
1992\- [ATA only] performs a \'redo\' (above) if the self test status reports
1993that the last test was aborted by the host. Otherwise it run the \'next\'
1994(above) test.
832b75ed
GG
1995
1996.I afterselect,on
ee38a438 1997\- [ATA only] perform an offline read scan after a Selective self-test
832b75ed
GG
1998has completed. This option must be used together with one or more of
1999the \fIselect,N\-M\fP options above. If the LBAs that have been
ee38a438 2000specified in the Selective self-test pass the test with no errors
832b75ed 2001found, then read scan the \fBremainder\fP of the disk. If the device
ee38a438 2002is powered-cycled while this read scan is in progress, the read scan
832b75ed
GG
2003will be automatically resumed after a time specified by the pending
2004timer (see below). The value of this option is preserved between
ee38a438 2005selective self-tests.
832b75ed
GG
2006
2007.I afterselect,off
2127e193 2008\- [ATA only] do not read scan the remainder of the disk after a
ee38a438 2009Selective self-test has completed. This option must be use together
832b75ed 2010with one or more of the \fIselect,N\-M\fP options above. The value of this
ee38a438 2011option is preserved between selective self-tests.
832b75ed
GG
2012
2013.I pending,N
2127e193 2014\- [ATA only] set the pending offline read scan timer to N minutes.
832b75ed 2015Here N is an integer in the range from 0 to 65535 inclusive. If the
ee38a438
GI
2016device is powered off during a read scan after a Selective self-test,
2017then resume the test automatically N minutes after power-up. This
832b75ed
GG
2018option must be use together with one or more of the \fIselect,N\-M\fP
2019options above. The value of this option is preserved between selective
ee38a438 2020self-tests.
832b75ed 2021
cfbba5b9
GI
2022.I vendor,N
2023\- [ATA only] issues the ATA command SMART EXECUTE OFF-LINE IMMEDIATE
2024with subcommand N in LBA LOW register. The subcommand is specified as
a7e8ffec 2025a hex value in the range 0x00 to 0xff. Subcommands 0x40-0x7e and
cfbba5b9 20260x90-0xff are reserved for vendor specific use, see table 61 of
a7e8ffec
GI
2027T13/1699-D Revision 6a (ATA8-ACS). Note that the subcommands
20280x00-0x04,0x7f,0x81-0x84 are supported by other smartctl options
2029(e.g. 0x01: \'\-t short\', 0x7f: \'\-X\', 0x82: \'\-C \-t long\').
cfbba5b9
GI
2030
2031\fBWARNING: Only run subcommands documented by the vendor of the
2032device.\fP
2033
d2e702cf 2034Example for some Intel SSDs only:
a7e8ffec
GI
2035The subcommand 0x40 (\'\-t vendor,0x40\') clears the timed workload
2036related SMART attributes (226, 227, 228). Note that the raw values of
2037these attributes are held at 65535 (0xffff) until the workload timer
2038reaches 60 minutes.
d008864d
GI
2039
2040.I force
ee38a438
GI
2041\- start new self-test even if another test is already running.
2042By default a running self-test will not be interrupted to begin another
d008864d 2043test.
832b75ed
GG
2044.TP
2045.B \-C, \-\-captive
ee38a438 2046[ATA] Runs self-tests in captive mode. This has no effect with \'\-t
e9583e0c 2047offline\' or if the \'\-t\' option is not used.
832b75ed
GG
2048
2049\fBWARNING: Tests run in captive mode may busy out the drive for the
2050length of the test. Only run captive tests on drives without any
2051mounted partitions!\fP
2052
ee38a438 2053[SCSI] Runs the self-test in "Foreground" mode.
832b75ed
GG
2054.TP
2055.B \-X, \-\-abort
ee38a438 2056Aborts non-captive SMART Self Tests. Note that this
832b75ed
GG
2057command will abort the Offline Immediate Test routine only if your
2058disk has the "Abort Offline collection upon new command" capability.
d2e702cf 2059
2127e193
GI
2060.SH ATA, SCSI command sets and SAT
2061In the past there has been a clear distinction between storage devices
2062that used the ATA and SCSI command sets. This distinction was often
2063reflected in their device naming and hardware. Now various SCSI
2064transports (e.g. SAS, FC and iSCSI) can interconnect to both SCSI
2065disks (e.g. FC and SAS) and ATA disks (especially SATA). USB and
2066IEEE 1394 storage devices use the SCSI command set externally but
2067almost always contain ATA or SATA disks (or flash). The storage
2068subsystems in some operating systems have started to remove the
2069distinction between ATA and SCSI in their device naming policies.
2070.PP
207199% of operations that an OS performs on a disk involve the SCSI INQUIRY,
2072READ CAPACITY, READ and WRITE commands, or their ATA equivalents. Since
2073the SCSI commands are slightly more general than their ATA equivalents,
2074many OSes are generating SCSI commands (mainly READ and WRITE) and
2075letting a lower level translate them to their ATA equivalents as the
2076need arises. An important note here is that "lower level" may be in
2077external equipment and hence outside the control of an OS.
2078.PP
2079SCSI to ATA Translation (SAT) is a standard (ANSI INCITS 431-2007) that
2080specifies how this translation is done. For the other 1% of operations
2081that an OS performs on a disk, SAT provides two options. First is an
2082optional ATA PASS-THROUGH SCSI command (there are two variants). The
2083second is a translation from the closest SCSI command. Most current
2084interest is in the "pass-through" option.
2085.PP
2086The relevance to smartmontools (and hence smartctl) is that its
2087interactions with disks fall solidly into the "1%" category. So even
2088if the OS can happily treat (and name) a disk as "SCSI", smartmontools
2089needs to detect the native command set and act accordingly.
2090As more storage manufacturers (including external SATA drives) comply
2091with SAT, smartmontools is able to automatically distinguish the native
2092command set of the device. In some cases the '\-d sat' option is needed
2093on the command line.
2094.PP
2095There are also virtual disks which typically have no useful information
2096to convey to smartmontools, but could conceivably in the future. An
2097example of a virtual disk is the OS's view of a RAID 1 box. There are
2098most likely two SATA disks inside a RAID 1 box. Addressing those SATA
2099disks from a distant OS is a challenge for smartmontools. Another
2100approach is running a tool like smartmontools inside the RAID 1 box (e.g.
2101a Network Attached Storage (NAS) box) and fetching the logs via a
2102browser.
d2e702cf 2103
832b75ed
GG
2104.SH EXAMPLES
2105.nf
a86ec89e 2106.B smartctl \-a /dev/sda
832b75ed 2107.fi
a86ec89e 2108Print a large amount of SMART information for drive /dev/sda .
2127e193
GI
2109.PP
2110.nf
a86ec89e 2111.B smartctl \-s off /dev/sdd
2127e193 2112.fi
a86ec89e 2113Disable SMART monitoring and data log collection on drive /dev/sdd .
832b75ed
GG
2114.PP
2115.nf
a86ec89e 2116.B smartctl \-\-smart=on \-\-offlineauto=on \-\-saveauto=on /dev/sda
832b75ed 2117.fi
a86ec89e 2118Enable SMART on drive /dev/sda, enable automatic offline
832b75ed 2119testing every four hours, and enable autosaving of
ee38a438 2120SMART Attributes. This is a good start-up line for your system\'s
832b75ed
GG
2121init files. You can issue this command on a running system.
2122.PP
2123.nf
a86ec89e 2124.B smartctl \-t long /dev/sdc
832b75ed 2125.fi
a86ec89e 2126Begin an extended self-test of drive /dev/sdc. You can issue this
ee38a438 2127command on a running system. The results can be seen in the self-test
832b75ed
GG
2128log visible with the \'\-l selftest\' option after it has completed.
2129.PP
2130.nf
a86ec89e 2131.B smartctl \-s on \-t offline /dev/sda
832b75ed
GG
2132.fi
2133Enable SMART on the disk, and begin an immediate offline test of
a86ec89e 2134drive /dev/sda. You can issue this command on a running system. The
832b75ed
GG
2135results are only used to update the SMART Attributes, visible
2136with the \'\-A\' option. If any device errors occur, they are logged to
2137the SMART error log, which can be seen with the \'\-l error\' option.
2138.PP
2139.nf
a86ec89e 2140.B smartctl \-A \-v 9,minutes /dev/sda
832b75ed 2141.fi
ee38a438 2142Shows the vendor Attributes, when the disk stores its power-on time
832b75ed
GG
2143internally in minutes rather than hours.
2144.PP
2145.nf
a86ec89e 2146.B smartctl \-q errorsonly \-H \-l selftest /dev/sda
832b75ed
GG
2147.fi
2148Produces output only if the device returns failing SMART status,
ee38a438 2149or if some of the logged self-tests ended with errors.
832b75ed
GG
2150.PP
2151.nf
a86ec89e 2152.B smartctl \-q silent \-a /dev/sda
832b75ed 2153.fi
a86ec89e 2154Examine all SMART data for device /dev/sda, but produce no
832b75ed
GG
2155printed output. You must use the exit status (the
2156.B $?
2157shell variable) to learn if any Attributes are out of bound, if the
2158SMART status is failing, if there are errors recorded in the
ee38a438 2159self-test log, or if there are errors recorded in the disk error log.
832b75ed
GG
2160.PP
2161.nf
2162.B smartctl \-a \-d 3ware,0 /dev/sda
2163.fi
2164Examine all SMART data for the first ATA disk connected to a 3ware
2165RAID controller card.
2166.PP
2167.nf
2168.B smartctl \-a \-d 3ware,0 /dev/twe0
2169.fi
2170Examine all SMART data for the first ATA disk connected to a 3ware
2171RAID 6000/7000/8000 controller card.
2172.PP
2173.nf
2174.B smartctl \-a \-d 3ware,0 /dev/twa0
2175.fi
cfbba5b9
GI
2176Examine all SMART data for the first ATA disk connected to a
21773ware RAID 9000 controller card.
2178.PP
2179.nf
2180.B smartctl \-a \-d 3ware,0 /dev/twl0
2181.fi
2182Examine all SMART data for the first SATA (not SAS) disk connected to a
21833ware RAID 9750 controller card.
832b75ed
GG
2184.PP
2185.nf
2186.B smartctl \-t short \-d 3ware,3 /dev/sdb
2187.fi
ee38a438 2188Start a short self-test on the fourth ATA disk connected to the 3ware RAID
832b75ed 2189controller card which is the second SCSI device /dev/sdb.
4d59bff9
GG
2190.PP
2191.nf
2127e193
GI
2192.B smartctl \-t long \-d areca,4 /dev/sg2
2193.fi
ee38a438 2194Start a long self-test on the fourth SATA disk connected to an Areca RAID
2127e193
GI
2195controller addressed by /dev/sg2.
2196.PP
2197.nf
2198.B smartctl \-a \-d hpt,1/3 /dev/sda (under Linux)
2199.B smartctl \-a \-d hpt,1/3 /dev/hptrr (under FreeBSD)
4d59bff9
GG
2200.fi
2201Examine all SMART data for the (S)ATA disk directly connected to the third channel of the
2202first HighPoint RocketRAID controller card.
2203.nf
2204.PP
2205.nf
2127e193
GI
2206.B smartctl \-t short \-d hpt,1/1/2 /dev/sda (under Linux)
2207.B smartctl \-t short \-d hpt,1/1/2 /dev/hptrr (under FreeBSD)
4d59bff9 2208.fi
ee38a438 2209Start a short self-test on the (S)ATA disk connected to second pmport on the
4d59bff9
GG
2210first channel of the first HighPoint RocketRAID controller card.
2211.PP
832b75ed 2212.nf
a86ec89e 2213.B smartctl \-t select,10\-100 \-t select,30\-300 \-t afterselect,on \-t pending,45 /dev/sda
832b75ed 2214.fi
ee38a438
GI
2215Run a selective self-test on LBAs 10 to 100 and 30 to 300. After the
2216these LBAs have been tested, read-scan the remainder of the disk. If the disk is
2217power-cycled during the read-scan, resume the scan 45 minutes after power to the
832b75ed
GG
2218device is restored.
2219.PP
ba59cff1
GG
2220.nf
2221.B smartctl \-a \-d cciss,0 /dev/cciss/c0d0
2222.fi
2223Examine all SMART data for the first SCSI disk connected to a cciss
2224RAID controller card.
d2e702cf 2225
a86ec89e
GI
2226.SH EXIT STATUS
2227The exit statuses of \fBsmartctl\fP are defined by a bitmask.
2228If all is well with the disk, the exit status (return value) of
832b75ed 2229\fBsmartctl\fP is 0 (all bits turned off). If a problem occurs, or an
ee38a438 2230error, potential error, or fault is detected, then a non-zero status
a86ec89e
GI
2231is returned. In this case, the eight different bits in the exit status
2232have the following meanings for ATA disks; some of these values
832b75ed
GG
2233may also be returned for SCSI disks.
2234.TP
2235.B Bit 0:
2236Command line did not parse.
2237.TP
2238.B Bit 1:
cfbba5b9
GI
2239Device open failed, device did not return an IDENTIFY DEVICE structure,
2240or device is in a low-power mode (see \'\-n\' option above).
832b75ed
GG
2241.TP
2242.B Bit 2:
d008864d
GI
2243Some SMART or other ATA command to the disk failed, or there was a checksum
2244error in a SMART data structure (see \'\-b\' option above).
832b75ed
GG
2245.TP
2246.B Bit 3:
2247SMART status check returned "DISK FAILING".
2248.TP
2249.B Bit 4:
a37e7145 2250We found prefail Attributes <= threshold.
832b75ed
GG
2251.TP
2252.B Bit 5:
2253SMART status check returned "DISK OK" but we found that some (usage
2254or prefail) Attributes have been <= threshold at some time in the
2255past.
2256.TP
2257.B Bit 6:
2258The device error log contains records of errors.
2259.TP
2260.B Bit 7:
ee38a438 2261The device self-test log contains records of errors.
cfbba5b9 2262[ATA only] Failed self-tests outdated by a newer successful extended
ee38a438 2263self-test are ignored.
d008864d 2264.PP
832b75ed 2265To test within the shell for whether or not the different bits are
d2e702cf
GI
2266turned on or off, you can use the following type of construction
2267(which should work with any POSIX compatible shell):
832b75ed
GG
2268.nf
2269.B smartstat=$(($? & 8))
2270.fi
2271This looks at only at bit 3 of the exit status
2272.B $?
2273(since 8=2^3). The shell variable
2274$smartstat will be nonzero if SMART status check returned "disk
2275failing" and zero otherwise.
d2e702cf
GI
2276.PP
2277This shell script prints all status bits:
d008864d 2278.nf
d2e702cf
GI
2279val=$?; mask=1
2280for i in 0 1 2 3 4 5 6 7; do
2281 echo "Bit $i: $(((val & mask) && 1))"
2282 mask=$((mask << 1))
d008864d
GI
2283done
2284.fi
2285
d2e702cf
GI
2286.\" %IF NOT OS Windows
2287.SH FILES
2288.TP
2289.B /usr/local/sbin/smartctl
2290full path of this executable.
2291.\" %IF ENABLE_DRIVEDB
2292.TP
2293.B /usr/local/share/smartmontools/drivedb.h
2294drive database (see \'\-B\' option).
2295.\" %ENDIF ENABLE_DRIVEDB
2296.TP
2297.B /usr/local/etc/smart_drivedb.h
2298optional local drive database (see \'\-B\' option).
2299
2300.\" %ENDIF NOT OS Windows
ee38a438 2301.SH AUTHORS
a86ec89e 2302\fBBruce Allen\fP (project initiator),
ee38a438 2303.br
a86ec89e 2304\fBChristian Franke\fP (project manager, Windows port and all sort of things),
ee38a438 2305.br
a86ec89e 2306\fBDouglas Gilbert\fP (SCSI subsystem),
ee38a438 2307.br
a86ec89e 2308\fBVolker Kuhlmann\fP (moderator of support and database mailing list),
d2e702cf 2309.br
a86ec89e 2310\fBGabriele Pohl\fP (wiki & development team support),
d2e702cf 2311.br
a86ec89e
GI
2312\fBAlex Samorukov\fP (FreeBSD port and more, new Trac wiki).
2313
2314Many other individuals have made contributions and corrections,
2315see AUTHORS, ChangeLog and repository files.
2316
2317The first smartmontools code was derived from the smartsuite package,
2318written by Michael Cornwell and Andre Hedrick.
2319
2320.SH REPORTING BUGS
2321To submit a bug report, create a ticket in smartmontools wiki:
d2e702cf 2322.br
a86ec89e 2323<\fBhttp://www.smartmontools.org/\fP>.
d2e702cf 2324.br
a86ec89e 2325Alternatively send the info to the smartmontools support mailing list:
d2e702cf 2326.br
a86ec89e 2327<\fBhttps://lists.sourceforge.net/lists/listinfo/smartmontools-support\fB>.
832b75ed 2328
d2e702cf 2329.SH SEE ALSO
a86ec89e
GI
2330\fBsmartd\fP(8).
2331.\" %IF ENABLE_UPDATE_SMART_DRIVEDB
2332.br
2333\fBupdate-smart-drivedb\fP(8).
2334.\" %ENDIF ENABLE_UPDATE_SMART_DRIVEDB
d2e702cf
GI
2335
2336.SH REFERENCES
2337Please see the following web site for more info:
a86ec89e 2338\fBhttp://www.smartmontools.org/\fP
d2e702cf 2339
832b75ed
GG
2340An introductory article about smartmontools is \fIMonitoring Hard
2341Disks with SMART\fP, by Bruce Allen, Linux Journal, January 2004,
ee38a438 2342pages 74-77. This is \fBhttp://www.linuxjournal.com/article/6983\fP
832b75ed
GG
2343online.
2344
2345If you would like to understand better how SMART works, and what it
2346does, a good place to start is with Sections 4.8 and 6.54 of the first
ee38a438 2347volume of the \'AT Attachment with Packet Interface-7\' (ATA/ATAPI-7)
e9583e0c
GI
2348specification Revision 4b. This documents the SMART functionality which the
2349\fBsmartmontools\fP utilities provide access to.
832b75ed 2350
ee38a438
GI
2351The functioning of SMART was originally defined by the SFF-8035i
2352revision 2 and the SFF-8055i revision 1.4 specifications. These are
e9583e0c
GI
2353publications of the Small Form Factors (SFF) Committee.
2354
2355Links to these and other documents may be found on the Links page of the
d2e702cf 2356\fBsmartmontools\fP Wiki at \fBhttp://www.smartmontools.org/wiki/Links\fP .
832b75ed 2357
a86ec89e
GI
2358.SH PACKAGE VERSION
2359CURRENT_SVN_VERSION CURRENT_SVN_DATE CURRENT_SVN_REV
2360.br
2361$Id: smartctl.8.in 4311 2016-04-27 21:03:01Z chrfranke $