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