]>
Commit | Line | Data |
---|---|---|
832b75ed | 1 | .ig |
a86ec89e | 2 | Copyright (C) 2002-10 Bruce Allen |
f9e10201 | 3 | Copyright (C) 2004-17 Christian Franke |
ee38a438 | 4 | |
f9e10201 | 5 | $Id: smartctl.8.in 4588 2017-11-04 15:15:32Z chrfranke $ |
ee38a438 GI |
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/ | |
832b75ed GG |
19 | |
20 | .. | |
f9e10201 JD |
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 ' | |
a86ec89e | 38 | .TH SMARTCTL 8 "CURRENT_SVN_DATE" "CURRENT_SVN_VERSION" "SMART Monitoring Tools" |
832b75ed GG |
39 | .SH NAME |
40 | \fBsmartctl\fP \- Control and Monitor Utility for SMART Disks | |
f9e10201 | 41 | .Sp |
832b75ed GG |
42 | .SH SYNOPSIS |
43 | .B smartctl [options] device | |
f9e10201 | 44 | .Sp |
832b75ed | 45 | .SH DESCRIPTION |
d008864d GI |
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 | |
ee38a438 GI |
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 | |
d2e702cf | 59 | ACS-3, ACS-2, ATA8-ACS, ATA/ATAPI-7 and earlier standards |
ee38a438 | 60 | (see \fBREFERENCES\fP below). |
f9e10201 | 61 | .PP |
832b75ed GG |
62 | \fBsmartctl\fP also provides support for polling TapeAlert messages |
63 | from SCSI tape drives and changers. | |
f9e10201 | 64 | .PP |
832b75ed | 65 | The user must specify the device to be controlled or interrogated as |
f9e10201 JD |
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 | |
2127e193 | 68 | option (for more information see the section on "ATA, SCSI command sets |
f9e10201 JD |
69 | and SAT" below). |
70 | Device paths are as follows: | |
d008864d | 71 | .\" %IF OS Linux |
832b75ed | 72 | .IP \fBLINUX\fP: 9 |
a86ec89e GI |
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 | |
2127e193 | 76 | 3ware controllers you may need \fB"/dev/sd[a\-z]"\fP or |
f9e10201 JD |
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 | |
2127e193 GI |
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 | |
ee38a438 GI |
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 | |
f9e10201 JD |
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. | |
a86ec89e GI |
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. | |
d008864d GI |
96 | .\" %ENDIF OS Linux |
97 | .\" %IF OS Darwin | |
832b75ed | 98 | .IP \fBDARWIN\fP: 9 |
f9e10201 JD |
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 | |
f4e463df GI |
109 | Use the OS X SAT SMART Driver to access SMART data on SAT capable USB and |
110 | Firewire devices (see INSTALL file). | |
d008864d GI |
111 | .\" %ENDIF OS Darwin |
112 | .\" %IF OS FreeBSD | |
832b75ed GG |
113 | .IP \fBFREEBSD\fP: 9 |
114 | Use the forms \fB"/dev/ad[0\-9]+"\fP for IDE/ATA | |
cfbba5b9 | 115 | devices and \fB"/dev/da[0\-9]+"\fP or \fB"/dev/pass[0\-9]+"\fP for SCSI devices. |
ee38a438 | 116 | For SATA devices on AHCI bus use \fB"/dev/ada[0\-9]+"\fP format. For HP Smart |
f9e10201 JD |
117 | Array RAID controllers, use \fB"/dev/ciss[0\-9]"\fP (and see the \fB\-d\fP |
118 | option, below). | |
d008864d GI |
119 | .\" %ENDIF OS FreeBSD |
120 | .\" %IF OS NetBSD OpenBSD | |
832b75ed GG |
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 | |
f9e10201 JD |
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 | |
832b75ed | 126 | your architecture. |
d008864d GI |
127 | .\" %ENDIF OS NetBSD OpenBSD |
128 | .\" %IF OS Solaris | |
832b75ed GG |
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. | |
d008864d | 132 | .\" %ENDIF OS Solaris |
d008864d | 133 | .\" %IF OS Windows Cygwin |
ee38a438 | 134 | .IP \fBWINDOWS\fP: 9 |
a37e7145 GG |
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"). | |
ee38a438 | 137 | Use \fB"/dev/sd[a\-z][a\-z]"\fP for "\\\\.\\PhysicalDrive[26\-...]". |
a37e7145 GG |
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 | |
f9e10201 | 141 | "\\\\.\\PhysicalDrive[0\-25]". |
a37e7145 GG |
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]". | |
f9e10201 | 144 | .Sp |
a37e7145 | 145 | Alternatively, drive letters \fB"X:"\fP or \fB"X:\\"\fP may be used to |
f9e10201 JD |
146 | specify the (\*(Aqbasic\*(Aq) disk behind a mounted partition. This does |
147 | not work with \*(Aqdynamic\*(Aq disks. | |
148 | .Sp | |
a37e7145 | 149 | For disks behind 3ware 9000 controllers use \fB"/dev/sd[a\-z],N"\fP where |
f9e10201 JD |
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. | |
9ebc753d | 153 | Alternatively, use \fB"/dev/tw_cli/cx/py"\fP for controller x, port y |
f9e10201 JD |
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 | |
9ebc753d | 158 | to parse CLI or 3DM output from standard input or clipboard. |
f9e10201 JD |
159 | The option \*(Aq\-d 3ware,N\*(Aq is not necessary on Windows. |
160 | .Sp | |
f4e463df GI |
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]:". | |
f9e10201 | 164 | .Sp |
a86ec89e | 165 | For SATA or SAS disks behind an Areca controller use |
f9e10201 JD |
166 | \fB"/dev/arcmsr[0\-9]"\fP, see \*(Aq\-d areca,N[/E]\*(Aq below. |
167 | .Sp | |
a86ec89e GI |
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]:". | |
f9e10201 JD |
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 | |
832b75ed | 180 | The prefix \fB"/dev/"\fP is optional. |
d008864d | 181 | .\" %ENDIF OS Windows Cygwin |
d008864d | 182 | .\" %IF OS OS2 |
832b75ed | 183 | .IP \fBOS/2,eComStation\fP: 9 |
f9e10201 JD |
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. | |
d008864d | 187 | .\" %ENDIF OS OS2 |
832b75ed | 188 | .PP |
f9e10201 | 189 | if \*(Aq\-\*(Aq is specified as the device path, \fBsmartctl\fP reads and |
a37e7145 | 190 | interprets it's own debug output from standard input. |
f9e10201 JD |
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. | |
a37e7145 | 195 | .PP |
832b75ed GG |
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 | |
4d59bff9 | 198 | (hexadecimal). To distinguish them, the base 16 values are always |
f9e10201 JD |
199 | displayed with a leading \fB"0x"\fP, for example: "0xff". |
200 | This man page follows the same convention. | |
201 | .Sp | |
832b75ed | 202 | .SH OPTIONS |
832b75ed GG |
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. | |
f9e10201 | 206 | .Sp |
832b75ed GG |
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 | |
2127e193 GI |
214 | Prints version, copyright, license, home page and SVN revision |
215 | information for your copy of \fBsmartctl\fP to STDOUT and then exits. | |
832b75ed GG |
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 | |
f9e10201 | 222 | mode) print current user drive capacity in bytes. (If drive is has a |
832b75ed GG |
223 | user protected area reserved, or is "clipped", this may be smaller |
224 | than the potential maximum drive capacity.) Indicates if the drive is | |
f9e10201 JD |
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] | |
a86ec89e GI |
232 | [NEW EXPERIMENTAL SMARTCTL FEATURE] |
233 | For NVMe devices the information is obtained from the Identify Controller | |
234 | and the Identify Namespace data structure. | |
f9e10201 | 235 | .\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin |
832b75ed | 236 | .TP |
ee38a438 | 237 | .B \-\-identify[=[w][nvb]] |
d2e702cf | 238 | [ATA only] Prints an annotated table of the IDENTIFY DEVICE data. |
ee38a438 GI |
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 | |
f9e10201 JD |
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 | |
ee38a438 GI |
248 | the longest output. |
249 | .TP | |
832b75ed GG |
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 | |
f9e10201 JD |
254 | .br |
255 | \*(Aq\-H \-i \-c \-A \-l error \-l selftest \-l selective\*(Aq | |
256 | .br | |
832b75ed | 257 | and for SCSI, this is equivalent to |
f9e10201 JD |
258 | .br |
259 | \*(Aq\-H \-i \-A \-l error \-l selftest\*(Aq. | |
260 | .br | |
261 | .\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin | |
a86ec89e | 262 | For NVMe, this is equivalent to |
f9e10201 JD |
263 | .br |
264 | \*(Aq\-H \-i \-c \-A \-l error\*(Aq. | |
265 | .br | |
266 | .\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin | |
2127e193 GI |
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 | |
f9e10201 JD |
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 | |
2127e193 | 278 | and for SCSI, this is equivalent to |
f9e10201 JD |
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 | |
a86ec89e | 283 | For NVMe, this is equivalent to |
f9e10201 JD |
284 | .br |
285 | \*(Aq\-H \-i \-c \-A \-l error\*(Aq. | |
286 | .\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin | |
e9583e0c GI |
287 | .TP |
288 | .B \-\-scan | |
289 | Scans for devices and prints each device name, device type and protocol | |
f9e10201 | 290 | ([ATA] or [SCSI]) info. May be used in conjunction with \*(Aq\-d TYPE\*(Aq |
e9583e0c GI |
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 | |
f9e10201 JD |
298 | to autodetection (see also \*(Aq\-d test\*(Aq). |
299 | .Sp | |
cfbba5b9 | 300 | This option can be used to create a draft \fBsmartd.conf\fP file. |
f9e10201 | 301 | All options after \*(Aq\-\-\*(Aq are appended to each output line. |
cfbba5b9 | 302 | For example: |
f9e10201 | 303 | .Vb 1 |
ee38a438 | 304 | smartctl \-\-scan\-open \-\- \-a \-W 4,45,50 \-m admin@work > smartd.conf |
f9e10201 JD |
305 | .Ve |
306 | .Sp | |
a86ec89e | 307 | [NEW EXPERIMENTAL SMARTCTL FEATURE] |
f9e10201 JD |
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. | |
d008864d GI |
310 | .TP |
311 | .B \-g NAME, \-\-get=NAME | |
f9e10201 JD |
312 | Get non-SMART device settings. See \*(Aq\-s, \-\-set\*(Aq below for further |
313 | info. | |
314 | .Sp | |
832b75ed | 315 | .TP |
ee38a438 | 316 | .B RUN-TIME BEHAVIOR OPTIONS: |
832b75ed GG |
317 | .TP |
318 | .B \-q TYPE, \-\-quietmode=TYPE | |
f9e10201 | 319 | Specifies that \fBsmartctl\fP should run in one of the quiet modes |
832b75ed | 320 | described here. The valid arguments to this option are: |
f9e10201 | 321 | .Sp |
832b75ed | 322 | .I errorsonly |
f9e10201 | 323 | \- only print: For the \*(Aq\-l error\*(Aq option, if nonzero, the number |
ee38a438 | 324 | of errors recorded in the SMART error log and the power-on time when |
f9e10201 JD |
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 | |
832b75ed GG |
331 | .I silent |
332 | \- print no output. The only way to learn about what was found is to | |
a86ec89e | 333 | use the exit status of \fBsmartctl\fP (see EXIT STATUS below). |
f9e10201 | 334 | .Sp |
a37e7145 GG |
335 | .I noserial |
336 | \- Do not print the serial number of the device. | |
832b75ed GG |
337 | .TP |
338 | .B \-d TYPE, \-\-device=TYPE | |
cfbba5b9 GI |
339 | Specifies the type of the device. |
340 | The valid arguments to this option are: | |
f9e10201 | 341 | .Sp |
cfbba5b9 | 342 | .I auto |
ee38a438 | 343 | \- attempt to guess the device type from the device name or from |
cfbba5b9 GI |
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. | |
f9e10201 | 347 | .Sp |
cfbba5b9 | 348 | .I test |
f9e10201 | 349 | \- prints the guessed TYPE, then opens the device and prints the |
cfbba5b9 GI |
350 | (possibly changed) TYPE name and then exists without performing |
351 | any further commands. | |
f9e10201 | 352 | .Sp |
cfbba5b9 GI |
353 | .I ata |
354 | \- the device type is ATA. This prevents | |
355 | \fBsmartctl\fP | |
356 | from issuing SCSI commands to an ATA device. | |
f9e10201 | 357 | .Sp |
d008864d | 358 | .\" %IF NOT OS Darwin |
cfbba5b9 GI |
359 | .I scsi |
360 | \- the device type is SCSI. This prevents | |
361 | \fBsmartctl\fP | |
362 | from issuing ATA commands to a SCSI device. | |
f9e10201 | 363 | .Sp |
a86ec89e | 364 | .\" %ENDIF NOT OS Darwin |
f9e10201 | 365 | .\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin |
a86ec89e | 366 | .I nvme[,NSID] |
f9e10201 | 367 | \- [NEW EXPERIMENTAL SMARTCTL FEATURE] |
a86ec89e GI |
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. | |
f9e10201 JD |
373 | .Sp |
374 | .\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin | |
a86ec89e | 375 | .\" %IF NOT OS Darwin |
d008864d | 376 | .I sat[,auto][,N] |
cfbba5b9 | 377 | \- the device type is SCSI to ATA Translation (SAT). |
f9e10201 JD |
378 | This is for ATA disks that have a SCSI to ATA Translation Layer (SATL) |
379 | between the disk and the operating system. | |
4d59bff9 | 380 | SAT defines two ATA PASS THROUGH SCSI commands, one 12 bytes long and |
cfbba5b9 | 381 | the other 16 bytes long. The default is the 16 byte variant which can be |
f9e10201 JD |
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 "). | |
d008864d | 386 | Otherwise device type SCSI (for SCSI/SAS disks) is used. |
f9e10201 | 387 | .Sp |
cfbba5b9 GI |
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 | |
f9e10201 | 392 | with \*(Aq\-d usbcypress,0xN\*(Aq, where N is the scsi operation code, |
2127e193 | 393 | you're running the risk of damage to the device or filesystems on it. |
f9e10201 | 394 | .Sp |
ee38a438 GI |
395 | .I usbjmicron[,p][,x][,PORT] |
396 | \- this device type is for SATA disks that are behind a JMicron USB to | |
f9e10201 JD |
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 | |
cfbba5b9 GI |
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. | |
f9e10201 | 407 | CAUTION: Specifying \*(Aq,x\*(Aq for a device which does not support it results |
cfbba5b9 GI |
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. | |
f9e10201 | 410 | .Sp |
ee38a438 | 411 | The Prolific PL2507/3507 USB bridges with older firmware support a pass-through |
f9e10201 | 412 | command similar to JMicron and work with \*(Aq\-d usbjmicron,0\*(Aq. |
ee38a438 | 413 | Newer Prolific firmware requires a modified command which can be selected by |
f9e10201 | 414 | \*(Aq\-d usbjmicron,p\*(Aq. |
ee38a438 | 415 | Note that this does not yet support the SMART status command. |
f9e10201 | 416 | .Sp |
a86ec89e | 417 | .I usbprolific |
f9e10201 JD |
418 | \- this device type is for SATA disks that are behind a Prolific |
419 | PL2571/2771/2773/2775 USB to SATA bridge. | |
420 | .Sp | |
cfbba5b9 GI |
421 | .I usbsunplus |
422 | \- this device type is for SATA disks that are behind a SunplusIT USB to SATA | |
423 | bridge. | |
f9e10201 | 424 | .Sp |
d008864d GI |
425 | .\" %ENDIF NOT OS Darwin |
426 | .\" %IF OS Linux | |
cfbba5b9 GI |
427 | .I marvell |
428 | \- [Linux only] interact with SATA disks behind Marvell chip-set | |
429 | controllers (using the Marvell rather than libata driver). | |
f9e10201 | 430 | .Sp |
cfbba5b9 GI |
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: | |
f9e10201 | 436 | .br |
2127e193 | 437 | \fBsmartctl \-a \-d megaraid,2 /dev/sda\fP |
f9e10201 | 438 | .br |
2127e193 | 439 | \fBsmartctl \-a \-d megaraid,0 /dev/sdb\fP |
f9e10201 | 440 | .br |
ee38a438 | 441 | \fBsmartctl \-a \-d megaraid,0 /dev/bus/0\fP |
f9e10201 | 442 | .br |
cfbba5b9 | 443 | This interface will also work for Dell PERC controllers. |
ee38a438 GI |
444 | It is possible to set RAID device name as /dev/bus/N, where N is a SCSI bus |
445 | number. | |
f9e10201 | 446 | .Sp |
ee38a438 | 447 | The following entry in /proc/devices must exist: |
d2e702cf | 448 | .br |
ee38a438 | 449 | For PERC2/3/4 controllers: \fBmegadevN\fP |
d2e702cf | 450 | .br |
ee38a438 | 451 | For PERC5/6 controllers: \fBmegaraid_sas_ioctlN\fP |
f9e10201 | 452 | .Sp |
a86ec89e GI |
453 | .\" %ENDIF OS Linux |
454 | .\" %IF OS Linux Windows Cygwin | |
d2e702cf | 455 | .I aacraid,H,L,ID |
f9e10201 JD |
456 | \- [Linux, Windows and Cygwin only] the device consists of one or more |
457 | SCSI/SAS disks connected to an AacRaid controller. | |
d2e702cf GI |
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: | |
f9e10201 | 461 | .br |
a86ec89e | 462 | \fBsmartctl \-a \-d aacraid,0,0,2 /dev/sda\fP |
f9e10201 | 463 | .br |
a86ec89e | 464 | \fBsmartctl \-a \-d aacraid,1,0,4 /dev/sdb\fP |
f9e10201 | 465 | .Sp |
a86ec89e GI |
466 | .\" %ENDIF OS Linux Windows Cygwin |
467 | .\" %IF OS Linux | |
468 | On Linux, the following entry in /proc/devices must exist: \fBaac\fP. | |
d2e702cf | 469 | Character device nodes /dev/aacH (H=Host number) are created if required. |
f9e10201 | 470 | .Sp |
d008864d | 471 | .\" %ENDIF OS Linux |
a86ec89e | 472 | .\" %IF OS Windows Cygwin |
f9e10201 JD |
473 | On Windows, the device name parameter /dev/sdX is ignored if |
474 | \*(Aq\-d aacraid\*(Aq is specified. | |
475 | .Sp | |
a86ec89e | 476 | .\" %ENDIF OS Windows Cygwin |
d008864d | 477 | .\" %IF OS FreeBSD Linux |
cfbba5b9 GI |
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: | |
f9e10201 | 484 | .br |
ee38a438 | 485 | \fBsmartctl \-a \-d 3ware,2 /dev/sda\fP [Linux only] |
f9e10201 | 486 | .br |
832b75ed | 487 | \fBsmartctl \-a \-d 3ware,0 /dev/twe0\fP |
f9e10201 | 488 | .br |
832b75ed | 489 | \fBsmartctl \-a \-d 3ware,1 /dev/twa0\fP |
f9e10201 | 490 | .br |
ee38a438 | 491 | \fBsmartctl \-a \-d 3ware,1 /dev/twl0\fP [Linux only] |
f9e10201 | 492 | .br |
ee38a438 | 493 | \fBsmartctl \-a \-d 3ware,1 /dev/tws0\fP [FreeBSD only] |
f9e10201 JD |
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 | |
ee38a438 | 503 | Note that if the special character device nodes /dev/tw[ls]?, /dev/twa? |
cfbba5b9 | 504 | and /dev/twe? do not exist, or exist with the incorrect major or minor |
f9e10201 JD |
505 | numbers, smartctl will recreate them on the fly. |
506 | .Sp | |
d008864d | 507 | .\" %ENDIF OS FreeBSD Linux |
f4e463df | 508 | .\" %IF OS FreeBSD Linux Windows Cygwin |
cfbba5b9 | 509 | .I areca,N |
f9e10201 JD |
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. | |
f4e463df | 514 | .\" %ENDIF OS FreeBSD Linux Windows Cygwin |
d008864d GI |
515 | .\" %IF OS Linux |
516 | On Linux use syntax such as: | |
f9e10201 | 517 | .br |
2127e193 | 518 | \fBsmartctl \-a \-d areca,2 /dev/sg2\fP |
f9e10201 | 519 | .br |
2127e193 | 520 | \fBsmartctl \-a \-d areca,3 /dev/sg3\fP |
f9e10201 | 521 | .br |
d008864d GI |
522 | .\" %ENDIF OS Linux |
523 | .\" %IF OS FreeBSD | |
524 | On FreeBSD use syntax such as: | |
f9e10201 | 525 | .br |
d008864d | 526 | \fBsmartctl \-a \-d areca,2 /dev/arcmsr1\fP |
f9e10201 | 527 | .br |
d008864d | 528 | \fBsmartctl \-a \-d areca,3 /dev/arcmsr2\fP |
f9e10201 | 529 | .br |
d008864d | 530 | .\" %ENDIF OS FreeBSD |
f4e463df | 531 | .\" %IF OS Windows Cygwin |
a86ec89e | 532 | On Windows and Cygwin use syntax such as: |
f9e10201 | 533 | .br |
f4e463df | 534 | \fBsmartctl \-a \-d areca,2 /dev/arcmsr0\fP |
f9e10201 | 535 | .br |
f4e463df | 536 | \fBsmartctl \-a \-d areca,3 /dev/arcmsr1\fP |
f9e10201 | 537 | .br |
f4e463df GI |
538 | .\" %ENDIF OS Windows Cygwin |
539 | .\" %IF OS FreeBSD Linux Windows Cygwin | |
f9e10201 JD |
540 | The first line above addresses the second disk on the first Areca RAID |
541 | controller. | |
cfbba5b9 | 542 | The second line addresses the third disk on the second Areca RAID |
f9e10201 | 543 | controller. |
f4e463df | 544 | .\" %ENDIF OS FreeBSD Linux Windows Cygwin |
d008864d | 545 | .\" %IF OS Linux |
f4e463df | 546 | To help identify the correct device on Linux, use the command: |
f9e10201 | 547 | .br |
2127e193 | 548 | \fBcat /proc/scsi/sg/device_hdr /proc/scsi/sg/devices\fP |
f9e10201 | 549 | .br |
2127e193 | 550 | to show the SCSI generic devices (one per line, starting with |
cfbba5b9 | 551 | /dev/sg0). The correct SCSI generic devices to address for |
2127e193 GI |
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. | |
d008864d | 555 | .\" %ENDIF OS Linux |
f4e463df | 556 | .\" %IF OS FreeBSD Linux Windows Cygwin |
f9e10201 | 557 | .Sp |
2127e193 | 558 | Important: the Areca controller must have firmware version 1.46 or |
cfbba5b9 | 559 | later. Lower-numbered firmware versions will give (harmless) SCSI |
2127e193 | 560 | error messages and no SMART information. |
f9e10201 | 561 | .Sp |
f4e463df | 562 | .I areca,N/E |
a86ec89e GI |
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. | |
f4e463df GI |
565 | The integer N (range 1 to 128) denotes the channel (slot) and E (range |
566 | 1 to 8) denotes the enclosure. | |
ee38a438 | 567 | Important: This requires Areca SAS controller firmware version 1.51 or later. |
f9e10201 | 568 | .Sp |
f4e463df | 569 | .\" %ENDIF OS FreeBSD Linux Windows Cygwin |
d008864d | 570 | .\" %IF OS FreeBSD Linux |
cfbba5b9 | 571 | .I cciss,N |
f9e10201 JD |
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 | |
ee38a438 GI |
577 | To look at disks behind HP Smart Array controllers, use syntax |
578 | such as: | |
579 | .\" %ENDIF OS FreeBSD Linux | |
580 | .\" %IF OS Linux | |
f9e10201 | 581 | .br |
ee38a438 | 582 | \fBsmartctl \-a \-d cciss,0 /dev/cciss/c0d0\fP (cciss driver under Linux) |
f9e10201 | 583 | .br |
ee38a438 | 584 | \fBsmartctl \-a \-d cciss,0 /dev/sg2\fP (hpsa or hpahcisr drivers under Linux) |
ee38a438 GI |
585 | .\" %ENDIF OS Linux |
586 | .\" %IF OS FreeBSD | |
f9e10201 | 587 | .br |
ee38a438 | 588 | \fBsmartctl \-a \-d cciss,0 /dev/ciss0\fP (under FreeBSD) |
ee38a438 GI |
589 | .\" %ENDIF OS FreeBSD |
590 | .\" %IF OS FreeBSD Linux | |
f9e10201 | 591 | .Sp |
cfbba5b9 GI |
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 | |
3d17a85c | 597 | from 1 to 4 inclusive, M are from 1 to 128 inclusive and N from 1 to 4 |
cfbba5b9 GI |
598 | if PMPort available. And also these values are limited by the model |
599 | of the HighPoint RocketRAID controller. | |
600 | Use syntax such as: | |
d008864d GI |
601 | .\" %ENDIF OS FreeBSD Linux |
602 | .\" %IF OS Linux | |
f9e10201 | 603 | .br |
2127e193 | 604 | \fBsmartctl \-a \-d hpt,1/3 /dev/sda\fP (under Linux) |
f9e10201 | 605 | .br |
2127e193 | 606 | \fBsmartctl \-a \-d hpt,1/2/3 /dev/sda\fP (under Linux) |
d008864d GI |
607 | .\" %ENDIF OS Linux |
608 | .\" %IF OS FreeBSD | |
f9e10201 | 609 | .br |
2127e193 | 610 | \fBsmartctl \-a \-d hpt,1/3 /dev/hptrr\fP (under FreeBSD) |
f9e10201 | 611 | .br |
2127e193 | 612 | \fBsmartctl \-a \-d hpt,1/2/3 /dev/hptrr\fP (under FreeBSD) |
d008864d GI |
613 | .\" %ENDIF OS FreeBSD |
614 | .\" %IF OS FreeBSD Linux | |
f9e10201 | 615 | .br |
a37e7145 | 616 | Note that the /dev/sda\-z form should be the device node which stands for |
2127e193 GI |
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, | |
cfbba5b9 | 619 | /dev/hptrr, /dev/hptmv6). |
d008864d | 620 | .\" %ENDIF OS FreeBSD Linux |
f9e10201 JD |
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 | |
832b75ed GG |
637 | .TP |
638 | .B \-T TYPE, \-\-tolerance=TYPE | |
2127e193 | 639 | [ATA only] Specifies how tolerant \fBsmartctl\fP should be of ATA and SMART |
f9e10201 JD |
640 | command failures. |
641 | .Sp | |
832b75ed | 642 | The behavior of \fBsmartctl\fP depends upon whether the command is |
f9e10201 | 643 | "\fBoptional\fP" or "\fBmandatory\fP". Here "\fBmandatory\fP" means |
ee38a438 | 644 | "required by the ATA Specification if the device implements |
832b75ed | 645 | the SMART command set" and "\fBoptional\fP" means "not required by the |
ee38a438 | 646 | ATA Specification even if the device implements the SMART |
832b75ed GG |
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. | |
f9e10201 | 650 | .Sp |
832b75ed | 651 | The valid arguments to this option are: |
f9e10201 | 652 | .Sp |
832b75ed GG |
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 | |
f9e10201 | 657 | commands doesn't cause an error. This can result in misleading |
832b75ed GG |
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. | |
f9e10201 | 661 | .Sp |
832b75ed GG |
662 | .I conservative |
663 | \- exit on failure of any \fBoptional\fP SMART command. | |
f9e10201 | 664 | .Sp |
832b75ed GG |
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 | |
ee38a438 GI |
669 | this option can lead to messages like "Feature X not supported", |
670 | followed shortly by "Feature X enable failed". In a few | |
832b75ed | 671 | such cases, contrary to the final message, Feature X \fBis\fP enabled. |
f9e10201 | 672 | .Sp |
832b75ed | 673 | .I verypermissive |
f9e10201 | 674 | \- equivalent to giving a large number of \*(Aq\-T permissive\*(Aq options: |
832b75ed GG |
675 | ignore failures of \fBany number\fP of \fBmandatory\fP SMART commands. |
676 | Please see the note above. | |
832b75ed GG |
677 | .TP |
678 | .B \-b TYPE, \-\-badsum=TYPE | |
2127e193 GI |
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 | |
ee38a438 | 681 | Self-Test Log Structure, (3) SMART Attribute Value Structure, (4) SMART |
832b75ed | 682 | Attribute Threshold Structure, or (5) ATA Error Log Structure. |
f9e10201 | 683 | .Sp |
832b75ed | 684 | The valid arguments to this option are: |
f9e10201 | 685 | .Sp |
832b75ed GG |
686 | .I warn |
687 | \- report the incorrect checksum but carry on in spite of it. This is the | |
688 | default. | |
f9e10201 | 689 | .Sp |
832b75ed GG |
690 | .I exit |
691 | \- exit \fBsmartctl\fP. | |
f9e10201 | 692 | .Sp |
832b75ed GG |
693 | .I ignore |
694 | \- continue silently without issuing a warning. | |
832b75ed GG |
695 | .TP |
696 | .B \-r TYPE, \-\-report=TYPE | |
697 | Intended primarily to help \fBsmartmontools\fP developers understand | |
ee38a438 | 698 | the behavior of \fBsmartmontools\fP on non-conforming or poorly |
832b75ed GG |
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: | |
f9e10201 | 705 | .Sp |
832b75ed GG |
706 | .I ioctl |
707 | \- report all ioctl() transactions. | |
f9e10201 | 708 | .Sp |
832b75ed GG |
709 | .I ataioctl |
710 | \- report only ioctl() transactions with ATA devices. | |
f9e10201 | 711 | .Sp |
832b75ed | 712 | .I scsiioctl |
f9e10201 JD |
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 | |
a86ec89e | 719 | .I nvmeioctl |
f9e10201 | 720 | \- [NEW EXPERIMENTAL SMARTCTL FEATURE] |
a86ec89e | 721 | report only ioctl() transactions with NVMe devices. |
f9e10201 JD |
722 | .Sp |
723 | .\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin | |
832b75ed GG |
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 | |
f9e10201 | 726 | the integer with no spaces. For example, |
832b75ed | 727 | .I ataioctl,2 |
f9e10201 JD |
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. | |
a37e7145 GG |
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 | |
f9e10201 JD |
736 | behaviour. |
737 | This is does not work for SCSI devices yet. | |
4d59bff9 | 738 | .TP |
f9e10201 | 739 | .B \-n POWERMODE[,STATUS], \-\-nocheck=POWERMODE[,STATUS] |
2127e193 | 740 | [ATA only] Specifies if \fBsmartctl\fP should exit before performing any |
f9e10201 JD |
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 | |
cfbba5b9 | 745 | Note: If this option is used it may also be necessary to specify the device |
f9e10201 | 746 | type with the \*(Aq\-d\*(Aq option. Otherwise the device may spin up due to |
cfbba5b9 | 747 | commands issued during device type autodetection. |
f9e10201 JD |
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 | |
cfbba5b9 | 761 | The valid arguments to this option are: |
f9e10201 | 762 | .Sp |
4d59bff9 | 763 | .I never |
f9e10201 | 764 | \- check the device always, but print the power mode if \*(Aq\-i\*(Aq is |
4d59bff9 | 765 | specified. |
f9e10201 JD |
766 | .Sp |
767 | .I sleep[,STATUS] | |
4d59bff9 | 768 | \- check the device unless it is in SLEEP mode. |
f9e10201 JD |
769 | .Sp |
770 | .I standby[,STATUS] | |
4d59bff9 GG |
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. | |
f9e10201 JD |
774 | .Sp |
775 | .I idle[,STATUS] | |
4d59bff9 GG |
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. | |
f9e10201 | 779 | .Sp |
832b75ed GG |
780 | .TP |
781 | .B SMART FEATURE ENABLE/DISABLE COMMANDS: | |
782 | .IP | |
f9e10201 | 783 | .B Note: |
832b75ed | 784 | if multiple options are used to both enable and disable a |
f9e10201 | 785 | feature, then |
832b75ed GG |
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 | |
f9e10201 | 792 | .B \-s VALUE, \-\-smart=VALUE |
832b75ed | 793 | Enables or disables SMART on device. The valid arguments to |
f9e10201 JD |
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. | |
832b75ed GG |
802 | .TP |
803 | .B \-o VALUE, \-\-offlineauto=VALUE | |
2127e193 | 804 | [ATA only] Enables or disables SMART automatic offline test, which scans the |
f9e10201 JD |
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 | |
832b75ed GG |
809 | Note that the SMART automatic offline test command is listed as |
810 | "Obsolete" in every version of the ATA and ATA/ATAPI Specifications. | |
ee38a438 | 811 | It was originally part of the SFF-8035i Revision 2.0 specification, |
832b75ed | 812 | but was never part of any ATA specification. However it is |
d2e702cf | 813 | implemented and used by many vendors. |
832b75ed | 814 | You can tell if automatic offline testing is supported by seeing if |
f9e10201 JD |
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 | |
832b75ed GG |
819 | SMART provides \fBthree\fP basic categories of testing. The |
820 | \fBfirst\fP category, called "online" testing, has no effect on the | |
f9e10201 JD |
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, | |
832b75ed GG |
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 | |
ee38a438 | 829 | practice it has little effect. Note that a one-time offline test can |
832b75ed | 830 | also be carried out immediately upon receipt of a user command. See |
f9e10201 | 831 | the \*(Aq\-t offline\*(Aq option below, which causes a one-time offline test |
832b75ed | 832 | to be carried out immediately. |
f9e10201 | 833 | .Sp |
ee38a438 | 834 | The choice (made by the SFF-8035i and ATA specification authors) of |
832b75ed GG |
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. | |
f9e10201 | 839 | .Sp |
832b75ed GG |
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 | |
f9e10201 JD |
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 | |
ee38a438 | 848 | Some SMART attribute values are updated only during off-line data |
832b75ed | 849 | collection activities; the rest are updated during normal operation of |
ee38a438 | 850 | the device or during both normal operation and off-line testing. The |
f9e10201 | 851 | Attribute value table produced by the \*(Aq\-A\*(Aq option indicates this in |
832b75ed GG |
852 | the UPDATED column. Attributes of the first type are labeled |
853 | "Offline" and Attributes of the second type are labeled "Always". | |
f9e10201 | 854 | .Sp |
832b75ed | 855 | The \fBthird\fP category of testing (and the \fIonly\fP category for |
f9e10201 | 856 | which the word \*(Aqtesting\*(Aq is really an appropriate choice) is "self" |
832b75ed | 857 | testing. This third type of test is only performed (immediately) when |
f9e10201 JD |
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 | |
832b75ed | 862 | Any errors detected in the self testing will be shown in the |
f9e10201 | 863 | SMART self-test log, which can be examined using the \*(Aq\-l selftest\*(Aq |
832b75ed | 864 | option. |
f9e10201 | 865 | .Sp |
832b75ed | 866 | \fBNote:\fP in this manual page, the word \fB"Test"\fP is used in |
f9e10201 | 867 | connection with the second category just described, e.g.\& for the |
ee38a438 | 868 | "offline" testing. The words \fB"Self-test"\fP are used in |
832b75ed GG |
869 | connection with the third category. |
870 | .TP | |
871 | .B \-S VALUE, \-\-saveauto=VALUE | |
ee38a438 | 872 | [ATA] Enables or disables SMART autosave of device vendor-specific |
f9e10201 | 873 | Attributes. The valid arguments to this option are \fIon\fP |
832b75ed GG |
874 | and \fIoff\fP. Note that this feature is preserved across disk power |
875 | cycles, so you should only need to issue it once. | |
f9e10201 | 876 | .Sp |
e9583e0c | 877 | The ATA standard does not specify a method to check whether SMART |
f9e10201 JD |
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 | |
e9583e0c | 885 | [SCSI] For SCSI devices this toggles the value of the Global Logging |
f9e10201 JD |
886 | Target Save Disabled (GLTSD) bit in the Control Mode Page. Some disk |
887 | manufacturers set this bit by default. This prevents error counters, | |
ee38a438 | 888 | power-up hours and other useful data from being placed in non-volatile |
832b75ed | 889 | storage, so these values may be reset to zero the next time the device |
f9e10201 JD |
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 | |
832b75ed GG |
893 | type applications you might consider using \fIoff\fP to set the GLTSD |
894 | bit. | |
d008864d GI |
895 | .TP |
896 | .B \-g NAME, \-\-get=NAME, \-s NAME[,VALUE], \-\-set=NAME[,VALUE] | |
ee38a438 | 897 | Gets/sets non-SMART device settings. |
f9e10201 JD |
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 | |
d008864d | 902 | .I all |
f9e10201 JD |
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 | |
d008864d GI |
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 | |
f9e10201 | 911 | the fastest (loudest) mode, \*(Aqoff\*(Aq disables AAM. Devices may support |
d008864d | 912 | intermediate levels. Values below 128 are defined as vendor specific (0) |
ee38a438 | 913 | or retired (1 to 127). Note that the AAM feature was declared obsolete in |
d008864d | 914 | ATA ACS-2 Revision 4a (Dec 2010). |
f9e10201 | 915 | .Sp |
d008864d GI |
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 | |
f9e10201 | 919 | attempt to enable APM and set the specified value, \*(Aqoff\*(Aq disables APM. |
d008864d GI |
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. | |
f9e10201 | 924 | .Sp |
d008864d GI |
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. | |
f9e10201 | 928 | .Sp |
d008864d GI |
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. | |
f9e10201 | 933 | .Sp |
d008864d GI |
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. | |
f9e10201 | 938 | .Sp |
d008864d GI |
939 | .I standby,[N|off] |
940 | \- [ATA only] Sets the standby (spindown) timer and places the drive in the | |
f9e10201 | 941 | IDLE mode. A value of 0 or \*(Aqoff\*(Aq disables the standby timer. |
d008864d GI |
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. | |
f9e10201 JD |
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 | |
d008864d | 956 | .I standby,now |
f9e10201 JD |
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 | |
d008864d | 962 | .I wcache[,on|off] |
ee38a438 | 963 | \- [ATA] Gets/sets the volatile write cache feature (if supported). |
d008864d | 964 | The write cache is usually enabled by default. |
f9e10201 | 965 | .Sp |
ee38a438 | 966 | .I wcache[,on|off] |
f9e10201 | 967 | \- [SCSI] Gets/sets the \*(AqWrite Cache Enable\*(Aq (WCE) bit (if supported). |
ee38a438 | 968 | The write cache is usually enabled by default. |
f9e10201 JD |
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]] | |
a86ec89e | 984 | \- [ATA only] Gets/sets Write Cache Reordering. |
f9e10201 JD |
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 | |
3d17a85c GI |
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. | |
f9e10201 JD |
992 | [NEW EXPERIMENTAL SMARTCTL FEATURE] |
993 | If \*(Aq,p\*(Aq is specified, the setting is preserved across power cycles. | |
994 | .Sp | |
ee38a438 | 995 | .I rcache[,on|off] |
f9e10201 JD |
996 | \- [SCSI only] Gets/sets the \*(AqRead Cache Disable\*(Aq (RCE) bit. |
997 | \*(AqOff\*(Aq value disables read cache (if supported). | |
ee38a438 | 998 | The read cache is usually enabled by default. |
f9e10201 JD |
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 | |
832b75ed GG |
1006 | .TP |
1007 | .B SMART READ AND DISPLAY DATA OPTIONS: | |
1008 | .TP | |
1009 | .B \-H, \-\-health | |
a86ec89e | 1010 | Prints the health status of the device or pending TapeAlert messages. |
f9e10201 | 1011 | .Sp |
832b75ed GG |
1012 | If the device reports failing health status, this means |
1013 | .B either | |
f9e10201 JD |
1014 | that the device has already failed, |
1015 | .B or | |
832b75ed | 1016 | that it is predicting its own failure within the next 24 hours. If |
f9e10201 | 1017 | this happens, use the \*(Aq\-a\*(Aq option to get more information, and |
1953ff6d | 1018 | .B get your data off the disk and to someplace safe as soon as you can. |
f9e10201 | 1019 | .Sp |
a86ec89e GI |
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 | |
f9e10201 | 1023 | bugs in some layer (e.g.\& RAID controller or USB bridge firmware) between |
a86ec89e GI |
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 | |
f9e10201 JD |
1027 | (see \*(Aq\-A\*(Aq below). |
1028 | .Sp | |
a86ec89e GI |
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. | |
f9e10201 | 1032 | .Sp |
a86ec89e GI |
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. | |
f9e10201 JD |
1039 | .\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin |
1040 | .Sp | |
1041 | [NVMe] | |
a86ec89e GI |
1042 | [NEW EXPERIMENTAL SMARTCTL FEATURE] |
1043 | NVMe status is obtained by reading the "Critical Warning" byte from | |
1044 | the SMART/Health Information log. | |
f9e10201 | 1045 | .\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin |
832b75ed GG |
1046 | .TP |
1047 | .B \-c, \-\-capabilities | |
a86ec89e | 1048 | [ATA] Prints only the generic SMART capabilities. These |
2127e193 | 1049 | show what SMART features are implemented and how the device will |
832b75ed GG |
1050 | respond to some of the different SMART commands. For example it |
1051 | shows if the device logs errors, if it supports offline surface | |
ee38a438 | 1052 | scanning, and so on. If the device can carry out self-tests, this |
832b75ed | 1053 | option also shows the estimated time required to run those tests. |
f9e10201 JD |
1054 | .\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin |
1055 | .Sp | |
1056 | [NVMe] | |
a86ec89e GI |
1057 | [NEW EXPERIMENTAL SMARTCTL FEATURE] |
1058 | Prints various NVMe device capabilities obtained from the Identify Controller | |
1059 | and the Identify Namespace data structure. | |
f9e10201 | 1060 | .\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin |
832b75ed GG |
1061 | .TP |
1062 | .B \-A, \-\-attributes | |
2127e193 | 1063 | [ATA] Prints only the vendor specific SMART Attributes. The Attributes |
f9e10201 JD |
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 | |
832b75ed | 1066 | disk been powered up. |
f9e10201 | 1067 | .Sp |
832b75ed GG |
1068 | Each Attribute has a "Raw" value, printed under the heading |
1069 | "RAW_VALUE", and a "Normalized" value printed under the heading | |
ee38a438 | 1070 | "VALUE". [Note: \fBsmartctl\fP prints these values in base-10.] In |
832b75ed | 1071 | the example just given, the "Raw Value" for Attribute 12 would be the |
ee38a438 | 1072 | actual number of times that the disk has been power-cycled, for |
832b75ed GG |
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" | |
f9e10201 JD |
1079 | values: this is done by the disk's firmware. |
1080 | .Sp | |
832b75ed | 1081 | The conversion from Raw value to a quantity with physical units is |
f9e10201 | 1082 | not specified by the SMART standard. In most cases, the values printed |
832b75ed GG |
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 | |
ee38a438 | 1086 | the Hitachi disk on my laptop reports its power-on hours in minutes, |
f9e10201 | 1087 | not hours. Some IBM disks track three temperatures rather than one, in |
832b75ed | 1088 | their raw values. And so on. |
f9e10201 | 1089 | .Sp |
832b75ed GG |
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 | |
ee38a438 | 1093 | is said to have failed. If the Attribute is a pre-failure Attribute, |
832b75ed | 1094 | then disk failure is imminent. |
f9e10201 | 1095 | .Sp |
832b75ed GG |
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 | |
ee38a438 | 1100 | \fBincrease\fP the "Worst" value for some "rate-type" Attributes.] |
f9e10201 | 1101 | .Sp |
832b75ed | 1102 | The Attribute table printed out by \fBsmartctl\fP also shows the |
f9e10201 | 1103 | "TYPE" of the Attribute. Attributes are one of two possible types: |
ee38a438 | 1104 | Pre-failure or Old age. Pre-failure Attributes are ones which, if |
832b75ed GG |
1105 | less than or equal to their threshold values, indicate pending disk |
1106 | failure. Old age, or usage Attributes, are ones which indicate | |
ee38a438 | 1107 | end-of-product life from old-age or normal aging and wearout, if |
832b75ed | 1108 | the Attribute value is less than or equal to the threshold. \fBPlease |
ee38a438 | 1109 | note\fP: the fact that an Attribute is of type 'Pre-fail' does |
832b75ed | 1110 | \fBnot\fP mean that your disk is about to fail! It only has this |
f9e10201 | 1111 | meaning if the Attribute's current Normalized value is less than or |
832b75ed | 1112 | equal to the threshold value. |
f9e10201 JD |
1113 | .Sp |
1114 | If the Attribute's current Normalized value is less than or equal to | |
832b75ed | 1115 | the threshold value, then the "WHEN_FAILED" column will display |
f9e10201 | 1116 | "FAILING_NOW". If not, but the worst recorded value is less than or |
832b75ed GG |
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 | |
f9e10201 | 1119 | a dash: \*(Aq\-\*(Aq) then this Attribute is OK now (not failing) and has |
832b75ed | 1120 | also never failed in the past. |
f9e10201 | 1121 | .Sp |
832b75ed | 1122 | The table column labeled "UPDATED" shows if the SMART Attribute values |
ee38a438 | 1123 | are updated during both normal operation and off-line testing, or |
832b75ed GG |
1124 | only during offline testing. The former are labeled "Always" and the |
1125 | latter are labeled "Offline". | |
f9e10201 | 1126 | .Sp |
832b75ed GG |
1127 | So to summarize: the Raw Attribute values are the ones that might have |
1128 | a real physical interpretation, such as "Temperature Celsius", | |
ee38a438 | 1129 | "Hours", or "Start-Stop Cycles". Each manufacturer converts these, |
f9e10201 JD |
1130 | using their detailed knowledge of the disk's operations and failure |
1131 | modes, to Normalized Attribute values in the range 1\(en254. The | |
832b75ed GG |
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. | |
f9e10201 | 1139 | .Sp |
ee38a438 GI |
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 | |
832b75ed | 1143 | the option of printing the Attribute values. |
f9e10201 | 1144 | .Sp |
ee38a438 GI |
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. | |
f9e10201 JD |
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 | |
2127e193 | 1152 | [SCSI] For SCSI devices the "attributes" are obtained from the temperature |
f9e10201 JD |
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] | |
a86ec89e GI |
1160 | [NEW EXPERIMENTAL SMARTCTL FEATURE] |
1161 | For NVMe devices the attributes are obtained from the SMART/Health | |
1162 | Information log. | |
f9e10201 | 1163 | .\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin |
832b75ed | 1164 | .TP |
a7e8ffec | 1165 | .B \-f FORMAT, \-\-format=FORMAT |
e165493d | 1166 | [ATA only] Selects the output format of the attributes: |
f9e10201 | 1167 | .Sp |
a7e8ffec | 1168 | .I old |
f9e10201 JD |
1169 | \- Old smartctl format. |
1170 | This is the default unless the \*(Aq\-x\*(Aq option is specified. | |
1171 | .Sp | |
a7e8ffec GI |
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. | |
f9e10201 JD |
1175 | This is the default if the \*(Aq'\-x\*(Aq option is specified. |
1176 | .Sp | |
e165493d GI |
1177 | .I hex,id |
1178 | \- Print all attribute IDs as hexadecimal numbers. | |
f9e10201 | 1179 | .Sp |
e165493d GI |
1180 | .I hex,val |
1181 | \- Print all normalized values as hexadecimal numbers. | |
f9e10201 | 1182 | .Sp |
e165493d | 1183 | .I hex |
f9e10201 | 1184 | \- Same as \*(Aq\-f hex,id \-f hex,val\*(Aq. |
a7e8ffec | 1185 | .TP |
832b75ed | 1186 | .B \-l TYPE, \-\-log=TYPE |
f9e10201 | 1187 | Prints various device logs. |
832b75ed | 1188 | The valid arguments to this option are: |
f9e10201 | 1189 | .Sp |
832b75ed | 1190 | .I error |
2127e193 | 1191 | \- [ATA] prints the Summary SMART error log. SMART disks maintain a log |
f9e10201 | 1192 | of the most recent five non-trivial errors. For each of these errors, the |
ee38a438 | 1193 | disk power-on lifetime at which the error occurred is recorded, as is |
832b75ed GG |
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 | |
f9e10201 JD |
1196 | Register (SR) values are decoded and printed as text. |
1197 | The meanings of these are: | |
1198 | .Vb 5 | |
832b75ed GG |
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 | |
ee38a438 | 1205 | \fBILI\fP: (packet command-set specific) |
832b75ed GG |
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 | |
f9e10201 | 1213 | .Ve |
832b75ed GG |
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 | |
f9e10201 | 1216 | corresponding power cycle. This is displayed in the form |
832b75ed GG |
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 | |
ee38a438 | 1221 | log. The final column of the error log is a text-string description |
832b75ed GG |
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 | |
ee38a438 GI |
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 | |
832b75ed | 1226 | specification. Similarly, the notation \fB[RET\-\fP\fIN\fP\fB]\fP is |
ee38a438 | 1227 | used to indicate that a command was retired in the ATA-\fIN\fP |
832b75ed GG |
1228 | specification. Some commands are not defined in any version of the |
1229 | ATA specification but are in common use nonetheless; these are marked | |
ee38a438 | 1230 | \fB[NS]\fP, meaning non-standard. |
f9e10201 | 1231 | .Sp |
d2e702cf GI |
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: | |
832b75ed GG |
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 | |
ee38a438 | 1244 | \fBIDNF\fP (\fBID N\fPot \fBF\fPound): user-accessible address could |
f9e10201 | 1245 | not be found. For READ LOG type commands, \fBIDNF\fP can also indicate |
832b75ed | 1246 | that a device data log structure checksum was incorrect. |
f9e10201 | 1247 | .Sp |
832b75ed GG |
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 | |
ee38a438 | 1251 | counts 512-byte sectors on the disk, starting from zero. (Because of |
832b75ed GG |
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 | |
f9e10201 JD |
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 | |
832b75ed GG |
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. | |
f9e10201 | 1259 | .Sp |
832b75ed GG |
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. | |
f9e10201 | 1263 | .Sp |
2127e193 GI |
1264 | .I error |
1265 | \- [SCSI] prints the error counter log pages for reads, write and verifies. | |
832b75ed | 1266 | The verify row is only output if it has an element other than zero. |
f9e10201 JD |
1267 | .Sp |
1268 | .\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin | |
a86ec89e | 1269 | .I error[,NUM] |
f9e10201 | 1270 | \- [NVMe] |
a86ec89e GI |
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). | |
f9e10201 JD |
1277 | .Sp |
1278 | .\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin | |
2127e193 | 1279 | .I xerror[,NUM][,error] |
cfbba5b9 GI |
1280 | \- [ATA only] prints the Extended Comprehensive SMART error log |
1281 | (General Purpose Log address 0x03). Unlike the Summary SMART error | |
f9e10201 | 1282 | log (see \*(Aq\-l error\*(Aq above), it provides sufficient space to log |
cfbba5b9 GI |
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 | |
f9e10201 JD |
1285 | up to 4 log entries. |
1286 | The actual number of log sectors is vendor specific. | |
1287 | .Sp | |
2127e193 GI |
1288 | Only the 8 most recent error log entries are printed by default. |
1289 | This number can be changed by the optional parameter NUM. | |
f9e10201 JD |
1290 | .Sp |
1291 | If \*(Aq,error\*(Aq is appended and the Extended Comprehensive SMART error | |
2127e193 | 1292 | log is not supported, the Summary SMART self-test log is printed. |
f9e10201 | 1293 | .Sp |
f4e463df GI |
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. | |
f9e10201 | 1297 | .Sp |
832b75ed | 1298 | .I selftest |
ee38a438 | 1299 | \- [ATA] prints the SMART self-test log. The disk maintains a self-test |
2127e193 | 1300 | log showing the results of the self tests, which can be run using the |
f9e10201 | 1301 | \*(Aq\-t\*(Aq option described below. For each of the most recent |
ee38a438 GI |
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 | |
832b75ed GG |
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, | |
f9e10201 | 1306 | measured in hours of disk lifetime, is also printed. [Note: this time |
eb07ddf2 | 1307 | stamp wraps after 2^16 hours, or 2730 days and 16 hours, or about 7.5 |
f9e10201 JD |
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 | |
2127e193 | 1312 | .I selftest |
ee38a438 | 1313 | \- [SCSI] the self-test log for a SCSI device has a slightly different |
2127e193 | 1314 | format than for an ATA device. For each of the most recent twenty |
ee38a438 | 1315 | self-tests, it shows the type of test and the status (final or in |
f9e10201 JD |
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 | |
832b75ed GG |
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 | |
ee38a438 | 1324 | which the test was run, using a vendor-specific method of putting both |
832b75ed | 1325 | numbers into a single byte. The Logical Block Address (LBA) of the |
f9e10201 | 1326 | first error is printed in hexadecimal notation. |
832b75ed | 1327 | If provided, the SCSI Sense Key (SK), Additional Sense Code (ASC) and |
f9e10201 JD |
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 | |
832b75ed | 1330 | test terminology). |
f9e10201 | 1331 | .Sp |
2127e193 | 1332 | .I xselftest[,NUM][,selftest] |
ee38a438 | 1333 | \- [ATA only] prints the Extended SMART self-test log (General Purpose |
f9e10201 | 1334 | Log address 0x07). Unlike the SMART self-test log (see \*(Aq\-l selftest\*(Aq |
cfbba5b9 | 1335 | above), it supports 48-bit LBA and logs with more than one sector. |
f9e10201 JD |
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 | |
2127e193 | 1343 | supported, the old SMART self-test log is printed. |
f9e10201 | 1344 | .Sp |
2127e193 | 1345 | .I selective |
f9e10201 | 1346 | \- [ATA only] Please see the \*(Aq\-t select\*(Aq option below for a |
ee38a438 | 1347 | description of selective self-tests. The selective self-test log |
832b75ed GG |
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 | |
ee38a438 GI |
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 | |
832b75ed | 1353 | remainder of the disk will be carried out after the selective |
f9e10201 | 1354 | self-test has completed (see \*(Aq\-t afterselect\*(Aq option) and the time |
ee38a438 | 1355 | delay before restarting this read-scan if it is interrupted (see |
f9e10201 JD |
1356 | \*(Aq\-t pending\*(Aq option). |
1357 | .Sp | |
2127e193 GI |
1358 | .I directory[,gs] |
1359 | \- [ATA only] if the device supports the General Purpose Logging feature | |
ee38a438 | 1360 | set (ATA-6 and above) then this prints the Log Directory (the log at |
832b75ed GG |
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 | |
ee38a438 GI |
1363 | [Summary SMART error log] and at address 6 [SMART self-test log] may |
1364 | be printed using the previously-described | |
832b75ed GG |
1365 | .I error |
1366 | and | |
1367 | .I selftest | |
2127e193 GI |
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 | |
f9e10201 JD |
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 | |
2127e193 GI |
1375 | .I background |
1376 | \- [SCSI only] the background scan results log outputs information derived | |
ee38a438 | 1377 | from Background Media Scans (BMS) done after power up and/or periodically |
f9e10201 | 1378 | (e.g.\& every 24 hours) on recent SCSI disks. If supported, the BMS status |
4d59bff9 GG |
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 | |
f9e10201 JD |
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 | |
2127e193 GI |
1388 | .I scttemp, scttempsts, scttemphist |
1389 | \- [ATA only] prints the disk temperature information provided by the | |
1390 | SMART Command Transport (SCT) commands. | |
f9e10201 JD |
1391 | The option \*(Aqscttempsts\*(Aq prints current temperature and temperature |
1392 | ranges returned by the SCT Status command, \*(Aqscttemphist\*(Aq prints | |
a37e7145 | 1393 | temperature limits and the temperature history table returned by |
f9e10201 | 1394 | the SCT Data Table command, and \*(Aqscttemp\*(Aq prints both. |
a37e7145 | 1395 | The temperature values are preserved across power cycles. |
d008864d | 1396 | The logging interval can be configured with the |
f9e10201 | 1397 | \*(Aq\-l scttempint,N[,p]\*(Aq option, see below. |
ee38a438 GI |
1398 | The SCT commands were introduced in ATA8-ACS and were also |
1399 | supported by many ATA-7 disks. | |
f9e10201 | 1400 | .Sp |
d008864d GI |
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. | |
f9e10201 | 1404 | If \*(Aq,p\*(Aq is specified, the setting is preserved across power cycles. |
d008864d GI |
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. | |
f9e10201 | 1408 | .Sp |
7f0798ef | 1409 | .I scterc[,READTIME,WRITETIME] |
d008864d | 1410 | \- [ATA only] prints values and descriptions of the SCT Error Recovery |
f9e10201 JD |
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 | |
d008864d | 1419 | .I devstat[,PAGE] |
ee38a438 GI |
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, | |
d008864d GI |
1422 | entries from all supported pages are printed. If PAGE 0 is specified, |
1423 | the list of supported pages is printed. Device Statistics was | |
d2e702cf | 1424 | introduced in ACS-2 and is only supported by some recent devices. |
f9e10201 JD |
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 | |
2127e193 | 1436 | .I sataphy[,reset] |
cfbba5b9 | 1437 | \- [SATA only] prints values and descriptions of the SATA Phy Event |
f9e10201 | 1438 | Counters (General Purpose Log address 0x11). If \*(Aq\-l sataphy,reset\*(Aq |
cfbba5b9 | 1439 | is specified, all counters are reset after reading the values. |
ee38a438 GI |
1440 | This also works for SATA devices with Packet interface like CD/DVD |
1441 | drives. | |
f9e10201 | 1442 | .Sp |
2127e193 | 1443 | .I sasphy[,reset] |
cfbba5b9 | 1444 | \- [SAS (SCSI) only] prints values and descriptions of the SAS (SSP) |
f9e10201 | 1445 | Protocol Specific log page (log page 0x18). If \*(Aq\-l sasphy,reset\*(Aq |
cfbba5b9 | 1446 | is specified, all counters are reset after reading the values. |
f9e10201 | 1447 | .Sp |
2127e193 | 1448 | .I gplog,ADDR[,FIRST[\-LAST|+SIZE]] |
cfbba5b9 GI |
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 | |
f9e10201 | 1451 | listed in the log directory (see \*(Aq\-l directory\*(Aq above). |
cfbba5b9 GI |
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. | |
f9e10201 JD |
1454 | LAST can be set to \*(Aqmax\*(Aq to specify the last page of the log. |
1455 | .Sp | |
2127e193 | 1456 | .I smartlog,ADDR[,FIRST[\-LAST|+SIZE]] |
cfbba5b9 | 1457 | \- [ATA only] prints a hex dump of any log accessible via SMART Read |
f9e10201 JD |
1458 | Log command. See \*(Aq\-l gplog,...\*(Aq above for parameter syntax. |
1459 | .Sp | |
2127e193 | 1460 | For example, all these commands: |
f9e10201 JD |
1461 | .Vb 3 |
1462 | smartctl \-l gplog,0x80,10\-15 /dev/sda | |
2127e193 | 1463 | smartctl \-l gplog,0x80,10+6 /dev/sda |
f9e10201 JD |
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. | |
2127e193 | 1469 | This command: |
f9e10201 JD |
1470 | .Vb 1 |
1471 | smartctl \-l gplog,0x11 /dev/sda | grep ^0 | xxd \-r >log.bin | |
1472 | .Ve | |
2127e193 GI |
1473 | writes a binary representation of the one sector log 0x11 |
1474 | (SATA Phy Event Counters) to file log.bin. | |
f9e10201 JD |
1475 | .Sp |
1476 | .\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin | |
a86ec89e | 1477 | .I nvmelog,PAGE,SIZE |
f9e10201 | 1478 | \- [NVMe only] |
a86ec89e GI |
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 | |
f9e10201 JD |
1486 | .Sp |
1487 | .\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin | |
d008864d GI |
1488 | .I ssd |
1489 | \- [ATA] prints the Solid State Device Statistics log page. | |
f9e10201 JD |
1490 | This has the same effect as \*(Aq\-l devstat,7\*(Aq, see above. |
1491 | .Sp | |
d008864d GI |
1492 | .I ssd |
1493 | \- [SCSI] prints the Solid State Media percentage used endurance | |
f9e10201 | 1494 | indicator. A value of 0 indicates as new condition while 100 |
d008864d | 1495 | indicates the device is at the end of its lifetime as projected by the |
f9e10201 JD |
1496 | manufacturer. |
1497 | The value may reach 255. | |
832b75ed | 1498 | .TP |
f9e10201 | 1499 | .B \-v ID,FORMAT[:BYTEORDER][,NAME], \-\-vendorattribute=ID,FORMAT... |
ee38a438 | 1500 | [ATA only] Sets a vendor-specific raw value print FORMAT, an optional |
a23d5117 | 1501 | BYTEORDER and an optional NAME for Attribute ID. |
bed94269 | 1502 | This option may be used multiple times. |
f9e10201 JD |
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 | |
a23d5117 | 1507 | The optional BYTEORDER consists of 1 to 8 characters from the |
f9e10201 JD |
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 | |
a23d5117 GI |
1517 | attribute 5 with big endian instead of little endian |
1518 | byte ordering. | |
f9e10201 | 1519 | .Sp |
d008864d | 1520 | The NAME is a string of letters, digits and underscore. Its length should |
f9e10201 JD |
1521 | not exceed 23 characters. |
1522 | The \*(Aq\-P showall\*(Aq option reports an error if this is the case. | |
1523 | .Sp | |
bed94269 | 1524 | .I \-v help |
832b75ed GG |
1525 | \- Prints (to STDOUT) a list of all valid arguments to this option, |
1526 | then exits. | |
f9e10201 | 1527 | .Sp |
bed94269 | 1528 | Valid arguments for FORMAT are: |
f9e10201 | 1529 | .Sp |
bed94269 | 1530 | .I raw8 |
ee38a438 | 1531 | \- Print the Raw value as six 8-bit unsigned base-10 integers. |
bed94269 | 1532 | This may be useful for decoding the meaning of the Raw value. |
f9e10201 | 1533 | .Sp |
bed94269 | 1534 | .I raw16 |
ee38a438 | 1535 | \- Print the Raw value as three 16-bit unsigned base-10 integers. |
bed94269 | 1536 | This may be useful for decoding the meaning of the Raw value. |
f9e10201 | 1537 | .Sp |
bed94269 | 1538 | .I raw48 |
ee38a438 | 1539 | \- Print the Raw value as a 48-bit unsigned base-10 integer. |
bed94269 | 1540 | This is the default for most attributes. |
f9e10201 | 1541 | .Sp |
bed94269 GI |
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. | |
f9e10201 | 1545 | .Sp |
e165493d | 1546 | .I raw56 |
ee38a438 GI |
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. | |
f9e10201 | 1549 | .Sp |
e165493d GI |
1550 | .I hex56 |
1551 | \- Print the Raw value as a 14 digit hexadecimal number. | |
ee38a438 | 1552 | This includes the reserved byte which follows the 48-bit raw value. |
f9e10201 | 1553 | .Sp |
bed94269 | 1554 | .I raw64 |
ee38a438 | 1555 | \- Print the Raw value as a 64-bit unsigned base-10 integer. |
bed94269 | 1556 | This includes two bytes from the normalized and worst attribute value. |
e165493d | 1557 | This raw format is used by some SSD devices with Indilinx controller. |
f9e10201 | 1558 | .Sp |
bed94269 GI |
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. | |
e165493d | 1562 | This raw format is used by some SSD devices with Indilinx controller. |
f9e10201 | 1563 | .Sp |
bed94269 | 1564 | .I min2hour |
ee38a438 | 1565 | \- Raw Attribute is power-on time in minutes. Its raw value |
832b75ed | 1566 | will be displayed in the form "Xh+Ym". Here X is hours, and Y is |
f9e10201 | 1567 | minutes in the range 0\(en59 inclusive. Y is always printed with two |
832b75ed | 1568 | digits, for example "06" or "31" or "00". |
f9e10201 | 1569 | .Sp |
bed94269 | 1570 | .I sec2hour |
ee38a438 | 1571 | \- Raw Attribute is power-on time in seconds. Its raw value |
832b75ed | 1572 | will be displayed in the form "Xh+Ym+Zs". Here X is hours, Y is |
f9e10201 JD |
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 | |
832b75ed | 1575 | example "06" or "31" or "00". |
f9e10201 | 1576 | .Sp |
bed94269 | 1577 | .I halfmin2hour |
ee38a438 | 1578 | \- Raw Attribute is power-on time, measured in units of 30 |
832b75ed GG |
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 | |
f9e10201 | 1581 | minutes in the range 0\(en59 inclusive. Y is always printed with two |
832b75ed | 1582 | digits, for example "06" or "31" or "00". |
f9e10201 | 1583 | .Sp |
cfbba5b9 | 1584 | .I msec24hour32 |
ee38a438 | 1585 | \- Raw Attribute is power-on time measured in 32-bit hours and 24-bit |
cfbba5b9 GI |
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. | |
f9e10201 | 1589 | .Sp |
bed94269 GI |
1590 | .I tempminmax |
1591 | \- Raw Attribute is the disk temperature in Celsius. Info about | |
cfbba5b9 GI |
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. | |
f9e10201 | 1596 | .Sp |
bed94269 GI |
1597 | .I temp10x |
1598 | \- Raw Attribute is ten times the disk temperature in Celsius. | |
f9e10201 | 1599 | .Sp |
bed94269 | 1600 | .I raw16(raw16) |
ee38a438 GI |
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 | |
bed94269 | 1603 | for Attributes 5 and 196. |
f9e10201 | 1604 | .Sp |
bed94269 GI |
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. | |
f9e10201 | 1609 | .Sp |
e165493d | 1610 | .I raw24(raw8) |
ee38a438 GI |
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 | |
e165493d | 1613 | for Attribute 9. |
f9e10201 | 1614 | .Sp |
bed94269 | 1615 | .I raw24/raw24 |
f9e10201 | 1616 | \- Raw Attribute contains two 24-bit values. The first is the |
832b75ed GG |
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 | |
f9e10201 | 1620 | unload). As a rule of thumb, the mechanical stress created by one |
832b75ed GG |
1621 | emergency unload is equivalent to that created by one hundred normal |
1622 | unloads. | |
f9e10201 | 1623 | .Sp |
cfbba5b9 | 1624 | .I raw24/raw32 |
ee38a438 GI |
1625 | \- Raw attribute is an error rate which consists of a 24-bit error |
1626 | count and a 32-bit total count. | |
f9e10201 JD |
1627 | .Sp |
1628 | The following old arguments to \*(Aq\-v\*(Aq are also still valid: | |
1629 | .Sp | |
bed94269 GI |
1630 | .I 9,minutes |
1631 | \- same as: | |
1632 | .I 9,min2hour,Power_On_Minutes. | |
f9e10201 | 1633 | .Sp |
bed94269 GI |
1634 | .I 9,seconds |
1635 | \- same as: | |
1636 | .I 9,sec2hour,Power_On_Seconds. | |
f9e10201 | 1637 | .Sp |
bed94269 GI |
1638 | .I 9,halfminutes |
1639 | \- same as: | |
1640 | .I 9,halfmin2hour,Power_On_Half_Minutes. | |
f9e10201 | 1641 | .Sp |
bed94269 GI |
1642 | .I 9,temp |
1643 | \- same as: | |
1644 | .I 9,tempminmax,Temperature_Celsius. | |
f9e10201 | 1645 | .Sp |
bed94269 GI |
1646 | .I 192,emergencyretractcyclect |
1647 | \- same as: | |
1648 | .I 192,raw48,Emerg_Retract_Cycle_Ct | |
f9e10201 | 1649 | .Sp |
bed94269 GI |
1650 | .I 193,loadunload |
1651 | \- same as: | |
1652 | .I 193,raw24/raw24. | |
f9e10201 | 1653 | .Sp |
832b75ed | 1654 | .I 194,10xCelsius |
bed94269 GI |
1655 | \- same as: |
1656 | .I 194,temp10x,Temperature_Celsius_x10. | |
f9e10201 | 1657 | .Sp |
832b75ed | 1658 | .I 194,unknown |
bed94269 GI |
1659 | \- same as: |
1660 | .I 194,raw48,Unknown_Attribute. | |
f9e10201 | 1661 | .Sp |
2127e193 | 1662 | .I 197,increasing |
bed94269 GI |
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). | |
f9e10201 | 1668 | .Sp |
2127e193 | 1669 | .I 198,increasing |
bed94269 GI |
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). | |
f9e10201 | 1675 | .Sp |
832b75ed | 1676 | .I 198,offlinescanuncsectorct |
bed94269 GI |
1677 | \- same as: |
1678 | .I 198,raw48,Offline_Scan_UNC_SectCt. | |
f9e10201 | 1679 | .Sp |
832b75ed | 1680 | .I 200,writeerrorcount |
bed94269 GI |
1681 | \- same as: |
1682 | .I 200,raw48,Write_Error_Count. | |
f9e10201 | 1683 | .Sp |
832b75ed | 1684 | .I 201,detectedtacount |
bed94269 GI |
1685 | \- same as: |
1686 | .I 201,raw48,Detected_TA_Count. | |
f9e10201 | 1687 | .Sp |
832b75ed | 1688 | .I 220,temp |
bed94269 | 1689 | \- same as: |
ee38a438 | 1690 | .I 220,tempminmax,Temperature_Celsius. |
832b75ed GG |
1691 | .TP |
1692 | .B \-F TYPE, \-\-firmwarebug=TYPE | |
2127e193 | 1693 | [ATA only] Modifies the behavior of \fBsmartctl\fP to compensate for some |
ee38a438 GI |
1694 | known and understood device firmware or driver bug. This option may be used |
1695 | multiple times. The valid arguments are: | |
f9e10201 | 1696 | .Sp |
832b75ed GG |
1697 | .I none |
1698 | \- Assume that the device firmware obeys the ATA specifications. This | |
f9e10201 | 1699 | is the default, unless the device has presets for \*(Aq\-F\*(Aq in the |
d2e702cf | 1700 | drive database. Using this option on the command line will override any |
ee38a438 | 1701 | preset values. |
f9e10201 | 1702 | .Sp |
ee38a438 GI |
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. | |
f9e10201 | 1707 | .Sp |
832b75ed GG |
1708 | .I samsung |
1709 | \- In some Samsung disks (example: model SV4012H Firmware Version: | |
ee38a438 GI |
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). | |
832b75ed | 1712 | Enabling this option tells \fBsmartctl\fP to evaluate these quantities |
ee38a438 GI |
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; | |
832b75ed GG |
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. | |
f9e10201 | 1717 | .Sp |
832b75ed | 1718 | .I samsung2 |
e9583e0c GI |
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 | |
f9e10201 | 1721 | byte-reversed order. An indication that your Samsung disk needs this |
ee38a438 | 1722 | option is that the self-test log is printed correctly, but there are a |
832b75ed GG |
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). | |
f9e10201 | 1726 | .Sp |
a37e7145 | 1727 | .I samsung3 |
ee38a438 GI |
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 | |
f9e10201 JD |
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 | |
ee38a438 GI |
1734 | .I xerrorlba |
1735 | \- Fixes LBA byte ordering in Extended Comprehensive SMART error log. | |
d2e702cf | 1736 | Some disks use little endian byte ordering instead of ATA register |
ee38a438 | 1737 | ordering to specifiy the LBA addresses in the log entries. |
f9e10201 | 1738 | .Sp |
a37e7145 GG |
1739 | .I swapid |
1740 | \- Fixes byte swapped ATA identify strings (device name, serial number, | |
1741 | firmware version) returned by some buggy device drivers. | |
832b75ed GG |
1742 | .TP |
1743 | .B \-P TYPE, \-\-presets=TYPE | |
2127e193 | 1744 | [ATA only] Specifies whether \fBsmartctl\fP should use any preset options |
f9e10201 | 1745 | that are available for this drive. By default, if the drive is recognized |
832b75ed | 1746 | in the \fBsmartmontools\fP database, then the presets are used. |
f9e10201 | 1747 | .Sp |
832b75ed GG |
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. | |
f9e10201 | 1759 | .Sp |
832b75ed | 1760 | The valid arguments to this option are: |
f9e10201 | 1761 | .Sp |
832b75ed GG |
1762 | .I use |
1763 | \- if a drive is recognized, then use the stored presets for it. This | |
f9e10201 JD |
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 | |
832b75ed GG |
1768 | .I ignore |
1769 | \- do not use presets. | |
f9e10201 | 1770 | .Sp |
832b75ed GG |
1771 | .I show |
1772 | \- show if the drive is recognized in the database, and if so, its | |
1773 | presets, then exit. | |
f9e10201 | 1774 | .Sp |
832b75ed GG |
1775 | .I showall |
1776 | \- list all recognized drives, and the presets that are set for them, | |
d008864d GI |
1777 | then exit. This also checks the drive database regular expressions |
1778 | and settings for syntax errors. | |
f9e10201 JD |
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 | |
832b75ed | 1784 | smartctl \-P showall |
f9e10201 | 1785 | .Ve |
832b75ed | 1786 | lists all entries, the command: |
f9e10201 JD |
1787 | .Vb 1 |
1788 | smartctl \-P showall \*(AqMODEL\*(Aq | |
1789 | .Ve | |
832b75ed | 1790 | lists all entries matching MODEL, and the command: |
f9e10201 JD |
1791 | .Vb 1 |
1792 | smartctl \-P showall \*(AqMODEL\*(Aq \*(AqFIRMWARE\*(Aq | |
1793 | .Ve | |
832b75ed | 1794 | lists all entries for this MODEL and a specific FIRMWARE version. |
2127e193 GI |
1795 | .TP |
1796 | .B \-B [+]FILE, \-\-drivedb=[+]FILE | |
cfbba5b9 | 1797 | [ATA only] Read the drive database from FILE. The new database replaces |
f9e10201 | 1798 | the built in database by default. If \*(Aq+\*(Aq is specified, then the new |
cfbba5b9 | 1799 | entries prepend the built in entries. |
f9e10201 | 1800 | .Sp |
d008864d GI |
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 | |
f9e10201 | 1806 | (Windows: \fBEXEDIR/drivedb-add.h\fP) |
d008864d GI |
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. | |
f9e10201 | 1813 | .Sp |
d008864d GI |
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. | |
a86ec89e | 1825 | .\" %IF ENABLE_UPDATE_SMART_DRIVEDB |
f9e10201 | 1826 | .Sp |
d008864d GI |
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. | |
a86ec89e | 1838 | .\" %ENDIF ENABLE_UPDATE_SMART_DRIVEDB |
d008864d | 1839 | .\" %ENDIF ENABLE_DRIVEDB |
f9e10201 | 1840 | .Sp |
2127e193 | 1841 | The database files use the same C/C++ syntax that is used to initialize |
f9e10201 JD |
1842 | the built in database array. |
1843 | C/C++ style comments are allowed. | |
2127e193 | 1844 | Example: |
f9e10201 JD |
1845 | .Sp |
1846 | .Vb 8 | |
2127e193 GI |
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 | }, | |
e9583e0c GI |
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 | }, | |
2127e193 | 1871 | /* ... */ |
f9e10201 JD |
1872 | .Ve |
1873 | .Sp | |
832b75ed | 1874 | .TP |
ee38a438 | 1875 | .B SMART RUN/ABORT OFFLINE TEST AND self-test OPTIONS: |
832b75ed GG |
1876 | .TP |
1877 | .B \-t TEST, \-\-test=TEST | |
f9e10201 | 1878 | Executes TEST immediately. The \*(Aq\-C\*(Aq option can be used in |
832b75ed | 1879 | conjunction with this option to run the short or long (and also for |
ee38a438 | 1880 | ATA devices, selective or conveyance) self-tests in captive mode |
832b75ed GG |
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 | |
ee38a438 GI |
1884 | or power cycled during a self-test, no harm should result. The |
1885 | self-test will either be aborted or will resume automatically. | |
f9e10201 JD |
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. | |
ee38a438 GI |
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. | |
f9e10201 | 1892 | .Sp |
ee38a438 GI |
1893 | If a test failure occurs then the device may discontinue the testing |
1894 | and report the result immediately. | |
f9e10201 JD |
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 | |
ee38a438 | 1900 | The valid arguments to this option are: |
f9e10201 | 1901 | .Sp |
832b75ed | 1902 | .I offline |
e9583e0c | 1903 | \- [ATA] runs SMART Immediate Offline Test. This immediately |
832b75ed GG |
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 | |
f9e10201 JD |
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 | |
832b75ed | 1911 | "Suspend Offline collection upon new command" capability then you can |
f9e10201 JD |
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 | |
832b75ed GG |
1914 | has the "Abort Offline collection upon new command" capability then |
1915 | most commands will abort the Immediate Offline Test, so you should not | |
f9e10201 | 1916 | try to track the progress of the test with \*(Aq\-c\*(Aq, as it will abort |
832b75ed | 1917 | the test. |
f9e10201 | 1918 | .Sp |
e9583e0c | 1919 | .I offline |
f9e10201 JD |
1920 | \- [SCSI] runs the default self test in foreground. |
1921 | No entry is placed in the self test log. | |
1922 | .Sp | |
832b75ed | 1923 | .I short |
e9583e0c | 1924 | \- [ATA] runs SMART Short Self Test (usually under ten minutes). |
832b75ed | 1925 | This command can be given during normal system operation (unless run in |
f9e10201 | 1926 | captive mode \- see the \*(Aq\-C\*(Aq option below). This is a |
832b75ed GG |
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 | |
f9e10201 JD |
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 | |
e9583e0c | 1935 | .I short |
ee38a438 | 1936 | \- [SCSI] runs the "Background short" self-test. |
f9e10201 | 1937 | .Sp |
832b75ed | 1938 | .I long |
f9e10201 JD |
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 | |
832b75ed | 1941 | above. Note that this command can be given during normal |
f9e10201 JD |
1942 | system operation (unless run in captive mode \- see the \*(Aq\-C\*(Aq option |
1943 | below). | |
1944 | .Sp | |
e9583e0c | 1945 | .I long |
ee38a438 | 1946 | \- [SCSI] runs the "Background long" self-test. |
f9e10201 | 1947 | .Sp |
832b75ed | 1948 | .I conveyance |
2127e193 | 1949 | \- [ATA only] runs a SMART Conveyance Self Test (minutes). This |
ee38a438 | 1950 | self-test routine is intended to identify damage incurred during |
f9e10201 | 1951 | transporting of the device. This self-test routine should take on the |
832b75ed GG |
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 | |
f9e10201 JD |
1954 | \*(Aq\-C\*(Aq option below). |
1955 | .Sp | |
a37e7145 | 1956 | .I select,N\-M, select,N+SIZE |
2127e193 GI |
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 | |
f9e10201 JD |
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 | |
a37e7145 | 1965 | For example the commands: |
f9e10201 | 1966 | .Vb 2 |
a86ec89e GI |
1967 | smartctl \-t select,10\-20 /dev/sda |
1968 | smartctl \-t select,10+11 /dev/sda | |
f9e10201 | 1969 | .Ve |
a37e7145 | 1970 | both runs a self test on one span consisting of LBAs ten to twenty |
f9e10201 JD |
1971 | (inclusive). |
1972 | The command: | |
1973 | .Vb 1 | |
a86ec89e | 1974 | smartctl \-t select,100000000\-max /dev/sda |
f9e10201 | 1975 | .Ve |
a37e7145 | 1976 | run a self test from LBA 100000000 up to the end of the disk. |
f9e10201 | 1977 | The \*(Aq\-t\*(Aq option can be given up to five times, to test |
832b75ed | 1978 | up to five spans. For example the command: |
f9e10201 | 1979 | .Vb 1 |
a86ec89e | 1980 | smartctl \-t select,0\-100 \-t select,1000\-2000 /dev/sda |
f9e10201 | 1981 | .Ve |
832b75ed GG |
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: | |
f9e10201 | 1985 | .Vb 1 |
a86ec89e | 1986 | smartctl \-t select,0\-10 \-t select,5\-15 \-t select,10\-20 /dev/sda |
f9e10201 | 1987 | .Ve |
ee38a438 GI |
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 | |
f9e10201 JD |
1990 | \*(Aq\-l selftest\*(Aq option to smartctl. |
1991 | .Sp | |
832b75ed GG |
1992 | Selective self tests are particularly useful as disk capacities |
1993 | increase: an extended self test (smartctl \-t long) can take several | |
ee38a438 GI |
1994 | hours. Selective self-tests are helpful if (based on SYSLOG error |
1995 | messages, previous failed self-tests, or SMART error log entries) you | |
832b75ed GG |
1996 | suspect that a disk is having problems at a particular range of |
1997 | Logical Block Addresses (LBAs). | |
f9e10201 | 1998 | .Sp |
ee38a438 | 1999 | Selective self-tests can be run during normal system operation (unless |
f9e10201 JD |
2000 | done in captive mode \- see the \*(Aq\-C\*(Aq option below). |
2001 | .Sp | |
ee38a438 | 2002 | The following variants of the selective self-test command use spans based |
a37e7145 | 2003 | on the ranges from past tests already stored on the disk: |
f9e10201 | 2004 | .Sp |
a37e7145 | 2005 | .I select,redo[+SIZE] |
2127e193 | 2006 | \- [ATA only] redo the last SMART Selective Self Test using the same LBA |
f9e10201 JD |
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 | |
a37e7145 | 2011 | For example the commands: |
f9e10201 | 2012 | .Vb 3 |
a86ec89e GI |
2013 | smartctl \-t select,10\-20 /dev/sda |
2014 | smartctl \-t select,redo /dev/sda | |
2015 | smartctl \-t select,redo+20 /dev/sda | |
f9e10201 | 2016 | .Ve |
a37e7145 | 2017 | have the same effect as: |
f9e10201 | 2018 | .Vb 3 |
a86ec89e GI |
2019 | smartctl \-t select,10\-20 /dev/sda |
2020 | smartctl \-t select,10\-20 /dev/sda | |
2021 | smartctl \-t select,10\-29 /dev/sda | |
f9e10201 JD |
2022 | .Ve |
2023 | .Sp | |
a37e7145 | 2024 | .I select,next[+SIZE] |
2127e193 | 2025 | \- [ATA only] runs a SMART Selective Self Test on the LBA range which |
f9e10201 JD |
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 | |
a37e7145 | 2030 | For example the commands: |
f9e10201 | 2031 | .Vb 3 |
a86ec89e GI |
2032 | smartctl \-t select,0\-999 /dev/sda |
2033 | smartctl \-t select,next /dev/sda | |
2034 | smartctl \-t select,next+2000 /dev/sda | |
f9e10201 | 2035 | .Ve |
a37e7145 | 2036 | have the same effect as: |
f9e10201 | 2037 | .Vb 3 |
a86ec89e GI |
2038 | smartctl \-t select,0\-999 /dev/sda |
2039 | smartctl \-t select,1000\-1999 /dev/sda | |
2040 | smartctl \-t select,2000\-3999 /dev/sda | |
f9e10201 JD |
2041 | .Ve |
2042 | .Sp | |
a37e7145 | 2043 | If the last test ended at the last LBA of the disk, the new range starts |
f9e10201 | 2044 | at LBA 0. The span size of the last span of a disk is adjusted such that |
a37e7145 | 2045 | the total number of spans to check the full disk will not be changed |
f9e10201 JD |
2046 | by future uses of \*(Aq\-t select,next\*(Aq. |
2047 | .Sp | |
a37e7145 | 2048 | .I select,cont[+SIZE] |
f9e10201 JD |
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 | |
832b75ed | 2053 | .I afterselect,on |
ee38a438 | 2054 | \- [ATA only] perform an offline read scan after a Selective self-test |
f9e10201 JD |
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 | |
ee38a438 | 2057 | specified in the Selective self-test pass the test with no errors |
832b75ed | 2058 | found, then read scan the \fBremainder\fP of the disk. If the device |
ee38a438 | 2059 | is powered-cycled while this read scan is in progress, the read scan |
832b75ed GG |
2060 | will be automatically resumed after a time specified by the pending |
2061 | timer (see below). The value of this option is preserved between | |
ee38a438 | 2062 | selective self-tests. |
f9e10201 | 2063 | .Sp |
832b75ed | 2064 | .I afterselect,off |
2127e193 | 2065 | \- [ATA only] do not read scan the remainder of the disk after a |
ee38a438 | 2066 | Selective self-test has completed. This option must be use together |
832b75ed | 2067 | with one or more of the \fIselect,N\-M\fP options above. The value of this |
ee38a438 | 2068 | option is preserved between selective self-tests. |
f9e10201 JD |
2069 | .Sp |
2070 | .I pending,N | |
2127e193 | 2071 | \- [ATA only] set the pending offline read scan timer to N minutes. |
832b75ed | 2072 | Here N is an integer in the range from 0 to 65535 inclusive. If the |
ee38a438 GI |
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 | |
832b75ed | 2075 | option must be use together with one or more of the \fIselect,N\-M\fP |
f9e10201 JD |
2076 | options above. |
2077 | The value of this option is preserved between selective self-tests. | |
2078 | .Sp | |
cfbba5b9 GI |
2079 | .I vendor,N |
2080 | \- [ATA only] issues the ATA command SMART EXECUTE OFF-LINE IMMEDIATE | |
f9e10201 JD |
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 | |
a7e8ffec | 2084 | T13/1699-D Revision 6a (ATA8-ACS). Note that the subcommands |
f9e10201 JD |
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 | |
cfbba5b9 GI |
2089 | \fBWARNING: Only run subcommands documented by the vendor of the |
2090 | device.\fP | |
f9e10201 | 2091 | .Sp |
d2e702cf | 2092 | Example for some Intel SSDs only: |
f9e10201 | 2093 | The subcommand 0x40 (\*(Aq\-t vendor,0x40\*(Aq) clears the timed workload |
a7e8ffec GI |
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. | |
f9e10201 | 2097 | .Sp |
d008864d | 2098 | .I force |
ee38a438 GI |
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 | |
d008864d | 2101 | test. |
832b75ed GG |
2102 | .TP |
2103 | .B \-C, \-\-captive | |
f9e10201 JD |
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 | |
832b75ed GG |
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 | |
f9e10201 | 2110 | .Sp |
ee38a438 | 2111 | [SCSI] Runs the self-test in "Foreground" mode. |
832b75ed GG |
2112 | .TP |
2113 | .B \-X, \-\-abort | |
ee38a438 | 2114 | Aborts non-captive SMART Self Tests. Note that this |
832b75ed GG |
2115 | command will abort the Offline Immediate Test routine only if your |
2116 | disk has the "Abort Offline collection upon new command" capability. | |
f9e10201 | 2117 | .Sp |
2127e193 GI |
2118 | .SH ATA, SCSI command sets and SAT |
2119 | In the past there has been a clear distinction between storage devices | |
f9e10201 JD |
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 | |
2127e193 | 2124 | IEEE 1394 storage devices use the SCSI command set externally but |
f9e10201 | 2125 | almost always contain ATA or SATA disks (or flash). The storage |
2127e193 GI |
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, | |
f9e10201 | 2130 | READ CAPACITY, READ and WRITE commands, or their ATA equivalents. Since |
2127e193 GI |
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 | |
f9e10201 | 2134 | need arises. An important note here is that "lower level" may be in |
2127e193 GI |
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 | |
f9e10201 JD |
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. | |
2127e193 GI |
2143 | .PP |
2144 | The relevance to smartmontools (and hence smartctl) is that its | |
f9e10201 | 2145 | interactions with disks fall solidly into the "1%" category. So even |
2127e193 GI |
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 | |
f9e10201 JD |
2150 | command set of the device. |
2151 | In some cases the \*(Aq\-d sat\*(Aq option is needed on the command line. | |
2127e193 GI |
2152 | .PP |
2153 | There are also virtual disks which typically have no useful information | |
f9e10201 JD |
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 | |
2127e193 GI |
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 | |
f9e10201 JD |
2160 | browser. |
2161 | .Sp | |
832b75ed | 2162 | .SH EXAMPLES |
a86ec89e | 2163 | .B smartctl \-a /dev/sda |
f9e10201 JD |
2164 | .br |
2165 | Print a large amount of SMART information for drive /dev/sda. | |
2127e193 | 2166 | .PP |
a86ec89e | 2167 | .B smartctl \-s off /dev/sdd |
f9e10201 JD |
2168 | .br |
2169 | Disable SMART monitoring and data log collection on drive /dev/sdd. | |
832b75ed | 2170 | .PP |
a86ec89e | 2171 | .B smartctl \-\-smart=on \-\-offlineauto=on \-\-saveauto=on /dev/sda |
f9e10201 | 2172 | .br |
a86ec89e | 2173 | Enable SMART on drive /dev/sda, enable automatic offline |
832b75ed | 2174 | testing every four hours, and enable autosaving of |
f9e10201 | 2175 | SMART Attributes. This is a good start-up line for your system's |
832b75ed GG |
2176 | init files. You can issue this command on a running system. |
2177 | .PP | |
a86ec89e | 2178 | .B smartctl \-t long /dev/sdc |
f9e10201 | 2179 | .br |
a86ec89e | 2180 | Begin an extended self-test of drive /dev/sdc. You can issue this |
ee38a438 | 2181 | command on a running system. The results can be seen in the self-test |
f9e10201 | 2182 | log visible with the \*(Aq\-l selftest\*(Aq option after it has completed. |
832b75ed | 2183 | .PP |
a86ec89e | 2184 | .B smartctl \-s on \-t offline /dev/sda |
f9e10201 | 2185 | .br |
832b75ed | 2186 | Enable SMART on the disk, and begin an immediate offline test of |
a86ec89e | 2187 | drive /dev/sda. You can issue this command on a running system. The |
832b75ed | 2188 | results are only used to update the SMART Attributes, visible |
f9e10201 JD |
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. | |
832b75ed | 2191 | .PP |
a86ec89e | 2192 | .B smartctl \-A \-v 9,minutes /dev/sda |
f9e10201 | 2193 | .br |
ee38a438 | 2194 | Shows the vendor Attributes, when the disk stores its power-on time |
832b75ed GG |
2195 | internally in minutes rather than hours. |
2196 | .PP | |
a86ec89e | 2197 | .B smartctl \-q errorsonly \-H \-l selftest /dev/sda |
f9e10201 | 2198 | .br |
832b75ed | 2199 | Produces output only if the device returns failing SMART status, |
ee38a438 | 2200 | or if some of the logged self-tests ended with errors. |
832b75ed | 2201 | .PP |
a86ec89e | 2202 | .B smartctl \-q silent \-a /dev/sda |
f9e10201 | 2203 | .br |
a86ec89e | 2204 | Examine all SMART data for device /dev/sda, but produce no |
832b75ed GG |
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 | |
ee38a438 | 2209 | self-test log, or if there are errors recorded in the disk error log. |
832b75ed | 2210 | .PP |
cfbba5b9 | 2211 | .B smartctl \-a \-d 3ware,0 /dev/twl0 |
f9e10201 | 2212 | .br |
cfbba5b9 GI |
2213 | Examine all SMART data for the first SATA (not SAS) disk connected to a |
2214 | 3ware RAID 9750 controller card. | |
832b75ed | 2215 | .PP |
2127e193 | 2216 | .B smartctl \-t long \-d areca,4 /dev/sg2 |
f9e10201 | 2217 | .br |
ee38a438 | 2218 | Start a long self-test on the fourth SATA disk connected to an Areca RAID |
2127e193 GI |
2219 | controller addressed by /dev/sg2. |
2220 | .PP | |
2127e193 | 2221 | .B smartctl \-a \-d hpt,1/3 /dev/sda (under Linux) |
f9e10201 | 2222 | .br |
2127e193 | 2223 | .B smartctl \-a \-d hpt,1/3 /dev/hptrr (under FreeBSD) |
f9e10201 JD |
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. | |
4d59bff9 | 2227 | .PP |
2127e193 | 2228 | .B smartctl \-t short \-d hpt,1/1/2 /dev/sda (under Linux) |
f9e10201 | 2229 | .br |
2127e193 | 2230 | .B smartctl \-t short \-d hpt,1/1/2 /dev/hptrr (under FreeBSD) |
f9e10201 | 2231 | .br |
ee38a438 | 2232 | Start a short self-test on the (S)ATA disk connected to second pmport on the |
4d59bff9 GG |
2233 | first channel of the first HighPoint RocketRAID controller card. |
2234 | .PP | |
a86ec89e | 2235 | .B smartctl \-t select,10\-100 \-t select,30\-300 \-t afterselect,on \-t pending,45 /dev/sda |
f9e10201 | 2236 | .br |
ee38a438 | 2237 | Run a selective self-test on LBAs 10 to 100 and 30 to 300. After the |
f9e10201 JD |
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. | |
832b75ed | 2241 | .PP |
ba59cff1 | 2242 | .B smartctl \-a \-d cciss,0 /dev/cciss/c0d0 |
f9e10201 | 2243 | .br |
ba59cff1 GG |
2244 | Examine all SMART data for the first SCSI disk connected to a cciss |
2245 | RAID controller card. | |
f9e10201 | 2246 | .Sp |
a86ec89e GI |
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 | |
832b75ed | 2250 | \fBsmartctl\fP is 0 (all bits turned off). If a problem occurs, or an |
ee38a438 | 2251 | error, potential error, or fault is detected, then a non-zero status |
a86ec89e GI |
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 | |
832b75ed GG |
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: | |
cfbba5b9 | 2260 | Device open failed, device did not return an IDENTIFY DEVICE structure, |
f9e10201 | 2261 | or device is in a low-power mode (see \*(Aq\-n\*(Aq option above). |
832b75ed GG |
2262 | .TP |
2263 | .B Bit 2: | |
d008864d | 2264 | Some SMART or other ATA command to the disk failed, or there was a checksum |
f9e10201 | 2265 | error in a SMART data structure (see \*(Aq\-b\*(Aq option above). |
832b75ed GG |
2266 | .TP |
2267 | .B Bit 3: | |
2268 | SMART status check returned "DISK FAILING". | |
2269 | .TP | |
2270 | .B Bit 4: | |
a37e7145 | 2271 | We found prefail Attributes <= threshold. |
832b75ed GG |
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 | |
f9e10201 | 2276 | past. |
832b75ed GG |
2277 | .TP |
2278 | .B Bit 6: | |
2279 | The device error log contains records of errors. | |
2280 | .TP | |
2281 | .B Bit 7: | |
ee38a438 | 2282 | The device self-test log contains records of errors. |
cfbba5b9 | 2283 | [ATA only] Failed self-tests outdated by a newer successful extended |
ee38a438 | 2284 | self-test are ignored. |
d008864d | 2285 | .PP |
832b75ed | 2286 | To test within the shell for whether or not the different bits are |
d2e702cf GI |
2287 | turned on or off, you can use the following type of construction |
2288 | (which should work with any POSIX compatible shell): | |
f9e10201 | 2289 | .br |
832b75ed | 2290 | .B smartstat=$(($? & 8)) |
f9e10201 | 2291 | .br |
832b75ed GG |
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. | |
d2e702cf GI |
2297 | .PP |
2298 | This shell script prints all status bits: | |
f9e10201 | 2299 | .Vb 5 |
d2e702cf GI |
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)) | |
d008864d | 2304 | done |
f9e10201 JD |
2305 | .Ve |
2306 | .Sp | |
d2e702cf GI |
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 | |
f9e10201 | 2315 | drive database (see \*(Aq\-B\*(Aq option). |
d2e702cf GI |
2316 | .\" %ENDIF ENABLE_DRIVEDB |
2317 | .TP | |
2318 | .B /usr/local/etc/smart_drivedb.h | |
f9e10201 JD |
2319 | optional local drive database (see \*(Aq\-B\*(Aq option). |
2320 | .Sp | |
d2e702cf | 2321 | .\" %ENDIF NOT OS Windows |
ee38a438 | 2322 | .SH AUTHORS |
a86ec89e | 2323 | \fBBruce Allen\fP (project initiator), |
ee38a438 | 2324 | .br |
a86ec89e | 2325 | \fBChristian Franke\fP (project manager, Windows port and all sort of things), |
ee38a438 | 2326 | .br |
a86ec89e | 2327 | \fBDouglas Gilbert\fP (SCSI subsystem), |
ee38a438 | 2328 | .br |
a86ec89e | 2329 | \fBVolker Kuhlmann\fP (moderator of support and database mailing list), |
d2e702cf | 2330 | .br |
a86ec89e | 2331 | \fBGabriele Pohl\fP (wiki & development team support), |
d2e702cf | 2332 | .br |
a86ec89e | 2333 | \fBAlex Samorukov\fP (FreeBSD port and more, new Trac wiki). |
f9e10201 | 2334 | .PP |
a86ec89e GI |
2335 | Many other individuals have made contributions and corrections, |
2336 | see AUTHORS, ChangeLog and repository files. | |
f9e10201 | 2337 | .PP |
a86ec89e GI |
2338 | The first smartmontools code was derived from the smartsuite package, |
2339 | written by Michael Cornwell and Andre Hedrick. | |
f9e10201 | 2340 | .Sp |
a86ec89e GI |
2341 | .SH REPORTING BUGS |
2342 | To submit a bug report, create a ticket in smartmontools wiki: | |
d2e702cf | 2343 | .br |
f9e10201 | 2344 | <\fBhttps://www.smartmontools.org/\fP>. |
d2e702cf | 2345 | .br |
a86ec89e | 2346 | Alternatively send the info to the smartmontools support mailing list: |
d2e702cf | 2347 | .br |
f9e10201 JD |
2348 | <\fBhttps://listi.jpberlin.de/mailman/listinfo/smartmontools-support\fB>. |
2349 | .Sp | |
d2e702cf | 2350 | .SH SEE ALSO |
a86ec89e GI |
2351 | \fBsmartd\fP(8). |
2352 | .\" %IF ENABLE_UPDATE_SMART_DRIVEDB | |
2353 | .br | |
2354 | \fBupdate-smart-drivedb\fP(8). | |
2355 | .\" %ENDIF ENABLE_UPDATE_SMART_DRIVEDB | |
f9e10201 | 2356 | .Sp |
d2e702cf GI |
2357 | .SH REFERENCES |
2358 | Please see the following web site for more info: | |
f9e10201 JD |
2359 | <\fBhttps://www.smartmontools.org/\fP> |
2360 | .PP | |
832b75ed GG |
2361 | An introductory article about smartmontools is \fIMonitoring Hard |
2362 | Disks with SMART\fP, by Bruce Allen, Linux Journal, January 2004, | |
f9e10201 JD |
2363 | pages 74\(en77. |
2364 | See <\fBhttps://www.linuxjournal.com/article/6983\fP>. | |
2365 | .PP | |
832b75ed GG |
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 | |
f9e10201 | 2368 | volume of the \*(AqAT Attachment with Packet Interface-7\*(Aq (ATA/ATAPI-7) |
e9583e0c GI |
2369 | specification Revision 4b. This documents the SMART functionality which the |
2370 | \fBsmartmontools\fP utilities provide access to. | |
f9e10201 | 2371 | .PP |
ee38a438 GI |
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 | |
e9583e0c | 2374 | publications of the Small Form Factors (SFF) Committee. |
f9e10201 | 2375 | .PP |
e9583e0c | 2376 | Links to these and other documents may be found on the Links page of the |
f9e10201 JD |
2377 | \fBsmartmontools\fP Wiki at <\fBhttps://www.smartmontools.org/wiki/Links\fP>. |
2378 | .Sp | |
a86ec89e GI |
2379 | .SH PACKAGE VERSION |
2380 | CURRENT_SVN_VERSION CURRENT_SVN_DATE CURRENT_SVN_REV | |
2381 | .br | |
f9e10201 | 2382 | $Id: smartctl.8.in 4588 2017-11-04 15:15:32Z chrfranke $ |