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