]>
Commit | Line | Data |
---|---|---|
832b75ed | 1 | .ig |
a37e7145 | 2 | Copyright (C) 2002-7 Bruce Allen <smartmontools-support@lists.sourceforge.net> |
832b75ed | 3 | |
a37e7145 | 4 | $Id: smartctl.8.in,v 1.103 2007/09/06 08:48:55 ballen4705 Exp $ |
832b75ed GG |
5 | |
6 | This program is free software; you can redistribute it and/or modify it | |
7 | under the terms of the GNU General Public License as published by the Free | |
8 | Software Foundation; either version 2, or (at your option) any later | |
9 | version. | |
10 | ||
11 | You should have received a copy of the GNU General Public License (for | |
12 | example COPYING); if not, write to the Free Software Foundation, Inc., 675 | |
13 | Mass Ave, Cambridge, MA 02139, USA. | |
14 | ||
15 | This code was originally developed as a Senior Thesis by Michael Cornwell | |
16 | at the Concurrent Systems Laboratory (now part of the Storage Systems | |
17 | Research Center), Jack Baskin School of Engineering, University of | |
18 | California, Santa Cruz. http://ssrc.soe.ucsc.edu/ | |
19 | ||
20 | .. | |
21 | .TH SMARTCTL 8 CURRENT_CVS_DATE CURRENT_CVS_VERSION CURRENT_CVS_DATE | |
22 | .SH NAME | |
23 | \fBsmartctl\fP \- Control and Monitor Utility for SMART Disks | |
24 | ||
25 | .SH SYNOPSIS | |
26 | .B smartctl [options] device | |
27 | ||
28 | .SH FULL PATH | |
29 | .B /usr/local/sbin/smartctl | |
30 | ||
31 | .SH PACKAGE VERSION | |
32 | CURRENT_CVS_VERSION released CURRENT_CVS_DATE at CURRENT_CVS_TIME | |
33 | ||
34 | .SH DESCRIPTION | |
35 | \fBsmartctl\fP controls the Self\-Monitoring, Analysis and Reporting | |
36 | Technology (SMART) system built into many ATA\-3 and later ATA, IDE and | |
37 | SCSI\-3 hard drives. The purpose of SMART is to monitor the reliability | |
38 | of the hard drive and predict drive failures, and to carry out | |
39 | different types of drive self\-tests. This version of \fBsmartctl\fP | |
40 | is compatible with ATA/ATAPI\-7 and earlier standards (see REFERENCES | |
41 | below) | |
42 | ||
43 | \fBsmartctl\fP is a command line utility designed to perform SMART | |
44 | tasks such as printing the SMART self\-test and error logs, enabling | |
45 | and disabling SMART automatic testing, and initiating device | |
46 | self\-tests. Note: if the user issues a SMART command that is | |
47 | (apparently) not implemented by the device, \fBsmartctl\fP will print | |
48 | a warning message but issue the command anyway (see the \fB\-T, | |
49 | \-\-tolerance\fP option below). This should not cause problems: on | |
50 | most devices, unimplemented SMART commands issued to a drive are | |
51 | ignored and/or return an error. | |
52 | ||
53 | \fBsmartctl\fP also provides support for polling TapeAlert messages | |
54 | from SCSI tape drives and changers. | |
55 | ||
56 | The user must specify the device to be controlled or interrogated as | |
57 | the final argument to \fBsmartctl\fP. Device paths are as follows: | |
58 | .IP \fBLINUX\fP: 9 | |
59 | Use the forms \fB"/dev/hd[a\-t]"\fP for IDE/ATA | |
60 | devices, and \fB"/dev/sd[a\-z]"\fP for SCSI devices. For | |
61 | SCSI Tape Drives and Changers with TapeAlert support use the devices | |
62 | \fB"/dev/nst*"\fP and \fB"/dev/sg*"\fP. | |
63 | For SATA disks accessed with libata, use \fB"/dev/sd[a\-z]"\fP | |
64 | and append \fB"\-d ata"\fP. For disks behind 3ware controllers | |
65 | you may need \fB"/dev/sd[a\-z]"\fP or \fB"/dev/twe[0\-9]"\fP | |
4d59bff9 GG |
66 | or \fB"/dev/twa[0\-9]"\fP: see details below. For disks behind |
67 | HighPoint RocketRAID controllers you may need \fB"/dev/sd[a\-z]"\fP. | |
832b75ed GG |
68 | More general paths (such as devfs ones) may also be specified. |
69 | .IP \fBDARWIN\fP: 9 | |
70 | Use the forms \fB/dev/disk[0\-9]\fP or equivalently \fBdisk[0\-9]\fP or equivalently | |
71 | \fB/dev/rdisk[0\-9]\fP. Long forms are also available: please use \'\-h\' to see some | |
72 | examples. Note that there is currently no Darwin SCSI support. | |
73 | .IP \fBFREEBSD\fP: 9 | |
74 | Use the forms \fB"/dev/ad[0\-9]+"\fP for IDE/ATA | |
75 | devices and \fB"/dev/da[0\-9]+"\fP for SCSI devices. | |
76 | .IP \fBNETBSD/OPENBSD\fP: 9 | |
77 | Use the form \fB"/dev/wd[0\-9]+c"\fP for IDE/ATA | |
78 | devices. For SCSI disk and tape devices, use the device names | |
79 | \fB"/dev/sd[0\-9]+c"\fP and \fB"/dev/st[0\-9]+c"\fP respectively. | |
80 | Be sure to specify the correct "whole disk" partition letter for | |
81 | your architecture. | |
82 | .IP \fBSOLARIS\fP: 9 | |
83 | Use the forms \fB"/dev/rdsk/c?t?d?s?"\fP for IDE/ATA and SCSI disk | |
84 | devices, and \fB"/dev/rmt/*"\fP for SCSI tape devices. | |
a37e7145 GG |
85 | .IP \fBWINDOWS\ 9x/ME\fP: 9 |
86 | Use the forms \fB"/dev/hd[a\-d]"\fP for standard IDE/ATA devices | |
4d59bff9 GG |
87 | accessed via SMARTVSD.VXD, and \fB"/dev/hd[e\-h]"\fP for additional devices |
88 | accessed via a patched SMARTVSE.VXD (see INSTALL file for details). | |
ba59cff1 | 89 | Use the form \fB"/dev/scsi[0\-9][0\-f]"\fP for SCSI devices via an aspi dll |
a37e7145 GG |
90 | on ASPI adapter 0\-9, ID 0\-15. The prefix \fB"/dev/"\fP is optional. |
91 | .IP \fBWINDOWS\ NT4/2000/XP/2003/Vista\fP: 9 | |
92 | Use the forms \fB"/dev/sd[a\-z]"\fP for IDE/(S)ATA and SCSI disks | |
93 | "\\\\.\\PhysicalDrive[0\-25]" (where "a" maps to "0"). | |
94 | These disks can also be referred to as \fB"/dev/pd[0\-255]"\fP for | |
95 | "\\\\.\\PhysicalDrive[0\-255]". | |
96 | ATA disks can also be referred to as \fB"/dev/hd[a\-z]"\fP for | |
97 | "\\\\.\\PhysicalDrive[0\-25]". | |
98 | Use one the forms \fB"/dev/tape[0\-255]"\fP, \fB"/dev/st[0\-255]"\fP, | |
99 | or \fB"/dev/nst[0\-255]"\fP for SCSI tape drives "\\\\.\\Tape[0\-255]". | |
100 | ||
101 | Alternatively, drive letters \fB"X:"\fP or \fB"X:\\"\fP may be used to | |
102 | specify the physical drive behind a mounted partition. | |
103 | ||
104 | For disks behind 3ware 9000 controllers use \fB"/dev/sd[a\-z],N"\fP where | |
4d59bff9 | 105 | N specifies the disk number (3ware \'port\') behind the controller |
a37e7145 | 106 | providing the logical drive (\'unit\') specified by \fB"/dev/sd[a\-z]"\fP. |
9ebc753d GG |
107 | Alternatively, use \fB"/dev/tw_cli/cx/py"\fP for controller x, port y |
108 | to run the \'tw_cli\' tool and parse the output. This provides limited | |
a37e7145 | 109 | monitoring (\'\-i\', \'\-c\', \'\-A\' below) if SMART support is missing |
9ebc753d GG |
110 | in the driver. Use \fB"/dev/tw_cli/stdin"\fP or \fB"/dev/tw_cli/clip"\fP |
111 | to parse CLI or 3DM output from standard input or clipboard. | |
a37e7145 | 112 | The option \'\-d 3ware,N\' is not necessary on Windows. |
832b75ed GG |
113 | The prefix \fB"/dev/"\fP is optional. |
114 | .IP \fBCYGWIN\fP: 9 | |
a37e7145 | 115 | See "WINDOWS NT4/2000/XP/2003/Vista" above. |
832b75ed GG |
116 | .IP \fBOS/2,eComStation\fP: 9 |
117 | Use the form \fB"/dev/hd[a\-z]"\fP for IDE/ATA devices. | |
118 | .PP | |
a37e7145 GG |
119 | if \'\-\' is specified as the device path, \fBsmartctl\fP reads and |
120 | interprets it's own debug output from standard input. | |
121 | See \'\-r ataioctl\' below for details. | |
122 | .PP | |
832b75ed GG |
123 | Based on the device path, \fBsmartctl\fP will guess the device type |
124 | (ATA or SCSI). If necessary, the \'\-d\' option can be used to over\-ride | |
125 | this guess | |
126 | ||
127 | Note that the printed output of \fBsmartctl\fP displays most numerical | |
128 | values in base 10 (decimal), but some values are displayed in base 16 | |
4d59bff9 | 129 | (hexadecimal). To distinguish them, the base 16 values are always |
832b75ed GG |
130 | displayed with a leading \fB"0x"\fP, for example: "0xff". This man |
131 | page follows the same convention. | |
132 | ||
133 | .PP | |
134 | .SH OPTIONS | |
135 | .PP | |
136 | The options are grouped below into several categories. \fBsmartctl\fP | |
137 | will execute the corresponding commands in the order: INFORMATION, | |
138 | ENABLE/DISABLE, DISPLAY DATA, RUN/ABORT TESTS. | |
139 | ||
140 | SCSI devices only accept the options \fB\-h, \-V, \-i, \-a, \-A, \-d, | |
4d59bff9 GG |
141 | \-s, \-S,\-H, \-t, \-C, \-l background, \-l error, \-l selftest, \-r,\fP |
142 | and \fB\-X\fP. TapeAlert devices only accept the options \fB\-h, \-V, | |
143 | \-i, \-a, \-A, \-d, \-s, \-S, \-t, \-l error, \-l selftest, \-r,\fP | |
832b75ed GG |
144 | and \fB\-H\fP. |
145 | ||
146 | Long options are not supported on all systems. Use | |
147 | .B \'smartctl \-h\' | |
148 | to see the available options. | |
149 | ||
150 | .TP | |
151 | .B SHOW INFORMATION OPTIONS: | |
152 | .TP | |
153 | .B \-h, \-\-help, \-\-usage | |
154 | Prints a usage message to STDOUT and exits. | |
155 | .TP | |
156 | .B \-V, \-\-version, \-\-copyright, \-\-license | |
157 | Prints version, copyright, license, home page and CVS\-id information | |
158 | for your copy of \fBsmartctl\fP to STDOUT and then exits. Please | |
159 | include this information if you are reporting bugs or problems. | |
160 | .TP | |
161 | .B \-i, \-\-info | |
162 | Prints the device model number, serial number, firmware version, and | |
163 | ATA Standard version/revision information. Says if the device | |
164 | supports SMART, and if so, whether SMART support is currently enabled | |
165 | or disabled. If the device supports Logical Block Address mode (LBA | |
166 | mode) print current user drive capacity in bytes. (If drive is has a | |
167 | user protected area reserved, or is "clipped", this may be smaller | |
168 | than the potential maximum drive capacity.) Indicates if the drive is | |
169 | in the smartmontools database (see \'\-v\' options below). If so, the | |
4d59bff9 GG |
170 | drive model family may also be printed. If \'\-n\' (see below) is |
171 | specified, the power mode of the drive is printed. | |
832b75ed GG |
172 | .TP |
173 | .B \-a, \-\-all | |
174 | Prints all SMART information about the disk, or TapeAlert information | |
175 | about the tape drive or changer. For ATA devices this is equivalent | |
176 | to | |
177 | .nf | |
a37e7145 | 178 | \'\-H \-i \-c \-A \-l error \-l selftest \-l selective\' |
832b75ed GG |
179 | .fi |
180 | and for SCSI, this is equivalent to | |
181 | .nf | |
182 | \'\-H \-i \-A \-l error \-l selftest\'. | |
183 | .fi | |
184 | Note that for ATA disks this does \fBnot\fP enable the \'\-l | |
185 | directory\' option. | |
186 | ||
187 | .TP | |
188 | .B RUN\-TIME BEHAVIOR OPTIONS: | |
189 | .TP | |
190 | .B \-q TYPE, \-\-quietmode=TYPE | |
191 | Specifies that \fBsmartctl\fP should run in one of the two quiet modes | |
192 | described here. The valid arguments to this option are: | |
193 | ||
194 | .I errorsonly | |
195 | \- only print: For the \'\-l error\' option, if nonzero, the number | |
196 | of errors recorded in the SMART error log and the power\-on time when | |
197 | they occurred; For the \'\-l selftest\' option, errors recorded in the device | |
198 | self\-test log; For the \'\-H\' option, SMART "disk failing" status or device | |
199 | Attributes (pre\-failure or usage) which failed either now or in the | |
200 | past; For the \'\-A\' option, device Attributes (pre\-failure or usage) | |
201 | which failed either now or in the past. | |
202 | ||
203 | .I silent | |
204 | \- print no output. The only way to learn about what was found is to | |
205 | use the exit status of \fBsmartctl\fP (see RETURN VALUES below). | |
a37e7145 GG |
206 | |
207 | .I noserial | |
208 | \- Do not print the serial number of the device. | |
209 | ||
832b75ed GG |
210 | .TP |
211 | .B \-d TYPE, \-\-device=TYPE | |
212 | Specifies the type of the device. The valid arguments to this option | |
ba59cff1 GG |
213 | are \fIata\fP, \fIscsi\fP, \fIsat\fP, \fImarvell\fP, \fI3ware,N\fP, and \fIhpt,L/M\fP, |
214 | \fIcciss,N\fP or \fIhpt,L/M/N\fP. If this option is not used then | |
215 | \fBsmartctl\fP will attempt to guess the device type from the device name. | |
4d59bff9 GG |
216 | |
217 | The \'sat\' device type is for ATA disks that have a SCSI to ATA | |
218 | Translation (SAT) Layer (SATL) between the disk and the operating system. | |
219 | SAT defines two ATA PASS THROUGH SCSI commands, one 12 bytes long and | |
220 | the other 16 bytes long that \fBsmartctl\fP will utilize when this device | |
221 | type is selected. The default is the 16 byte variant which can be | |
222 | overridden with either \'\-d sat,12\' or \'\-d sat,16\'. | |
832b75ed GG |
223 | |
224 | Under Linux, to look at SATA disks behind Marvell SATA controllers | |
225 | (using Marvell's \'linuxIAL\' driver rather than libata driver) use \'\-d marvell\'. Such | |
226 | controllers show up as Marvell Technology Group Ltd. SATA I or II controllers | |
a37e7145 | 227 | using lspci, or using lspci \-n show a vendor ID 0x11ab and a device ID of |
832b75ed GG |
228 | either 0x5040, 0x5041, 0x5080, 0x5081, 0x6041 or 0x6081. The \'linuxIAL\' driver |
229 | seems not (yet?) available in the Linux kernel source tree, but should be available | |
230 | from system vendors (ftp://ftp.aslab.com/ is known to provide a patch with the driver). | |
231 | ||
4d59bff9 GG |
232 | Under Linux and FreeBSD, to look at ATA disks behind 3ware SCSI RAID controllers, |
233 | use syntax such as: | |
832b75ed GG |
234 | .nf |
235 | \fBsmartctl \-a \-d 3ware,2 /dev/sda\fP | |
236 | .fi | |
237 | .nf | |
238 | \fBsmartctl \-a \-d 3ware,0 /dev/twe0\fP | |
239 | .fi | |
240 | .nf | |
241 | \fBsmartctl \-a \-d 3ware,1 /dev/twa0\fP | |
242 | .fi | |
243 | where in the argument \fI3ware,N\fP, the integer N is the disk number | |
244 | (3ware \'port\') within the 3ware ATA RAID controller. The allowed | |
a37e7145 GG |
245 | values of N are from 0 to 31 inclusive. The first two forms, which |
246 | refer to devices /dev/sda\-z and /dev/twe0\-15, may be used with 3ware | |
247 | series 6000, 7000, and 8000 series controllers that use the 3x\-xxxx | |
248 | driver. \fBNote that the /dev/sda\-z form is deprecated\fP starting | |
832b75ed GG |
249 | with the Linux 2.6 kernel series and may not be supported by the Linux |
250 | kernel in the near future. The final form, which refers to devices | |
a37e7145 GG |
251 | /dev/twa0\-15, must be used with 3ware 9000 series controllers, which |
252 | use the 3w\-9xxx driver. | |
832b75ed GG |
253 | |
254 | Note that if the special character device nodes /dev/twa? and | |
255 | /dev/twe? do not exist, or exist with the incorrect major or minor | |
256 | numbers, smartctl will recreate them on the fly. Typically /dev/twa0 | |
a37e7145 | 257 | refers to the first 9000\-series controller, /dev/twa1 refers to the |
832b75ed | 258 | second 9000 series controller, and so on. Likewise /dev/twe0 refers to |
a37e7145 | 259 | the first 6/7/8000\-series controller, /dev/twa1 refers to the second |
832b75ed GG |
260 | 6/7/8000 series controller, and so on. |
261 | ||
262 | Note that for the 6/7/8000 controllers, \fBany\fP of the physical | |
263 | disks can be queried or examined using \fBany\fP of the 3ware's SCSI | |
264 | logical device /dev/sd? entries. Thus, if logical device /dev/sda is | |
265 | made up of two physical disks (3ware ports zero and one) and logical | |
266 | device /dev/sdb is made up of two other physical disks (3ware ports | |
267 | two and three) then you can examine the SMART data on \fBany\fP of the | |
268 | four physical disks using \fBeither\fP SCSI device /dev/sda \fBor\fP | |
269 | /dev/sdb. If you need to know which logical SCSI device a particular | |
270 | physical disk (3ware port) is associated with, use the dmesg or SYSLOG | |
271 | output to show which SCSI ID corresponds to a particular 3ware unit, | |
272 | and then use the 3ware CLI or 3dm tool to determine which ports | |
273 | (physical disks) correspond to particular 3ware units. | |
274 | ||
275 | If the value of N corresponds to a port that does \fBnot\fP exist on | |
276 | the 3ware controller, or to a port that does not physically have a | |
277 | disk attached to it, the behavior of \fBsmartctl\fP depends upon the | |
278 | specific controller model, firmware, Linux kernel and platform. In | |
279 | some cases you will get a warning message that the device does not | |
280 | exist. In other cases you will be presented with \'void\' data for a | |
281 | non\-existent device. | |
282 | ||
283 | Note that if the /dev/sd? addressing form is used, then older 3w\-xxxx | |
284 | drivers do not pass the "Enable Autosave" | |
285 | (\'\fB\-S on\fP\') and "Enable Automatic Offline" (\'\fB\-o on\fP\') | |
286 | commands to the disk, and produce these types of harmless syslog error | |
287 | messages instead: "\fB3w\-xxxx: tw_ioctl(): Passthru size (123392) too | |
288 | big\fP". This can be fixed by upgrading to version 1.02.00.037 or | |
289 | later of the 3w\-xxxx driver, or by applying a patch to older | |
290 | versions. See \fBhttp://smartmontools.sourceforge.net/\fP for | |
a37e7145 | 291 | instructions. Alternatively, use the character device /dev/twe0\-15 interface. |
832b75ed GG |
292 | |
293 | The selective self\-test functions (\'\-t select,A\-B\') are only supported | |
294 | using the character device interface /dev/twa0\-15 and /dev/twe0\-15. | |
295 | The necessary WRITE LOG commands can not be passed through the SCSI | |
296 | interface. | |
297 | ||
4d59bff9 GG |
298 | .B 3ware controllers are supported under Linux, FreeBSD and Windows. |
299 | ||
300 | To look at (S)ATA disks behind HighPoint RocketRAID controllers, use syntax | |
301 | such as: | |
302 | .nf | |
303 | \fBsmartctl \-a \-d hpt,1/3 /dev/sda\fP | |
304 | .fi | |
305 | or | |
306 | .nf | |
307 | \fBsmartctl \-a \-d hpt,1/2/3 /dev/sda\fP | |
308 | .fi | |
309 | where in the argument \fIhpt,L/M\fP or \fIhpt,L/M/N\fP, the integer L is the | |
310 | controller id, the integer M is the channel number, and the integer N is the | |
311 | PMPort number if it is available. The allowed values of L are from 1 to 4 | |
312 | inclusive, M are from 1 to 8 inclusive and N from 1 to 4 if PMPort available. | |
a37e7145 | 313 | Note that the /dev/sda\-z form should be the device node which stands for |
4d59bff9 GG |
314 | the disks derived from the HighPoint RocketRAID controllers. And also |
315 | these values are limited by the model of the HighPoint RocketRAID controller. | |
316 | ||
317 | .B HighPoint RocketRAID controllers are currently ONLY supported under Linux. | |
832b75ed | 318 | |
ba59cff1 GG |
319 | .B cciss controllers are currently ONLY supported under Linux. |
320 | ||
832b75ed GG |
321 | .TP |
322 | .B \-T TYPE, \-\-tolerance=TYPE | |
323 | Specifies how tolerant \fBsmartctl\fP should be of ATA and SMART command | |
324 | failures. | |
325 | ||
326 | The behavior of \fBsmartctl\fP depends upon whether the command is | |
327 | "\fBoptional\fP" or "\fBmandatory\fP". Here "\fBmandatory\fP" means | |
328 | "required by the ATA/ATAPI\-5 Specification if the device implements | |
329 | the SMART command set" and "\fBoptional\fP" means "not required by the | |
330 | ATA/ATAPI\-5 Specification even if the device implements the SMART | |
331 | command set." The "\fBmandatory\fP" ATA and SMART commands are: (1) | |
332 | ATA IDENTIFY DEVICE, (2) SMART ENABLE/DISABLE ATTRIBUTE AUTOSAVE, (3) | |
333 | SMART ENABLE/DISABLE, and (4) SMART RETURN STATUS. | |
334 | ||
335 | The valid arguments to this option are: | |
336 | ||
337 | .I normal | |
338 | \- exit on failure of any \fBmandatory\fP SMART command, and ignore | |
339 | all failures of \fBoptional\fP SMART commands. This is the default. | |
340 | Note that on some devices, issuing unimplemented optional SMART | |
341 | commands doesn\'t cause an error. This can result in misleading | |
342 | \fBsmartctl\fP messages such as "Feature X not implemented", followed | |
343 | shortly by "Feature X: enabled". In most such cases, contrary to the | |
344 | final message, Feature X is \fBnot\fP enabled. | |
345 | ||
346 | .I conservative | |
347 | \- exit on failure of any \fBoptional\fP SMART command. | |
348 | ||
349 | .I permissive | |
350 | \- ignore failure(s) of \fBmandatory\fP SMART commands. This option | |
351 | may be given more than once. Each additional use of this option will | |
352 | cause one more additional failure to be ignored. Note that the use of | |
353 | this option can lead to messages like "Feature X not implemented", | |
354 | followed shortly by "Error: unable to enable Feature X". In a few | |
355 | such cases, contrary to the final message, Feature X \fBis\fP enabled. | |
356 | ||
357 | .I verypermissive | |
358 | \- equivalent to giving a large number of \'\-T permissive\' options: | |
359 | ignore failures of \fBany number\fP of \fBmandatory\fP SMART commands. | |
360 | Please see the note above. | |
361 | ||
362 | .TP | |
363 | .B \-b TYPE, \-\-badsum=TYPE | |
364 | Specifies the action \fBsmartctl\fP should take if a checksum error is | |
365 | detected in the: (1) Device Identity Structure, (2) SMART Self\-Test | |
366 | Log Structure, (3) SMART Attribute Value Structure, (4) SMART | |
367 | Attribute Threshold Structure, or (5) ATA Error Log Structure. | |
368 | ||
369 | The valid arguments to this option are: | |
370 | ||
371 | .I warn | |
372 | \- report the incorrect checksum but carry on in spite of it. This is the | |
373 | default. | |
374 | ||
375 | .I exit | |
376 | \- exit \fBsmartctl\fP. | |
377 | ||
378 | .I ignore | |
379 | \- continue silently without issuing a warning. | |
380 | ||
381 | .TP | |
382 | .B \-r TYPE, \-\-report=TYPE | |
383 | Intended primarily to help \fBsmartmontools\fP developers understand | |
384 | the behavior of \fBsmartmontools\fP on non\-conforming or poorly | |
385 | conforming hardware. This option reports details of \fBsmartctl\fP | |
386 | transactions with the device. The option can be used multiple times. | |
387 | When used just once, it shows a record of the ioctl() transactions | |
388 | with the device. When used more than once, the detail of these | |
389 | ioctl() transactions are reported in greater detail. The valid | |
390 | arguments to this option are: | |
391 | ||
392 | .I ioctl | |
393 | \- report all ioctl() transactions. | |
394 | ||
395 | .I ataioctl | |
396 | \- report only ioctl() transactions with ATA devices. | |
397 | ||
398 | .I scsiioctl | |
399 | \- report only ioctl() transactions with SCSI devices. Invoking this once | |
400 | shows the SCSI commands in hex and the corresponding status. Invoking | |
401 | it a second time adds a hex listing of the first 64 bytes of data send to, | |
402 | or received from the device. | |
403 | ||
404 | Any argument may include a positive integer to specify the level of detail | |
405 | that should be reported. The argument should be followed by a comma then | |
406 | the integer with no spaces. For example, | |
407 | .I ataioctl,2 | |
408 | The default | |
409 | level is 1, so \'\-r ataioctl,1\' and \'\-r ataioctl\' are equivalent. | |
410 | ||
a37e7145 GG |
411 | For testing purposes, the output of \'\-r ataioctl,2\' can later be parsed |
412 | by \fBsmartctl\fP itself if \'\-\' is used as device path argument. | |
413 | The ATA command input parameters, sector data and return values are | |
414 | reconstructed from the debug report read from stdin. | |
415 | Then \fBsmartctl\fP internally simulates an ATA device with the same | |
416 | behaviour. This is does not work for SCSI devices yet. | |
417 | ||
4d59bff9 GG |
418 | .TP |
419 | .B \-n POWERMODE, \-\-nocheck=POWERMODE | |
420 | Specifieds if \fBsmartctl\fP should exit before performing any checks | |
421 | when the device is in a low\-power mode. It may be used to prevent a disk | |
422 | from being spun\-up by \fBsmartctl\fP. The power mode is ignored by | |
423 | default. The allowed values of POWERMODE are: | |
424 | ||
425 | .I never | |
426 | \- check the device always, but print the power mode if \'\-i\' is | |
427 | specified. | |
428 | ||
429 | .I sleep | |
430 | \- check the device unless it is in SLEEP mode. | |
431 | ||
432 | .I standby | |
433 | \- check the device unless it is in SLEEP or STANDBY mode. In | |
434 | these modes most disks are not spinning, so if you want to prevent | |
435 | a disk from spinning up, this is probably what you want. | |
436 | ||
437 | .I idle | |
438 | \- check the device unless it is in SLEEP, STANDBY or IDLE mode. | |
439 | In the IDLE state, most disks are still spinning, so this is probably | |
440 | not what you want. | |
441 | ||
832b75ed GG |
442 | .TP |
443 | .B SMART FEATURE ENABLE/DISABLE COMMANDS: | |
444 | .IP | |
445 | .B Note: | |
446 | if multiple options are used to both enable and disable a | |
447 | feature, then | |
448 | .B both | |
449 | the enable and disable commands will be issued. The enable command | |
450 | will always be issued | |
451 | .B before | |
452 | the corresponding disable command. | |
453 | .TP | |
454 | .B \-s VALUE, \-\-smart=VALUE | |
455 | Enables or disables SMART on device. The valid arguments to | |
456 | this option are \fIon\fP and \fIoff\fP. Note that the command \'\-s on\' | |
457 | (perhaps used with with the \'\-o on\' and \'\-S on\' options) should be placed | |
458 | in a start\-up script for your machine, for example in rc.local or rc.sysinit. | |
459 | In principle the SMART feature settings are preserved over | |
460 | power\-cycling, but it doesn\'t hurt to be sure. It is not necessary (or | |
461 | useful) to enable SMART to see the TapeAlert messages. | |
462 | .TP | |
463 | .B \-o VALUE, \-\-offlineauto=VALUE | |
464 | Enables or disables SMART automatic offline test, which scans the drive | |
465 | every four hours for disk defects. This command can be given during normal | |
466 | system operation. The valid arguments to this option are \fIon\fP | |
467 | and \fIoff\fP. | |
468 | ||
469 | Note that the SMART automatic offline test command is listed as | |
470 | "Obsolete" in every version of the ATA and ATA/ATAPI Specifications. | |
471 | It was originally part of the SFF\-8035i Revision 2.0 specification, | |
472 | but was never part of any ATA specification. However it is | |
473 | implemented and used by many vendors. [Good documentation can be found | |
474 | in IBM\'s Official Published Disk Specifications. For example the IBM | |
475 | Travelstar 40GNX Hard Disk Drive Specifications (Revision 1.1, 22 | |
476 | April 2002, Publication # 1541, Document S07N\-7715\-02) page 164. You | |
477 | can also read the SFF\-8035i Specification \-\- see REFERENCES below.] | |
478 | You can tell if automatic offline testing is supported by seeing if | |
479 | this command enables and disables it, as indicated by the \'Auto | |
480 | Offline Data Collection\' part of the SMART capabilities report | |
481 | (displayed with \'\-c\'). | |
482 | ||
483 | SMART provides \fBthree\fP basic categories of testing. The | |
484 | \fBfirst\fP category, called "online" testing, has no effect on the | |
485 | performance of the device. It is turned on by the \'\-s on\' option. | |
486 | ||
487 | The \fBsecond\fP category of testing is called "offline" testing. This | |
488 | type of test can, in principle, degrade the device performance. The | |
489 | \'\-o on\' option causes this offline testing to be carried out, | |
490 | automatically, on a regular scheduled basis. Normally, the disk will | |
491 | suspend offline testing while disk accesses are taking place, and then | |
492 | automatically resume it when the disk would otherwise be idle, so in | |
493 | practice it has little effect. Note that a one\-time offline test can | |
494 | also be carried out immediately upon receipt of a user command. See | |
495 | the \'\-t offline\' option below, which causes a one\-time offline test | |
496 | to be carried out immediately. | |
497 | ||
498 | The choice (made by the SFF\-8035i and ATA specification authors) of | |
499 | the word \fItesting\fP for these first two categories is unfortunate, | |
500 | and often leads to confusion. In fact these first two categories of | |
501 | online and offline testing could have been more accurately described | |
502 | as online and offline \fBdata collection\fP. | |
503 | ||
504 | The results of this automatic or immediate offline testing (data | |
505 | collection) are reflected in the values of the SMART Attributes. | |
506 | Thus, if problems or errors are detected, the values of these | |
507 | Attributes will go below their failure thresholds; some types of | |
508 | errors may also appear in the SMART error log. These are visible with | |
509 | the \'\-A\' and \'\-l error\' options respectively. | |
510 | ||
511 | Some SMART attribute values are updated only during off\-line data | |
512 | collection activities; the rest are updated during normal operation of | |
513 | the device or during both normal operation and off\-line testing. The | |
514 | Attribute value table produced by the \'\-A\' option indicates this in | |
515 | the UPDATED column. Attributes of the first type are labeled | |
516 | "Offline" and Attributes of the second type are labeled "Always". | |
517 | ||
518 | The \fBthird\fP category of testing (and the \fIonly\fP category for | |
519 | which the word \'testing\' is really an appropriate choice) is "self" | |
520 | testing. This third type of test is only performed (immediately) when | |
521 | a command to run it is issued. The \'\-t\' and \'\-X\' options can be | |
522 | used to carry out and abort such self\-tests; please see below for | |
523 | further details. | |
524 | ||
525 | Any errors detected in the self testing will be shown in the | |
526 | SMART self\-test log, which can be examined using the \'\-l selftest\' | |
527 | option. | |
528 | ||
529 | \fBNote:\fP in this manual page, the word \fB"Test"\fP is used in | |
530 | connection with the second category just described, e.g. for the | |
531 | "offline" testing. The words \fB"Self\-test"\fP are used in | |
532 | connection with the third category. | |
533 | .TP | |
534 | .B \-S VALUE, \-\-saveauto=VALUE | |
535 | Enables or disables SMART autosave of device vendor\-specific | |
536 | Attributes. The valid arguments to this option are \fIon\fP | |
537 | and \fIoff\fP. Note that this feature is preserved across disk power | |
538 | cycles, so you should only need to issue it once. | |
539 | ||
540 | For SCSI devices this toggles the value of the Global Logging Target | |
541 | Save Disabled (GLTSD) bit in the Control Mode Page. Some disk | |
542 | manufacturers set this bit by default. This prevents error counters, | |
543 | power\-up hours and other useful data from being placed in non\-volatile | |
544 | storage, so these values may be reset to zero the next time the device | |
545 | is power\-cycled. If the GLTSD bit is set then \'smartctl \-a\' will | |
546 | issue a warning. Use \fIon\fP to clear the GLTSD bit and thus enable | |
547 | saving counters to non\-volatile storage. For extreme streaming\-video | |
548 | type applications you might consider using \fIoff\fP to set the GLTSD | |
549 | bit. | |
550 | ||
551 | .TP | |
552 | .B SMART READ AND DISPLAY DATA OPTIONS: | |
553 | .TP | |
554 | .B \-H, \-\-health | |
555 | Check: Ask the device to report its SMART health status or pending | |
556 | TapeAlert messages. SMART status is based on | |
557 | information that it has gathered from online and offline | |
558 | tests, which were used to determine/update its | |
559 | SMART vendor\-specific Attribute values. TapeAlert status is obtained | |
560 | by reading the TapeAlert log page. | |
561 | ||
562 | If the device reports failing health status, this means | |
563 | .B either | |
564 | that the device has already failed, | |
565 | .B or | |
566 | that it is predicting its own failure within the next 24 hours. If | |
567 | this happens, use the \'\-a\' option to get more information, and | |
568 | .B get your data off the disk and someplace safe as soon as you can. | |
569 | .TP | |
570 | .B \-c, \-\-capabilities | |
571 | Prints only the generic SMART capabilities. These show | |
572 | what SMART features are implemented and how the device will | |
573 | respond to some of the different SMART commands. For example it | |
574 | shows if the device logs errors, if it supports offline surface | |
575 | scanning, and so on. If the device can carry out self\-tests, this | |
576 | option also shows the estimated time required to run those tests. | |
577 | ||
578 | Note that the time required to run the Self\-tests (listed in minutes) | |
579 | are fixed. However the time required to run the Immediate Offline | |
580 | Test (listed in seconds) is variable. This means that if you issue a | |
581 | command to perform an Immediate Offline test with the \'\-t offline\' option, | |
582 | then the time may jump to a larger value and then count down as the | |
583 | Immediate Offline Test is carried out. Please see REFERENCES below | |
584 | for further information about the the flags and capabilities described | |
585 | by this option. | |
586 | .TP | |
587 | .B \-A, \-\-attributes | |
588 | Prints only the vendor specific SMART Attributes. The Attributes are | |
589 | numbered from 1 to 253 and have specific names and ID numbers. For | |
590 | example Attribute 12 is "power cycle count": how many times has the | |
591 | disk been powered up. | |
592 | ||
593 | Each Attribute has a "Raw" value, printed under the heading | |
594 | "RAW_VALUE", and a "Normalized" value printed under the heading | |
595 | "VALUE". [Note: \fBsmartctl\fP prints these values in base\-10.] In | |
596 | the example just given, the "Raw Value" for Attribute 12 would be the | |
597 | actual number of times that the disk has been power\-cycled, for | |
598 | example 365 if the disk has been turned on once per day for exactly | |
599 | one year. Each vendor uses their own algorithm to convert this "Raw" | |
600 | value to a "Normalized" value in the range from 1 to 254. Please keep | |
601 | in mind that \fBsmartctl\fP only reports the different Attribute | |
602 | types, values, and thresholds as read from the device. It does | |
603 | \fBnot\fP carry out the conversion between "Raw" and "Normalized" | |
604 | values: this is done by the disk\'s firmware. | |
605 | ||
606 | The conversion from Raw value to a quantity with physical units is | |
607 | not specified by the SMART standard. In most cases, the values printed | |
608 | by \fBsmartctl\fP are sensible. For example the temperature Attribute | |
609 | generally has its raw value equal to the temperature in Celsius. | |
610 | However in some cases vendors use unusual conventions. For example | |
611 | the Hitachi disk on my laptop reports its power\-on hours in minutes, | |
612 | not hours. Some IBM disks track three temperatures rather than one, in | |
613 | their raw values. And so on. | |
614 | ||
615 | Each Attribute also has a Threshold value (whose range is 0 to 255) | |
616 | which is printed under the heading "THRESH". If the Normalized value | |
617 | is \fBless than or equal to\fP the Threshold value, then the Attribute | |
618 | is said to have failed. If the Attribute is a pre\-failure Attribute, | |
619 | then disk failure is imminent. | |
620 | ||
621 | Each Attribute also has a "Worst" value shown under the heading | |
622 | "WORST". This is the smallest (closest to failure) value that the | |
623 | disk has recorded at any time during its lifetime when SMART was | |
624 | enabled. [Note however that some vendors firmware may actually | |
625 | \fBincrease\fP the "Worst" value for some "rate\-type" Attributes.] | |
626 | ||
627 | The Attribute table printed out by \fBsmartctl\fP also shows the | |
628 | "TYPE" of the Attribute. Attributes are one of two possible types: | |
629 | Pre\-failure or Old age. Pre\-failure Attributes are ones which, if | |
630 | less than or equal to their threshold values, indicate pending disk | |
631 | failure. Old age, or usage Attributes, are ones which indicate | |
632 | end\-of\-product life from old\-age or normal aging and wearout, if | |
633 | the Attribute value is less than or equal to the threshold. \fBPlease | |
634 | note\fP: the fact that an Attribute is of type 'Pre\-fail' does | |
635 | \fBnot\fP mean that your disk is about to fail! It only has this | |
636 | meaning if the Attribute\'s current Normalized value is less than or | |
637 | equal to the threshold value. | |
638 | ||
639 | If the Attribute\'s current Normalized value is less than or equal to | |
640 | the threshold value, then the "WHEN_FAILED" column will display | |
641 | "FAILING_NOW". If not, but the worst recorded value is less than or | |
642 | equal to the threshold value, then this column will display | |
643 | "In_the_past". If the "WHEN_FAILED" column has no entry (indicated by | |
644 | a dash: \'\-\') then this Attribute is OK now (not failing) and has | |
645 | also never failed in the past. | |
646 | ||
647 | The table column labeled "UPDATED" shows if the SMART Attribute values | |
648 | are updated during both normal operation and off\-line testing, or | |
649 | only during offline testing. The former are labeled "Always" and the | |
650 | latter are labeled "Offline". | |
651 | ||
652 | So to summarize: the Raw Attribute values are the ones that might have | |
653 | a real physical interpretation, such as "Temperature Celsius", | |
654 | "Hours", or "Start\-Stop Cycles". Each manufacturer converts these, | |
655 | using their detailed knowledge of the disk\'s operations and failure | |
656 | modes, to Normalized Attribute values in the range 1\-254. The | |
657 | current and worst (lowest measured) of these Normalized Attribute | |
658 | values are stored on the disk, along with a Threshold value that the | |
659 | manufacturer has determined will indicate that the disk is going to | |
660 | fail, or that it has exceeded its design age or aging limit. | |
661 | \fBsmartctl\fP does \fBnot\fP calculate any of the Attribute values, | |
662 | thresholds, or types, it merely reports them from the SMART data on | |
663 | the device. | |
664 | ||
665 | Note that starting with ATA/ATAPI\-4, revision 4, the meaning of these | |
666 | Attribute fields has been made entirely vendor\-specific. However most | |
667 | ATA/ATAPI\-5 disks seem to respect their meaning, so we have retained | |
668 | the option of printing the Attribute values. | |
669 | ||
670 | For SCSI devices the "attributes" are obtained from the temperature | |
a37e7145 | 671 | and start\-stop cycle counter log pages. Certain vendor specific |
832b75ed GG |
672 | attributes are listed if recognised. The attributes are output in a |
673 | relatively free format (compared with ATA disk attributes). | |
674 | .TP | |
675 | .B \-l TYPE, \-\-log=TYPE | |
676 | Prints either the SMART Error Log, the SMART Self\-Test Log, the SMART | |
4d59bff9 GG |
677 | Selective Self\-Test Log [ATA only], the Log Directory [ATA only], or |
678 | the Background Scan Results Log [SCSI only]. | |
832b75ed GG |
679 | The valid arguments to this option are: |
680 | ||
681 | .I error | |
682 | \- prints only the SMART error log. SMART disks maintain a log of the | |
683 | most recent five non\-trivial errors. For each of these errors, the | |
684 | disk power\-on lifetime at which the error occurred is recorded, as is | |
685 | the device status (idle, standby, etc) at the time of the error. For | |
686 | some common types of errors, the Error Register (ER) and Status | |
687 | Register (SR) values are decoded and printed as text. The meanings of these | |
688 | are: | |
689 | .nf | |
690 | \fBABRT\fP: Command \fBAB\fPo\fBRT\fPed | |
691 | \fBAMNF\fP: \fBA\fPddress \fBM\fPark \fBN\fPot \fBF\fPound | |
692 | \fBCCTO\fP: \fBC\fPommand \fBC\fPompletion \fBT\fPimed \fBO\fPut | |
693 | \fBEOM\fP: \fBE\fPnd \fBO\fPf \fBM\fPedia | |
694 | \fBICRC\fP: \fBI\fPnterface \fBC\fPyclic \fBR\fPedundancy \fBC\fPode (CRC) error | |
695 | \fBIDNF\fP: \fBID\fPentity \fBN\fPot \fBF\fPound | |
696 | \fBILI\fP: (packet command\-set specific) | |
697 | \fBMC\fP: \fBM\fPedia \fBC\fPhanged | |
698 | \fBMCR\fP: \fBM\fPedia \fBC\fPhange \fBR\fPequest | |
699 | \fBNM\fP: \fBN\fPo \fBM\fPedia | |
700 | \fBobs\fP: \fBobs\fPolete | |
701 | \fBTK0NF\fP: \fBT\fPrac\fBK 0 N\fPot \fBF\fPound | |
702 | \fBUNC\fP: \fBUNC\fPorrectable Error in Data | |
703 | \fBWP\fP: Media is \fBW\fPrite \fBP\fProtected | |
704 | .fi | |
705 | In addition, up to the last five commands that preceded the error are | |
706 | listed, along with a timestamp measured from the start of the | |
707 | corresponding power cycle. This is displayed in the form | |
708 | Dd+HH:MM:SS.msec where D is the number of days, HH is hours, MM is | |
709 | minutes, SS is seconds and msec is milliseconds. [Note: this time | |
710 | stamp wraps after 2^32 milliseconds, or 49 days 17 hours 2 minutes and | |
711 | 47.296 seconds.] The key ATA disk registers are also recorded in the | |
712 | log. The final column of the error log is a text\-string description | |
713 | of the ATA command defined by the Command Register (CR) and Feature | |
714 | Register (FR) values. Commands that are obsolete in the most current | |
715 | (ATA\-7) spec are listed like this: \fBREAD LONG (w/ retry) [OBS\-4]\fP, | |
716 | indicating that the command became obsolete with or in the ATA\-4 | |
717 | specification. Similarly, the notation \fB[RET\-\fP\fIN\fP\fB]\fP is | |
718 | used to indicate that a command was retired in the ATA\-\fIN\fP | |
719 | specification. Some commands are not defined in any version of the | |
720 | ATA specification but are in common use nonetheless; these are marked | |
721 | \fB[NS]\fP, meaning non\-standard. | |
722 | ||
723 | The ATA Specification (ATA\-5 Revision 1c, Section 8.41.6.8.2) says: | |
724 | \fB"Error log structures shall include UNC errors, IDNF errors for | |
725 | which the address requested was valid, servo errors, write fault | |
726 | errors, etc. Error log data structures shall not include errors | |
727 | attributed to the receipt of faulty commands such as command codes not | |
728 | implemented by the device or requests with invalid parameters or | |
729 | invalid addresses."\fP The definitions of these terms are: | |
730 | .br | |
731 | \fBUNC\fP (\fBUNC\fPorrectable): data is uncorrectable. This refers | |
732 | to data which has been read from the disk, but for which the Error | |
733 | Checking and Correction (ECC) codes are inconsistent. In effect, this | |
734 | means that the data can not be read. | |
735 | .br | |
736 | \fBIDNF\fP (\fBID N\fPot \fBF\fPound): user\-accessible address could | |
737 | not be found. For READ LOG type commands, \fBIDNF\fP can also indicate | |
738 | that a device data log structure checksum was incorrect. | |
739 | ||
740 | If the command that caused the error was a READ or WRITE command, then | |
741 | the Logical Block Address (LBA) at which the error occurred will be | |
742 | printed in base 10 and base 16. The LBA is a linear address, which | |
743 | counts 512\-byte sectors on the disk, starting from zero. (Because of | |
744 | the limitations of the SMART error log, if the LBA is greater than | |
745 | 0xfffffff, then either no error log entry will be made, or the error | |
746 | log entry will have an incorrect LBA. This may happen for drives with | |
747 | a capacity greater than 128 GiB or 137 GB.) On Linux systems the | |
748 | smartmontools web page has instructions about how to convert the LBA | |
749 | address to the name of the disk file containing the erroneous disk | |
750 | sector. | |
751 | ||
752 | Please note that some manufacturers \fBignore\fP the ATA | |
753 | specifications, and make entries in the error log if the device | |
754 | receives a command which is not implemented or is not valid. | |
755 | ||
756 | .I error [SCSI] | |
757 | \- prints the error counter log pages for reads, write and verifies. | |
758 | The verify row is only output if it has an element other than zero. | |
759 | ||
760 | .I selftest | |
761 | \- prints the SMART self\-test log. The disk maintains a self\-test log | |
762 | showing the results of the self tests, which can be run using the | |
763 | \'\-t\' option described below. For each of the most recent | |
764 | twenty\-one self\-tests, the log shows the type of test (short or | |
765 | extended, off\-line or captive) and the final status of the test. If | |
766 | the test did not complete successfully, then the percentage of the | |
767 | test remaining is shown. The time at which the test took place, | |
768 | measured in hours of disk lifetime, is also printed. If any errors | |
769 | were detected, the Logical Block Address (LBA) of the first error is | |
770 | printed in decimal notation. On Linux systems the smartmontools | |
771 | web page has instructions about how to convert this LBA address to the | |
772 | name of the disk file containing the erroneous block. | |
773 | ||
774 | .I selftest [SCSI] | |
775 | \- the self\-test log for a SCSI device has a slightly different format | |
776 | than for an ATA device. For each of the most recent twenty | |
777 | self\-tests, it shows the type of test and the status (final or in | |
778 | progress) of the test. SCSI standards use the terms "foreground" and | |
779 | "background" (rather than ATA\'s corresponding "captive" and | |
780 | "off\-line") and "short" and "long" (rather than ATA\'s corresponding | |
781 | "short" and "extended") to describe the type of the test. The printed | |
782 | segment number is only relevant when a test fails in the third or | |
783 | later test segment. It identifies the test that failed and consists | |
784 | of either the number of the segment that failed during the test, or | |
785 | the number of the test that failed and the number of the segment in | |
786 | which the test was run, using a vendor\-specific method of putting both | |
787 | numbers into a single byte. The Logical Block Address (LBA) of the | |
788 | first error is printed in hexadecimal notation. On Linux systems the | |
789 | smartmontools web page has instructions about how to convert this LBA | |
790 | address to the name of the disk file containing the erroneous block. | |
791 | If provided, the SCSI Sense Key (SK), Additional Sense Code (ASC) and | |
792 | Additional Sense Code Qualifier (ASQ) are also printed. The self tests | |
793 | can be run using the \'\-t\' option described below (using the ATA | |
794 | test terminology). | |
795 | ||
796 | .I selective [ATA] | |
797 | \- Some ATA\-7 disks (example: Maxtor) also maintain a selective | |
798 | self\-test log. Please see the \'\-t select\' option below for a | |
799 | description of selective self\-tests. The selective self\-test log | |
800 | shows the start/end Logical Block Addresses (LBA) of each of the five | |
801 | test spans, and their current test status. If the span is being | |
802 | tested or the remainder of the disk is being read\-scanned, the | |
803 | current 65536\-sector block of LBAs being tested is also displayed. | |
804 | The selective self\-test log also shows if a read\-scan of the | |
805 | remainder of the disk will be carried out after the selective | |
806 | self\-test has completed (see \'\-t afterselect\' option) and the time | |
807 | delay before restarting this read\-scan if it is interrupted (see | |
808 | \'\-t pending\' option). This is a new smartmontools feature; please | |
809 | report unusual or incorrect behavior to the smartmontools\-support | |
810 | mailing list. | |
811 | ||
812 | .I directory | |
813 | \- if the device supports the General Purpose Logging feature set | |
814 | (ATA\-6 and ATA\-7 only) then this prints the Log Directory (the log at | |
815 | address 0). The Log Directory shows what logs are available and their | |
816 | length in sectors (512 bytes). The contents of the logs at address 1 | |
817 | [Summary SMART error log] and at address 6 [SMART self\-test log] may | |
818 | be printed using the previously\-described | |
819 | .I error | |
820 | and | |
821 | .I selftest | |
822 | arguments to this option. [Please note: this is a new, experimental | |
823 | feature. We would like to add support for printing the contents of | |
824 | extended and comprehensive SMART self\-test and error logs. If your | |
825 | disk supports these, and you would like to assist, please contact the | |
826 | \fBsmartmontools\fP developers.] | |
827 | ||
4d59bff9 GG |
828 | .I background [SCSI] |
829 | \- the background scan results log outputs information derived from | |
830 | Background Media Scans (BMS) done after power up and/or periodocally (e.g. | |
831 | every 24 hours) on recent SCSI disks. If supported, the BMS status | |
832 | is output first, indicating whether a background scan is currently | |
833 | underway (and if so a progress percentage), the amount of time the disk | |
834 | has been powered up and the number of scans already completed. Then there | |
835 | is a header and a line for each background scan "event". These will | |
836 | typically be either recovered or unrecoverable errors. That latter group | |
837 | may need some attention. There is a description of the background scan | |
838 | mechansim in section 4.18 of SBC\-3 revision 6 (see www.t10.org ). | |
839 | ||
a37e7145 GG |
840 | .I scttemp, scttempsts, scttemphist [ATA] |
841 | \- [NEW EXPERIMENTAL SMARTCTL FEATURE] prints the disk temperature | |
842 | information provided by the SMART Command Transport (SCT) commands. | |
843 | The option \'scttempsts\' prints current temperature and temperature | |
844 | ranges returned by the SCT Status command, \'scttemphist\' prints | |
845 | temperature limits and the temperature history table returned by | |
846 | the SCT Data Table command, and \'scttemp\' prints both. | |
847 | The temperature values are preserved across power cycles. | |
848 | The default temperature logging interval is 1 minute and can be | |
849 | configured with the \'\-t scttempint,N[,p]\' option, see below. | |
850 | The SCT commands are specified in the proposed ATA\-8 Command Set | |
851 | (ACS), and are already implemented in some recent ATA\-7 disks. | |
852 | ||
832b75ed GG |
853 | .TP |
854 | .B \-v N,OPTION, \-\-vendorattribute=N,OPTION | |
855 | Sets a vendor\-specific display OPTION for Attribute N. This option | |
856 | may be used multiple times. Valid arguments to this option are: | |
857 | ||
858 | .I help | |
859 | \- Prints (to STDOUT) a list of all valid arguments to this option, | |
860 | then exits. | |
861 | ||
862 | .I 9,minutes | |
863 | \- Raw Attribute number 9 is power\-on time in minutes. Its raw value | |
864 | will be displayed in the form "Xh+Ym". Here X is hours, and Y is | |
865 | minutes in the range 0\-59 inclusive. Y is always printed with two | |
866 | digits, for example "06" or "31" or "00". | |
867 | ||
868 | .I 9,seconds | |
869 | \- Raw Attribute number 9 is power\-on time in seconds. Its raw value | |
870 | will be displayed in the form "Xh+Ym+Zs". Here X is hours, Y is | |
871 | minutes in the range 0\-59 inclusive, and Z is seconds in the range | |
872 | 0\-59 inclusive. Y and Z are always printed with two digits, for | |
873 | example "06" or "31" or "00". | |
874 | ||
875 | .I 9,halfminutes | |
876 | \- Raw Attribute number 9 is power\-on time, measured in units of 30 | |
877 | seconds. This format is used by some Samsung disks. Its raw value | |
878 | will be displayed in the form "Xh+Ym". Here X is hours, and Y is | |
879 | minutes in the range 0\-59 inclusive. Y is always printed with two | |
880 | digits, for example "06" or "31" or "00". | |
881 | ||
882 | .I 9,temp | |
883 | \- Raw Attribute number 9 is the disk temperature in Celsius. | |
884 | ||
885 | .I 192,emergencyretractcyclect | |
886 | \- Raw Attribute number 192 is the Emergency Retract Cycle Count. | |
887 | ||
888 | .I 193,loadunload | |
889 | \- Raw Attribute number 193 contains two values. The first is the | |
890 | number of load cycles. The second is the number of unload cycles. | |
891 | The difference between these two values is the number of times that | |
892 | the drive was unexpectedly powered off (also called an emergency | |
893 | unload). As a rule of thumb, the mechanical stress created by one | |
894 | emergency unload is equivalent to that created by one hundred normal | |
895 | unloads. | |
896 | ||
897 | .I 194,10xCelsius | |
898 | \- Raw Attribute number 194 is ten times the disk temperature in | |
899 | Celsius. This is used by some Samsung disks (example: model SV1204H | |
900 | with RK100\-13 firmware). | |
901 | ||
902 | .I 194,unknown | |
903 | \- Raw Attribute number 194 is NOT the disk temperature, and its | |
904 | interpretation is unknown. This is primarily useful for the \-P | |
905 | (presets) option. | |
906 | ||
907 | .I 198,offlinescanuncsectorct | |
908 | \- Raw Attribute number 198 is the Offline Scan UNC Sector Count. | |
909 | ||
910 | .I 200,writeerrorcount | |
911 | \- Raw Attribute number 200 is the Write Error Count. | |
912 | ||
913 | .I 201,detectedtacount | |
914 | \- Raw Attribute number 201 is the Detected TA Count. | |
915 | ||
916 | .I 220,temp | |
917 | \- Raw Attribute number 220 is the disk temperature in Celsius. | |
918 | ||
919 | Note: a table of hard drive models, listing which Attribute | |
920 | corresponds to temperature, can be found at: | |
921 | \fBhttp://www.guzu.net/linux/hddtemp.db\fP | |
922 | ||
923 | .I N,raw8 | |
924 | \- Print the Raw value of Attribute N as six 8\-bit unsigned base\-10 | |
925 | integers. This may be useful for decoding the meaning of the Raw | |
926 | value. The form \'N,raw8\' prints Raw values for ALL Attributes in this | |
927 | form. The form (for example) \'123,raw8\' only prints the Raw value for | |
928 | Attribute 123 in this form. | |
929 | ||
930 | .I N,raw16 | |
931 | \- Print the Raw value of Attribute N as three 16\-bit unsigned base\-10 | |
932 | integers. This may be useful for decoding the meaning of the Raw | |
933 | value. The form \'N,raw16\' prints Raw values for ALL Attributes in this | |
934 | form. The form (for example) \'123,raw16\' only prints the Raw value for | |
935 | Attribute 123 in this form. | |
936 | ||
937 | .I N,raw48 | |
938 | \- Print the Raw value of Attribute N as a 48\-bit unsigned base\-10 | |
939 | integer. This may be useful for decoding the meaning of the Raw | |
940 | value. The form \'N,raw48\' prints Raw values for ALL Attributes in | |
941 | this form. The form (for example) \'123,raw48\' only prints the Raw | |
942 | value for Attribute 123 in this form. | |
943 | ||
944 | .TP | |
945 | .B \-F TYPE, \-\-firmwarebug=TYPE | |
946 | Modifies the behavior of \fBsmartctl\fP to compensate for some known | |
a37e7145 GG |
947 | and understood device firmware or driver bug. Except \'swapid\', |
948 | the arguments to this option are exclusive, so that only the final | |
949 | option given is used. The valid values are: | |
832b75ed GG |
950 | |
951 | .I none | |
952 | \- Assume that the device firmware obeys the ATA specifications. This | |
953 | is the default, unless the device has presets for \'\-F\' in the | |
954 | device database (see note below). | |
955 | ||
956 | .I samsung | |
957 | \- In some Samsung disks (example: model SV4012H Firmware Version: | |
958 | RM100\-08) some of the two\- and four\-byte quantities in the SMART data | |
959 | structures are byte\-swapped (relative to the ATA specification). | |
960 | Enabling this option tells \fBsmartctl\fP to evaluate these quantities | |
961 | in byte\-reversed order. Some signs that your disk needs this option | |
962 | are (1) no self\-test log printed, even though you have run self\-tests; | |
963 | (2) very large numbers of ATA errors reported in the ATA error log; | |
964 | (3) strange and impossible values for the ATA error log timestamps. | |
965 | ||
966 | .I samsung2 | |
967 | \- In more recent Samsung disks (firmware revisions ending in "\-23") | |
968 | the number of ATA errors reported is byte swapped. Enabling this | |
969 | option tells \fBsmartctl\fP to evaluate this quantity in | |
970 | byte\-reversed order. An indication that your Samsung disk needs this | |
a37e7145 | 971 | option is that the self\-test log is printed correctly, but there are a |
832b75ed GG |
972 | very large number of errors in the SMART error log. This is because |
973 | the error count is byte swapped. Thus a disk with five errors | |
974 | (0x0005) will appear to have 20480 errors (0x5000). | |
975 | ||
a37e7145 GG |
976 | .I samsung3 |
977 | \- Some Samsung disks (at least SP2514N with Firmware VF100\-37) report | |
978 | a self\-test still in progress with 0% remaining when the test was already | |
979 | completed. Enabling this option modifies the output of the self\-test | |
980 | execution status (see options \'\-c\' or \'\-a\' above) accordingly. | |
981 | ||
832b75ed GG |
982 | Note that an explicit \'\-F\' option on the command line will |
983 | over\-ride any preset values for \'\-F\' (see the \'\-P\' option | |
984 | below). | |
985 | ||
a37e7145 GG |
986 | .I swapid |
987 | \- Fixes byte swapped ATA identify strings (device name, serial number, | |
988 | firmware version) returned by some buggy device drivers. | |
989 | ||
832b75ed GG |
990 | .TP |
991 | .B \-P TYPE, \-\-presets=TYPE | |
992 | Specifies whether \fBsmartctl\fP should use any preset options that | |
993 | are available for this drive. By default, if the drive is recognized | |
994 | in the \fBsmartmontools\fP database, then the presets are used. | |
995 | ||
996 | \fBsmartctl\fP can automatically set appropriate options for known | |
997 | drives. For example, the Maxtor 4D080H4 uses Attribute 9 to stores | |
998 | power\-on time in minutes whereas most drives use that Attribute to | |
999 | store the power\-on time in hours. The command\-line option \'\-v | |
1000 | 9,minutes\' ensures that \fBsmartctl\fP correctly interprets Attribute | |
1001 | 9 in this case, but that option is preset for the Maxtor 4D080H4 and | |
1002 | so need not be specified by the user on the \fBsmartctl\fP command | |
1003 | line. | |
1004 | ||
1005 | The argument | |
1006 | .I show | |
1007 | will show any preset options for your drive and the argument | |
1008 | .I showall | |
1009 | will show all known drives in the \fBsmartmontools\fP database, along | |
1010 | with their preset options. If there are no presets for your drive and | |
1011 | you think there should be (for example, a \-v or \-F option is needed | |
1012 | to get \fBsmartctl\fP to display correct values) then please contact | |
1013 | the \fBsmartmontools\fP developers so that this information can be | |
1014 | added to the \fBsmartmontools\fP database. Contact information is at the | |
1015 | end of this man page. | |
1016 | ||
1017 | The valid arguments to this option are: | |
1018 | ||
1019 | .I use | |
1020 | \- if a drive is recognized, then use the stored presets for it. This | |
1021 | is the default. Note that presets will NOT over\-ride additional | |
1022 | Attribute interpretation (\'\-v N,something\') command\-line options or | |
1023 | explicit \'\-F\' command\-line options.. | |
1024 | ||
1025 | .I ignore | |
1026 | \- do not use presets. | |
1027 | ||
1028 | .I show | |
1029 | \- show if the drive is recognized in the database, and if so, its | |
1030 | presets, then exit. | |
1031 | ||
1032 | .I showall | |
1033 | \- list all recognized drives, and the presets that are set for them, | |
1034 | then exit. | |
1035 | ||
1036 | The \'\-P showall\' option takes up to two optional arguments to | |
1037 | match a specific drive type and firmware version. The command: | |
1038 | .nf | |
1039 | smartctl \-P showall | |
1040 | .fi | |
1041 | lists all entries, the command: | |
1042 | .nf | |
1043 | smartctl \-P showall \'MODEL\' | |
1044 | .fi | |
1045 | lists all entries matching MODEL, and the command: | |
1046 | .nf | |
1047 | smartctl \-P showall \'MODEL\' \'FIRMWARE\' | |
1048 | .fi | |
1049 | lists all entries for this MODEL and a specific FIRMWARE version. | |
1050 | ||
1051 | .TP | |
1052 | .B SMART RUN/ABORT OFFLINE TEST AND SELF\-TEST OPTIONS: | |
1053 | .TP | |
1054 | .B \-t TEST, \-\-test=TEST | |
1055 | Executes TEST immediately. The \'\-C\' option can be used in | |
1056 | conjunction with this option to run the short or long (and also for | |
1057 | ATA devices, selective or conveyance) self\-tests in captive mode | |
1058 | (known as "foreground mode" for SCSI devices). Note that only one | |
1059 | test type can be run at a time, so only one test type should be | |
1060 | specified per command line. Note also that if a computer is shutdown | |
1061 | or power cycled during a self\-test, no harm should result. The | |
1062 | self\-test will either be aborted or will resume automatically. | |
1063 | ||
1064 | The valid arguments to this option are: | |
1065 | ||
1066 | .I offline | |
1067 | \- runs SMART Immediate Offline Test. This immediately | |
1068 | starts the test described above. This command can be given during | |
1069 | normal system operation. The effects of this test are visible only in | |
1070 | that it updates the SMART Attribute values, and if errors are | |
1071 | found they will appear in the SMART error log, visible with the \'\-l error\' | |
1072 | option. [In the case of SCSI devices runs the default self test in | |
1073 | foreground. No entry is placed in the self test log.] | |
1074 | ||
1075 | If the \'\-c\' option to \fBsmartctl\fP shows that the device has the | |
1076 | "Suspend Offline collection upon new command" capability then you can | |
1077 | track the progress of the Immediate Offline test using the \'\-c\' | |
1078 | option to \fBsmartctl\fP. If the \'\-c\' option show that the device | |
1079 | has the "Abort Offline collection upon new command" capability then | |
1080 | most commands will abort the Immediate Offline Test, so you should not | |
1081 | try to track the progress of the test with \'\-c\', as it will abort | |
1082 | the test. | |
1083 | ||
1084 | .I short | |
1085 | \- runs SMART Short Self Test (usually under ten minutes). | |
1086 | [Note: in the case of SCSI devices, | |
1087 | this command option runs the "Background short" self\-test.] | |
1088 | This command can be given during normal system operation (unless run in | |
1089 | captive mode \- see the \'\-C\' option below). This is a | |
1090 | test in a different category than the immediate or automatic offline | |
1091 | tests. The "Self" tests check the electrical and mechanical | |
1092 | performance as well as the read performance of the disk. Their | |
1093 | results are reported in the Self Test Error Log, readable with | |
1094 | the \'\-l selftest\' option. Note that on some disks the progress of the | |
1095 | self\-test can be monitored by watching this log during the self\-test; with other disks | |
1096 | use the \'\-c\' option to monitor progress. | |
1097 | ||
1098 | .I long | |
1099 | \- runs SMART Extended Self Test (tens of minutes). | |
1100 | [Note: in the case of SCSI devices, | |
1101 | this command option runs the "Background long" self\-test.] | |
1102 | This is a | |
1103 | longer and more thorough version of the Short Self Test described | |
1104 | above. Note that this command can be given during normal | |
1105 | system operation (unless run in captive mode \- see the \'\-C\' option below). | |
1106 | ||
1107 | .I conveyance | |
1108 | \- [ATA ONLY] runs a SMART Conveyance Self Test (minutes). This | |
1109 | self\-test routine is intended to identify damage incurred during | |
1110 | transporting of the device. This self\-test routine should take on the | |
1111 | order of minutes to complete. Note that this command can be given | |
1112 | during normal system operation (unless run in captive mode \- see the | |
1113 | \'\-C\' option below). | |
1114 | ||
a37e7145 GG |
1115 | .I select,N\-M, select,N+SIZE |
1116 | \- [ATA ONLY] [EXPERIMENTAL SMARTCTL FEATURE] runs a SMART | |
832b75ed GG |
1117 | Selective Self Test, to test a \fBrange\fP of disk Logical Block |
1118 | Addresses (LBAs), rather than the entire disk. Each range of LBAs | |
1119 | that is checked is called a "span" and is specified by a starting LBA | |
a37e7145 GG |
1120 | (N) and an ending LBA (M) with N less than or equal to M. The range |
1121 | can also be specified as N+SIZE. A span at the end of a disk can | |
1122 | be specified by N\-\fBmax\fP. | |
1123 | ||
1124 | For example the commands: | |
832b75ed GG |
1125 | .nf |
1126 | smartctl \-t select,10\-20 /dev/hda | |
a37e7145 | 1127 | smartctl \-t select,10+11 /dev/hda |
832b75ed | 1128 | .fi |
a37e7145 GG |
1129 | both runs a self test on one span consisting of LBAs ten to twenty |
1130 | (inclusive). The command: | |
1131 | .nf | |
1132 | smartctl \-t select,100000000\-max /dev/hda | |
1133 | .fi | |
1134 | run a self test from LBA 100000000 up to the end of the disk. | |
1135 | The \'\-t\' option can be given up to five times, to test | |
832b75ed GG |
1136 | up to five spans. For example the command: |
1137 | .nf | |
1138 | smartctl \-t select,0\-100 \-t select,1000\-2000 /dev/hda | |
1139 | .fi | |
1140 | runs a self test on two spans. The first span consists of 101 LBAs | |
1141 | and the second span consists of 1001 LBAs. Note that the spans can | |
1142 | overlap partially or completely, for example: | |
1143 | .nf | |
1144 | smartctl \-t select,0\-10 \-t select,5\-15 \-t select,10\-20 /dev/hda | |
1145 | .fi | |
1146 | The results of the selective self\-test can be obtained (both during | |
1147 | and after the test) by printing the SMART self\-test log, using the | |
1148 | \'\-l selftest\' option to smartctl. | |
1149 | ||
1150 | Selective self tests are particularly useful as disk capacities | |
1151 | increase: an extended self test (smartctl \-t long) can take several | |
1152 | hours. Selective self\-tests are helpful if (based on SYSLOG error | |
1153 | messages, previous failed self\-tests, or SMART error log entries) you | |
1154 | suspect that a disk is having problems at a particular range of | |
1155 | Logical Block Addresses (LBAs). | |
1156 | ||
1157 | Selective self\-tests can be run during normal system operation (unless | |
1158 | done in captive mode \- see the \'\-C\' option below). | |
1159 | ||
a37e7145 GG |
1160 | [Note: To use this feature on Linux, the kernel must be compiled with |
1161 | the configuration option CONFIG_IDE_TASKFILE_IO enabled. Please report | |
1162 | unusual or incorrect behavior to the smartmontools\-support mailing list.] | |
1163 | ||
1164 | The following variants of the selective self\-test command use spans based | |
1165 | on the ranges from past tests already stored on the disk: | |
1166 | ||
1167 | .I select,redo[+SIZE] | |
1168 | \- [ATA ONLY] [NEW EXPERIMENTAL SMARTCTL FEATURE] redo the last SMART | |
1169 | Selective Self Test using the same LBA range. The starting LBA is identical | |
1170 | to the LBA used by last test, same for ending LBA unless a new span size | |
1171 | is specified by optional +SIZE argument. | |
1172 | ||
1173 | For example the commands: | |
1174 | .nf | |
1175 | smartctl \-t select,10\-20 /dev/hda | |
1176 | smartctl \-t select,redo /dev/hda | |
1177 | smartctl \-t select,redo+20 /dev/hda | |
1178 | .fi | |
1179 | have the same effect as: | |
1180 | .nf | |
1181 | smartctl \-t select,10\-20 /dev/hda | |
1182 | smartctl \-t select,10\-20 /dev/hda | |
1183 | smartctl \-t select,10\-29 /dev/hda | |
1184 | .fi | |
1185 | ||
1186 | .I select,next[+SIZE] | |
1187 | \- [ATA ONLY] [NEW EXPERIMENTAL SMARTCTL FEATURE] runs a SMART Selective | |
1188 | Self Test on the LBA range which follows the range of the last test. The | |
1189 | starting LBA is set to (ending LBA +1) of the last test. A new span size | |
1190 | may be specified by the optional +SIZE argument. | |
1191 | ||
1192 | For example the commands: | |
1193 | .nf | |
1194 | smartctl \-t select,0\-999 /dev/hda | |
1195 | smartctl \-t select,next /dev/hda | |
1196 | smartctl \-t select,next+2000 /dev/hda | |
1197 | .fi | |
1198 | have the same effect as: | |
1199 | .nf | |
1200 | smartctl \-t select,0\-999 /dev/hda | |
1201 | smartctl \-t select,1000\-1999 /dev/hda | |
1202 | smartctl \-t select,2000\-3999 /dev/hda | |
1203 | .fi | |
1204 | ||
1205 | If the last test ended at the last LBA of the disk, the new range starts | |
1206 | at LBA 0. The span size of the last span of a disk is adjusted such that | |
1207 | the total number of spans to check the full disk will not be changed | |
1208 | by future uses of \'\-t select,next\'. | |
1209 | ||
1210 | .I select,cont[+SIZE] | |
1211 | \- [ATA ONLY] [NEW EXPERIMENTAL SMARTCTL FEATURE] performs a \'redo\' | |
1212 | (above) if the self test status reports that the last test was aborted | |
1213 | by the host. Otherwise it run the \'next\' (above) test. | |
832b75ed GG |
1214 | |
1215 | .I afterselect,on | |
1216 | \- [ATA ONLY] perform an offline read scan after a Selective Self\-test | |
1217 | has completed. This option must be used together with one or more of | |
1218 | the \fIselect,N\-M\fP options above. If the LBAs that have been | |
1219 | specified in the Selective self\-test pass the test with no errors | |
1220 | found, then read scan the \fBremainder\fP of the disk. If the device | |
1221 | is powered\-cycled while this read scan is in progress, the read scan | |
1222 | will be automatically resumed after a time specified by the pending | |
1223 | timer (see below). The value of this option is preserved between | |
1224 | selective self\-tests. | |
1225 | ||
1226 | .I afterselect,off | |
1227 | \- [ATA ONLY] do not read scan the remainder of the disk after a | |
1228 | Selective self\-test has completed. This option must be use together | |
1229 | with one or more of the \fIselect,N\-M\fP options above. The value of this | |
1230 | option is preserved between selective self\-tests. | |
1231 | ||
1232 | .I pending,N | |
1233 | \- [ATA ONLY] set the pending offline read scan timer to N minutes. | |
1234 | Here N is an integer in the range from 0 to 65535 inclusive. If the | |
1235 | device is powered off during a read scan after a Selective self\-test, | |
1236 | then resume the test automatically N minutes after power\-up. This | |
1237 | option must be use together with one or more of the \fIselect,N\-M\fP | |
1238 | options above. The value of this option is preserved between selective | |
1239 | self\-tests. | |
1240 | ||
a37e7145 GG |
1241 | .I scttempint,N[,p] |
1242 | \- [ATA ONLY] [NEW EXPERIMENTAL SMARTCTL FEATURE] set the time interval | |
1243 | for SCT temperature logging to N minutes. If \',p\' is specified, the | |
1244 | setting is preserved across power cycles. Otherwise, the setting is | |
1245 | volatile and will be reverted to default (1 minute), or last | |
1246 | non-volatile setting by the next hard reset. This command also clears | |
1247 | the temperature history table. See \'\-l scttemp\' above for more | |
1248 | information about SCT temperature logging. | |
1249 | ||
832b75ed GG |
1250 | .TP |
1251 | .B \-C, \-\-captive | |
1252 | Runs self\-tests in captive mode. This has no effect with \'\-t | |
1253 | offline\' or if the \'\-t\' option is not used. [Note: in the case of | |
1254 | SCSI devices, this command option runs the self\-test in "Foreground" | |
1255 | mode.] | |
1256 | ||
1257 | \fBWARNING: Tests run in captive mode may busy out the drive for the | |
1258 | length of the test. Only run captive tests on drives without any | |
1259 | mounted partitions!\fP | |
1260 | ||
1261 | .TP | |
1262 | .B \-X, \-\-abort | |
1263 | Aborts non\-captive SMART Self Tests. Note that this | |
1264 | command will abort the Offline Immediate Test routine only if your | |
1265 | disk has the "Abort Offline collection upon new command" capability. | |
1266 | .PP | |
1267 | .SH EXAMPLES | |
1268 | .nf | |
1269 | .B smartctl \-a /dev/hda | |
1270 | .fi | |
1271 | Print all SMART information for drive /dev/hda (Primary Master). | |
1272 | .PP | |
1273 | .nf | |
1274 | .B smartctl \-s off /dev/hdd | |
1275 | .fi | |
1276 | Disable SMART on drive /dev/hdd (Secondary Slave). | |
1277 | .PP | |
1278 | .nf | |
1279 | .B smartctl \-\-smart=on \-\-offlineauto=on \-\-saveauto=on /dev/hda | |
1280 | .fi | |
1281 | Enable SMART on drive /dev/hda, enable automatic offline | |
1282 | testing every four hours, and enable autosaving of | |
1283 | SMART Attributes. This is a good start\-up line for your system\'s | |
1284 | init files. You can issue this command on a running system. | |
1285 | .PP | |
1286 | .nf | |
1287 | .B smartctl \-t long /dev/hdc | |
1288 | .fi | |
1289 | Begin an extended self\-test of drive /dev/hdc. You can issue this | |
1290 | command on a running system. The results can be seen in the self\-test | |
1291 | log visible with the \'\-l selftest\' option after it has completed. | |
1292 | .PP | |
1293 | .nf | |
1294 | .B smartctl \-s on \-t offline /dev/hda | |
1295 | .fi | |
1296 | Enable SMART on the disk, and begin an immediate offline test of | |
1297 | drive /dev/hda. You can issue this command on a running system. The | |
1298 | results are only used to update the SMART Attributes, visible | |
1299 | with the \'\-A\' option. If any device errors occur, they are logged to | |
1300 | the SMART error log, which can be seen with the \'\-l error\' option. | |
1301 | .PP | |
1302 | .nf | |
1303 | .B smartctl \-A \-v 9,minutes /dev/hda | |
1304 | .fi | |
1305 | Shows the vendor Attributes, when the disk stores its power\-on time | |
1306 | internally in minutes rather than hours. | |
1307 | .PP | |
1308 | .nf | |
1309 | .B smartctl \-q errorsonly \-H \-l selftest /dev/hda | |
1310 | .fi | |
1311 | Produces output only if the device returns failing SMART status, | |
1312 | or if some of the logged self\-tests ended with errors. | |
1313 | .PP | |
1314 | .nf | |
1315 | .B smartctl \-q silent \-a /dev/hda | |
1316 | .fi | |
1317 | Examine all SMART data for device /dev/hda, but produce no | |
1318 | printed output. You must use the exit status (the | |
1319 | .B $? | |
1320 | shell variable) to learn if any Attributes are out of bound, if the | |
1321 | SMART status is failing, if there are errors recorded in the | |
1322 | self\-test log, or if there are errors recorded in the disk error log. | |
1323 | .PP | |
1324 | .nf | |
1325 | .B smartctl \-a \-d 3ware,0 /dev/sda | |
1326 | .fi | |
1327 | Examine all SMART data for the first ATA disk connected to a 3ware | |
1328 | RAID controller card. | |
1329 | .PP | |
1330 | .nf | |
1331 | .B smartctl \-a \-d 3ware,0 /dev/twe0 | |
1332 | .fi | |
1333 | Examine all SMART data for the first ATA disk connected to a 3ware | |
1334 | RAID 6000/7000/8000 controller card. | |
1335 | .PP | |
1336 | .nf | |
1337 | .B smartctl \-a \-d 3ware,0 /dev/twa0 | |
1338 | .fi | |
1339 | Examine all SMART data for the first ATA disk connected to a 3ware | |
1340 | RAID 9000 controller card. | |
1341 | .PP | |
1342 | .nf | |
1343 | .B smartctl \-t short \-d 3ware,3 /dev/sdb | |
1344 | .fi | |
1345 | Start a short self\-test on the fourth ATA disk connected to the 3ware RAID | |
1346 | controller card which is the second SCSI device /dev/sdb. | |
4d59bff9 GG |
1347 | .PP |
1348 | .nf | |
1349 | .B smartctl \-a \-d hpt,1/3 /dev/sda | |
1350 | .fi | |
1351 | Examine all SMART data for the (S)ATA disk directly connected to the third channel of the | |
1352 | first HighPoint RocketRAID controller card. | |
1353 | .nf | |
1354 | .PP | |
1355 | .nf | |
1356 | .B smartctl \-t short \-d hpt,1/1/2 /dev/sda | |
1357 | .fi | |
1358 | Start a short self\-test on the (S)ATA disk connected to second pmport on the | |
1359 | first channel of the first HighPoint RocketRAID controller card. | |
1360 | .PP | |
832b75ed GG |
1361 | .nf |
1362 | .B smartctl \-t select,10\-100 \-t select,30\-300 \-t afterselect,on \-t pending,45 /dev/hda | |
1363 | .fi | |
1364 | Run a selective self\-test on LBAs 10 to 100 and 30 to 300. After the | |
1365 | these LBAs have been tested, read\-scan the remainder of the disk. If the disk is | |
1366 | power\-cycled during the read\-scan, resume the scan 45 minutes after power to the | |
1367 | device is restored. | |
1368 | .PP | |
ba59cff1 GG |
1369 | .nf |
1370 | .B smartctl \-a \-d cciss,0 /dev/cciss/c0d0 | |
1371 | .fi | |
1372 | Examine all SMART data for the first SCSI disk connected to a cciss | |
1373 | RAID controller card. | |
1374 | .PP | |
832b75ed GG |
1375 | .SH RETURN VALUES |
1376 | The return values of \fBsmartctl\fP are defined by a bitmask. If all | |
1377 | is well with the disk, the return value (exit status) of | |
1378 | \fBsmartctl\fP is 0 (all bits turned off). If a problem occurs, or an | |
1379 | error, potential error, or fault is detected, then a non\-zero status | |
1380 | is returned. In this case, the eight different bits in the return | |
1381 | value have the following meanings for ATA disks; some of these values | |
1382 | may also be returned for SCSI disks. | |
1383 | .TP | |
1384 | .B Bit 0: | |
1385 | Command line did not parse. | |
1386 | .TP | |
1387 | .B Bit 1: | |
1388 | Device open failed, or device did not return an IDENTIFY DEVICE structure. | |
1389 | .TP | |
1390 | .B Bit 2: | |
1391 | Some SMART command to the disk failed, or there was a checksum error | |
1392 | in a SMART data structure (see \'\-b\' option above). | |
1393 | .TP | |
1394 | .B Bit 3: | |
1395 | SMART status check returned "DISK FAILING". | |
1396 | .TP | |
1397 | .B Bit 4: | |
a37e7145 | 1398 | We found prefail Attributes <= threshold. |
832b75ed GG |
1399 | .TP |
1400 | .B Bit 5: | |
1401 | SMART status check returned "DISK OK" but we found that some (usage | |
1402 | or prefail) Attributes have been <= threshold at some time in the | |
1403 | past. | |
1404 | .TP | |
1405 | .B Bit 6: | |
1406 | The device error log contains records of errors. | |
1407 | .TP | |
1408 | .B Bit 7: | |
1409 | The device self\-test log contains records of errors. | |
1410 | ||
1411 | To test within the shell for whether or not the different bits are | |
1412 | turned on or off, you can use the following type of construction (this | |
1413 | is bash syntax): | |
1414 | .nf | |
1415 | .B smartstat=$(($? & 8)) | |
1416 | .fi | |
1417 | This looks at only at bit 3 of the exit status | |
1418 | .B $? | |
1419 | (since 8=2^3). The shell variable | |
1420 | $smartstat will be nonzero if SMART status check returned "disk | |
1421 | failing" and zero otherwise. | |
1422 | ||
1423 | .PP | |
1424 | .SH NOTES | |
1425 | The TapeAlert log page flags are cleared for the initiator when the | |
1426 | page is read. This means that each alert condition is reported only | |
1427 | once by \fBsmartctl\fP for each initiator for each activation of the | |
1428 | condition. | |
1429 | ||
1430 | .PP | |
1431 | .SH AUTHOR | |
1432 | \fBBruce Allen\fP smartmontools\-support@lists.sourceforge.net | |
1433 | .fi | |
1434 | University of Wisconsin \- Milwaukee Physics Department | |
1435 | ||
1436 | .PP | |
1437 | .SH CONTRIBUTORS | |
1438 | The following have made large contributions to smartmontools: | |
1439 | .nf | |
1440 | \fBCasper Dik\fP (Solaris SCSI interface) | |
1441 | \fBChristian Franke\fP (Windows interface and Cygwin package) | |
1442 | \fBDouglas Gilbert\fP (SCSI subsystem) | |
1443 | \fBGuido Guenther\fP (Autoconf/Automake packaging) | |
1444 | \fBGeoffrey Keating\fP (Darwin ATA interface) | |
1445 | \fBEduard Martinescu\fP (FreeBSD interface) | |
1446 | \fBFr\*'ed\*'eric L. W. Meunier\fP (Web site and Mailing list) | |
1447 | \fBKeiji Sawada\fP (Solaris ATA interface) | |
1448 | \fBSergey Svishchev\fP (NetBSD interface) | |
1449 | \fBDavid Snyder and Sergey Svishchev\fP (OpenBSD interface) | |
1450 | \fBPhil Williams\fP (User interface and drive database) | |
1451 | \fBYuri Dario\fP (OS/2, eComStation interface) | |
9ebc753d | 1452 | \fBShengfeng Zhou\fP (Linux Highpoint RocketRaid interface) |
832b75ed GG |
1453 | .fi |
1454 | Many other individuals have made smaller contributions and corrections. | |
1455 | ||
1456 | .PP | |
1457 | .SH CREDITS | |
1458 | .fi | |
1459 | This code was derived from the smartsuite package, written by Michael | |
1460 | Cornwell, and from the previous UCSC smartsuite package. It extends | |
1461 | these to cover ATA\-5 disks. This code was originally developed as a | |
1462 | Senior Thesis by Michael Cornwell at the Concurrent Systems Laboratory | |
1463 | (now part of the Storage Systems Research Center), Jack Baskin School | |
1464 | of Engineering, University of California, Santa | |
1465 | Cruz. \fBhttp://ssrc.soe.ucsc.edu/\fP . | |
1466 | .SH | |
1467 | HOME PAGE FOR SMARTMONTOOLS: | |
1468 | .fi | |
1469 | Please see the following web site for updates, further documentation, bug | |
1470 | reports and patches: \fBhttp://smartmontools.sourceforge.net/\fP | |
1471 | ||
1472 | .SH | |
1473 | SEE ALSO: | |
1474 | \fBsmartd\fP(8), \fBbadblocks\fP(8), \fBide\-smart\fP(8). | |
1475 | .SH | |
1476 | REFERENCES FOR SMART | |
1477 | .fi | |
1478 | An introductory article about smartmontools is \fIMonitoring Hard | |
1479 | Disks with SMART\fP, by Bruce Allen, Linux Journal, January 2004, | |
a37e7145 | 1480 | pages 74\-77. This is \fBhttp://www.linuxjournal.com/article.php?sid=6983\fP |
832b75ed GG |
1481 | online. |
1482 | ||
1483 | If you would like to understand better how SMART works, and what it | |
1484 | does, a good place to start is with Sections 4.8 and 6.54 of the first | |
a37e7145 | 1485 | volume of the \'AT Attachment with Packet Interface\-7\' (ATA/ATAPI\-7) |
832b75ed GG |
1486 | specification. This documents the SMART functionality which the |
1487 | \fBsmartmontools\fP utilities provide access to. You can find | |
1488 | Revision 4b of this document at | |
1489 | \fBhttp://www.t13.org/docs2004/d1532v1r4b-ATA-ATAPI-7.pdf\fP . | |
1490 | Earlier and later versions of this Specification are available from | |
1491 | the T13 web site \fBhttp://www.t13.org/\fP . | |
1492 | ||
1493 | .fi | |
1494 | The functioning of SMART was originally defined by the SFF\-8035i | |
1495 | revision 2 and the SFF\-8055i revision 1.4 specifications. These are | |
1496 | publications of the Small Form Factors (SFF) Committee. Links to | |
1497 | these documents may be found in the References section of the | |
1498 | \fBsmartmontools\fP home page at | |
1499 | \fBhttp://smartmontools.sourceforge.net/\fP . | |
1500 | ||
1501 | .SH | |
1502 | CVS ID OF THIS PAGE: | |
a37e7145 | 1503 | $Id: smartctl.8.in,v 1.103 2007/09/06 08:48:55 ballen4705 Exp $ |
832b75ed GG |
1504 | .\" Local Variables: |
1505 | .\" mode: nroff | |
1506 | .\" End: |