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