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