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