[go: up one dir, main page]

File: smartctl.8.in

package info (click to toggle)
smartmontools 5.32-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,692 kB
  • ctags: 1,555
  • sloc: ansic: 14,892; sh: 3,677; asm: 597; makefile: 275
file content (1207 lines) | stat: -rw-r--r-- 53,004 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
.ig
 Copyright (C) 2002-4 Bruce Allen <smartmontools-support@lists.sourceforge.net>

 $Id: smartctl.8.in,v 1.53 2004/06/13 19:49:54 ballen4705 Exp $
 
 This program is free software; you can redistribute it and/or modify it
 under the terms of the GNU General Public License as published by the Free
 Software Foundation; either version 2, or (at your option) any later
 version.
 
 You should have received a copy of the GNU General Public License (for
 example COPYING); if not, write to the Free Software Foundation, Inc., 675
 Mass Ave, Cambridge, MA 02139, USA.

 This code was originally developed as a Senior Thesis by Michael Cornwell
 at the Concurrent Systems Laboratory (now part of the Storage Systems
 Research Center), Jack Baskin School of Engineering, University of
 California, Santa Cruz. http://ssrc.soe.ucsc.edu/

..
.TH SMARTCTL 8 CURRENT_CVS_DATE CURRENT_CVS_VERSION CURRENT_CVS_DATE
.SH NAME
\fBsmartctl\fP \- Control and Monitor Utility for SMART Disks

.SH SYNOPSIS
.B smartctl [options] device

.SH FULL PATH
.B /usr/sbin/smartctl

.SH PACKAGE VERSION
CURRENT_CVS_VERSION released CURRENT_CVS_DATE at CURRENT_CVS_TIME

.SH DESCRIPTION
\fBsmartctl\fP controls the Self\-Monitoring, Analysis and Reporting
Technology (SMART) system built into many ATA\-3 and later ATA, IDE and
SCSI\-3 hard drives. The purpose of SMART is to monitor the reliability
of the hard drive and predict drive failures, and to carry out
different types of drive self\-tests.  This version of \fBsmartctl\fP
is compatible with ATA/ATAPI\-5 and earlier standards (see REFERENCES
below)

\fBsmartctl\fP is a command line utility designed to perform SMART
tasks such as printing the SMART self\-test and error logs, enabling
and disabling SMART automatic testing, and initiating device
self\-tests. Note: if the user issues a SMART command that is
(apparently) not implemented by the device, \fBsmartctl\fP will print
a warning message but issue the command anyway (see the \fB\-T,
\-\-tolerance\fP option below).  This should not cause problems: on
most devices, unimplemented SMART commands issued to a drive are
ignored and/or return an error.

\fBsmartctl\fP also provides support for polling TapeAlert messages
from SCSI tape drives and changers.

The user must specify the device to be controlled or interrogated as
the final argument to \fBsmartctl\fP.  Device paths are as follows:
.IP \fBLINUX\fP: 9
Use the forms \fB"/dev/hd[a\-t]"\fP for IDE/ATA
devices, and \fB"/dev/sd[a\-z]"\fP for SCSI devices. For
SCSI Tape Drives and Changers with TapeAlert support use the devices
\fB"/dev/nst*"\fP and \fB"/dev/sg*"\fP. 
More general paths (such as devfs ones) may also be specified.
.IP \fBFREEBSD\fP: 9
Use the forms \fB"/dev/ad[0\-9]+"\fP for IDE/ATA
devices and \fB"/dev/da[0\-9]+"\fP for SCSI devices.
.IP \fBNETBSD\fP: 9
Use the form \fB"/dev/wd[0\-9]+[cd]"\fP for IDE/ATA
devices.  Be sure to specify correct "whole disk" partition letter
for your architecture.
.IP \fBSOLARIS\fP: 9
Use the forms \fB"/dev/rdsk/c?t?d?s?"\fP for IDE/ATA and SCSI disk
devices, and \fB"/dev/rmt/*"\fP for SCSI tape devices.
.IP \fBWINDOWS\fP: 9
Use the forms \fB"/dev/hd[a\-j]"\fP for IDE/ATA devices
"\\\\.\\PhysicalDisk[0\-9]" on WinNT4/2000/XP,
\fB"/dev/hd[a\-d]"\fP for standard IDE/ATA devices on Win95/98/98SE/ME,
and \fB"/dev/scsi[0\-9][0\-f]"\fP for SCSI devices on ASPI adapter 0\-9, ID 0\-15.
The prefix \fB"/dev/"\fP is optional.
.IP \fBCYGWIN\fP: 9
See "WINDOWS" above.
.PP
Based on the device path, \fBsmartctl\fP will guess the device type
(ATA or SCSI).  If necessary, the \'\-d\' option can be used to over\-ride
this guess

Note that the printed output of \fBsmartctl\fP displays most numerical
values in base 10 (decimal), but some values are displayed in base 16
(hexidecimal).  To distinguish them, the base 16 values are always
displayed with a leading \fB"0x"\fP, for example: "0xff". This man
page follows the same convention.

.PP
.SH OPTIONS
.PP
The options are grouped below into several categories.  \fBsmartctl\fP
will execute the corresponding commands in the order: INFORMATION,
ENABLE/DISABLE, DISPLAY DATA, RUN/ABORT TESTS.

SCSI devices only accept the options \fB\-h, \-V, \-i, \-a, \-A, \-d,
\-s, \-S,\-H, \-t, \-C, \-l selftest, \-l error, \-r,\fP and
\fB\-X\fP.  TapeAlert devices only accept the options \fB\-h, \-V,
\-i, \-a, \-A, \-d, \-s, \-S, \-t, \-l selftest, \-l error, \-r,\fP
and \fB\-H\fP.

Long options  are  not  supported  on  all  systems.   Use
.B \'smartctl \-h\'
to see the available options.

.TP
.B SHOW INFORMATION OPTIONS:
.TP
.B \-h, \-\-help, \-\-usage
Prints a usage message to STDOUT and exits.
.TP
.B \-V, \-\-version, \-\-copyright, \-\-license
Prints version, copyright, license, home page and CVS\-id information
for your copy of \fBsmartctl\fP to STDOUT and then exits.  Please
include this information if you are reporting bugs or problems.
.TP
.B \-i, \-\-info
Prints the device model number, serial number, firmware version, and ATA Standard
version/revision information.  Says if the device supports SMART, and if
so, whether SMART support is currently enabled or disabled.
.TP
.B \-a, \-\-all
Prints all SMART information about the disk, or TapeAlert information
about the tape drive or changer.  For ATA devices this is equivalent
to
.nf
\'\-H \-i \-c \-A \-l error \-l selftest -l selective\'
.fi
and for SCSI, this is equivalent to
.nf
\'\-H \-i \-A \-l error \-l selftest\'.
.fi
Note that for ATA disks this does \fBnot\fP enable the \'\-l
directory\' option.

.TP
.B RUN\-TIME BEHAVIOR OPTIONS:
.TP
.B \-q TYPE, \-\-quietmode=TYPE
Specifies that \fBsmartctl\fP should run in one of the two quiet modes
described here.  The valid arguments to this option are:

.I errorsonly
\- only print: For the \'\-l error\' option, if nonzero, the number
of errors recorded in the SMART error log and the power\-on time when
they occurred; For the \'\-l selftest\' option, errors recorded in the device
self\-test log; For the \'\-H\' option, SMART "disk failing" status or device
Attributes (pre\-failure or usage) which failed either now or in the
past; For the \'\-A\' option, device Attributes (pre\-failure or usage)
which failed either now or in the past.

.I silent
\- print no output.  The only way to learn about what was found is to
use the exit status of \fBsmartctl\fP (see RETURN VALUES below).
.TP
.B \-d TYPE, \-\-device=TYPE
Specifies the type of the device.  The valid arguments to this option
are \fIata\fP, \fIscsi\fP, and \fI3ware,N\fP. If this option is not
used then \fBsmartctl\fP will attempt to guess the device type from
the device name.

To look at ATA disks behind 3ware SCSI RAID controllers, use syntax
such as:
.fi
\fBsmartctl \-a \-d 3ware,2 /dev/sda\fP
.fi
where in the argument \fI3ware,N\fP, the integer N is the disk number
(3ware \'port\') within the 3ware ATA RAID controller.  The allowed
values of N are from 0 to 15 inclusive.

Be aware that \fBany\fP of the physical disks can be queried or
examined using \fBany\fP of the 3ware's SCSI logical device /dev/sd?
entries.  Thus, if logical device /dev/sda is made up of two physical
disks (3ware ports zero and one) and logical device /dev/sdb is made
up of two other physical disks (3ware ports two and three) then you
can examine the SMART data on \fBany\fP of the four physical disks
using \fBeither\fP SCSI device /dev/sda \fBor\fP /dev/sdb.  If you
need to know which logical SCSI device a particular physical disk
(3ware port) is associated with, use the dmesg or SYSLOG output to
show which SCSI ID corresponds to a particular 3ware unit, and then
use the 3ware CLI or 3dm tool to determine which ports (physical
disks) correspond to particular 3ware units.

If the value of N corresponds to a port that does \fBnot\fP exist on
the 3ware controller, or to a port that does not physically have a
disk attached to it, the behavior of \fBsmartctl\fP depends upon the
specific controller model, firmware, Linux kernel and platform.  In
some cases you will get a warning message that the device does not
exist. In other cases you will be presented with \'void\' data for a
non\-existent device.

Note that older 3w\-xxxx drivers do not pass the "Enable Autosave"
(\'\fB\-S on\fP\') and "Enable Automatic Offline" (\'\fB\-o on\fP\')
commands to the disk, and produce these types of harmless syslog error
messages instead: "\fB3w\-xxxx: tw_ioctl(): Passthru size (123392) too
big\fP". This can be fixed by upgrading to version 1.02.00.037 or
later of the 3w\-xxxx driver, or by applying a patch to older
versions. See \fBhttp://smartmontools.sourceforge.net/\fP for
instructions.

.B 3ware controllers are currently ONLY supported under Linux.

.TP
.B \-T TYPE, \-\-tolerance=TYPE
Specifies how tolerant \fBsmartctl\fP should be of ATA and SMART command
failures. 

The behavior of \fBsmartctl\fP depends upon whether the command is
"\fBoptional\fP" or "\fBmandatory\fP". Here "\fBmandatory\fP" means
"required by the ATA/ATAPI\-5 Specification if the device implements
the SMART command set" and "\fBoptional\fP" means "not required by the
ATA/ATAPI\-5 Specification even if the device implements the SMART
command set."  The "\fBmandatory\fP" ATA and SMART commands are: (1)
ATA IDENTIFY DEVICE, (2) SMART ENABLE/DISABLE ATTRIBUTE AUTOSAVE, (3)
SMART ENABLE/DISABLE, and (4) SMART RETURN STATUS.

The valid arguments to this option are:

.I normal
\- exit on failure of any \fBmandatory\fP SMART command, and ignore
all failures of \fBoptional\fP SMART commands.  This is the default.
Note that on some devices, issuing unimplemented optional SMART
commands doesn\'t cause an error.  This can result in misleading
\fBsmartctl\fP messages such as "Feature X not implemented", followed
shortly by "Feature X: enabled".  In most such cases, contrary to the
final message, Feature X is \fBnot\fP enabled.

.I conservative
\- exit on failure of any \fBoptional\fP SMART command.

.I permissive
\- ignore failure(s) of \fBmandatory\fP SMART commands.  This option
may be given more than once.  Each additional use of this option will
cause one more additional failure to be ignored.  Note that the use of
this option can lead to messages like "Feature X not implemented",
followed shortly by "Error: unable to enable Feature X".  In a few
such cases, contrary to the final message, Feature X \fBis\fP enabled.

.I verypermissive
\- equivalent to giving a large number of \'\-T permissive\' options:
ignore failures of \fBany number\fP of \fBmandatory\fP SMART commands.
Please see the note above.

.TP
.B \-b TYPE, \-\-badsum=TYPE
Specifies the action \fBsmartctl\fP should take if a checksum error is
detected in the: (1) Device Identity Structure, (2) SMART Self\-Test
Log Structure, (3) SMART Attribute Value Structure, (4) SMART
Attribute Threshold Structure, or (5) ATA Error Log Structure.

The valid arguments to this option are:

.I warn
\- report the incorrect checksum but carry on in spite of it.  This is the
default.

.I exit
\- exit \fBsmartctl\fP.

.I ignore
\- continue silently without issuing a warning.

.TP
.B \-r TYPE, \-\-report=TYPE
Intended primarily to help \fBsmartmontools\fP developers understand
the behavior of \fBsmartmontools\fP on non\-conforming or poorly
conforming hardware.  This option reports details of \fBsmartctl\fP
transactions with the device.  The option can be used multiple times.
When used just once, it shows a record of the ioctl() transactions
with the device.  When used more than once, the detail of these
ioctl() transactions are reported in greater detail.  The valid
arguments to this option are:

.I ioctl
\- report all ioctl() transactions.

.I ataioctl
\- report only ioctl() transactions with ATA devices.

.I scsiioctl
\- report only ioctl() transactions with SCSI devices. Invoking this once
shows the SCSI commands in hex and the corresponding status. Invoking
it a second time adds a hex listing of the first 64 bytes of data send to, 
or received from the device.

Any argument may include a positive integer to specify the level of detail
that should be reported.  The argument should be followed by a comma then
the integer with no spaces.  For example, 
.I ataioctl,2
The default
level is 1, so \'\-r ataioctl,1\' and \'\-r ataioctl\' are equivalent.

.TP
.B SMART FEATURE ENABLE/DISABLE COMMANDS:
.IP
.B Note: 
if multiple options are used to both enable and disable a
feature, then 
.B both
the enable and disable commands will be issued.  The enable command
will always be issued
.B before
the corresponding disable command.
.TP
.B \-s VALUE, \-\-smart=VALUE 
Enables or disables SMART on device.  The valid arguments to
this option are \fIon\fP and \fIoff\fP.  Note that the command \'\-s on\'
(perhaps used with with the \'\-o on\' and \'\-S on\' options) should be placed
in a start\-up script for your machine, for example in rc.local or rc.sysinit.
In principle the SMART feature settings are preserved over
power\-cycling, but it doesn\'t hurt to be sure. It is not necessary (or
useful) to enable SMART to see the TapeAlert messages.
.TP
.B \-o VALUE, \-\-offlineauto=VALUE
Enables or disables SMART automatic offline test, which scans the drive
every four hours for disk defects. This command can be given during normal
system operation.  The valid arguments to this option are \fIon\fP
and \fIoff\fP.

Note that the SMART automatic offline test command is listed as
"Obsolete" in every version of the ATA and ATA/ATAPI Specifications.
It was originally part of the SFF\-8035i Revision 2.0 specification,
but was never part of any ATA specification.  However it is
implemented and used by many vendors. [Good documentation can be found
in IBM\'s Official Published Disk Specifications.  For example the IBM
Travelstar 40GNX Hard Disk Drive Specifications (Revision 1.1, 22
April 2002, Publication # 1541, Document S07N\-7715\-02) page 164. You
can also read the SFF\-8035i Specification \-\- see REFERENCES below.]
You can tell if automatic offline testing is supported by seeing if
this command enables and disables it, as indicated by the \'Auto
Offline Data Collection\' part of the SMART capabilities report
(displayed with \'\-c\').

SMART provides \fBthree\fP basic categories of testing.  The
\fBfirst\fP category, called "online" testing, has no effect on the
performance of the device.  It is turned on by the \'\-s on\' option.

The \fBsecond\fP category of testing is called "offline" testing. This
type of test can, in principle, degrade the device performance.  The
\'\-o on\' option causes this offline testing to be carried out,
automatically, on a regular scheduled basis.  Normally, the disk will
suspend offline testing while disk accesses are taking place, and then
automatically resume it when the disk would otherwise be idle, so in
practice it has little effect.  Note that a one\-time offline test can
also be carried out immediately upon receipt of a user command.  See
the \'\-t offline\' option below, which causes a one\-time offline test
to be carried out immediately.

The choice (made by the SFF\-8035i and ATA specification authors) of
the word \fItesting\fP for these first two categories is unfortunate,
and often leads to confusion.  In fact these first two categories of
online and offline testing could have been more accurately described
as online and offline \fBdata collection\fP.

The results of this automatic or immediate offline testing (data
collection) are reflected in the values of the SMART Attributes.
Thus, if problems or errors are detected, the values of these
Attributes will go below their failure thresholds; some types of
errors may also appear in the SMART error log. These are visible with
the \'\-A\' and \'\-l error\' options respectively.

Some SMART attribute values are updated only during off\-line data
collection activities; the rest are updated during normal operation of
the device or during both normal operation and off\-line testing.  The
Attribute value table produced by the \'\-A\' option indicates this in
the UPDATED column.  Attributes of the first type are labeled
"Offline" and Attributes of the second type are labeled "Always".

The \fBthird\fP category of testing (and the \fIonly\fP category for
which the word \'testing\' is really an appropriate choice) is "self"
testing.  This third type of test is only performed (immediately) when
a command to run it is issued.  The \'\-t\' and \'\-X\' options can be
used to carry out and abort such self\-tests; please see below for
further details.

Any errors detected in the self testing will be shown in the
SMART self\-test log, which can be examined using the \'\-l selftest\'
option.

\fBNote:\fP in this manual page, the word \fB"Test"\fP is used in
connection with the second category just described, e.g. for the
"offline" testing.  The words \fB"Self\-test"\fP are used in
connection with the third category.
.TP
.B \-S VALUE, \-\-saveauto=VALUE
Enables or disables SMART autosave of device vendor\-specific
Attributes. The valid arguments to this option are \fIon\fP
and \fIoff\fP.  Note that this feature is preserved across disk power
cycles, so you should only need to issue it once.

For SCSI devices this toggles the value of the Global Logging Target
Save Disabled (GLTSD) bit in the Control Mode Page. Some disk
manufacturers set this bit by default. This prevents error counters,
power\-up hours and other useful data from being placed in non\-volatile
storage, so these values may be reset to zero the next time the device
is power\-cycled.  If the GLTSD bit is set then \'smartctl \-a\' will
issue a warning. Use \fIon\fP to clear the GLTSD bit and thus enable
saving counters to non\-volatile storage. For extreme streaming\-video
type applications you might consider using \fIoff\fP to set the GLTSD
bit.

.TP
.B SMART READ AND DISPLAY DATA OPTIONS:
.TP
.B \-H, \-\-health
Check: Ask the device to report its SMART health status or pending
TapeAlert messages.  SMART status is based on
information that it has gathered from online and offline
tests, which were used to determine/update its
SMART vendor\-specific Attribute values. TapeAlert status is obtained
by reading the TapeAlert log page.

If the device reports failing health status, this means
.B either
that the device has already failed, 
.B or 
that it is predicting its own failure within the next 24 hours.  If
this happens, use the \'\-a\' option to get more information, and
.B get your data off the disk and someplace safe as soon as you can.
.TP
.B \-c, \-\-capabilities
Prints only the generic SMART capabilities.  These show
what SMART features are implemented and how the device will
respond to some of the different SMART commands.  For example it
shows if the device logs errors, if it supports offline surface
scanning, and so on.  If the device can carry out self\-tests, this
option also shows the estimated time required to run those tests.

Note that the time required to run the Self\-tests (listed in minutes)
are fixed.  However the time required to run the Immediate Offline
Test (listed in seconds) is variable.  This means that if you issue a
command to perform an Immediate Offline test with the \'\-t offline\' option,
then the time may jump to a larger value and then count down as the
Immediate Offline Test is carried out.  Please see REFERENCES below
for further information about the the flags and capabilities described
by this option.
.TP
.B \-A, \-\-attributes
Prints only the vendor specific SMART Attributes.  The Attributes are
numbered from 1 to 253 and have specific names and ID numbers. For
example Attribute 12 is "power cycle count": how many times has the
disk been powered up.

Each Attribute has a "Raw" value, printed under the heading
"RAW_VALUE", and a "Normalized" value printed under the heading
"VALUE".  [Note: \fBsmartctl\fP prints these values in base\-10.]  In
the example just given, the "Raw Value" for Attribute 12 would be the
actual number of times that the disk has been power\-cycled, for
example 365 if the disk has been turned on once per day for exactly
one year.  Each vendor uses their own algorithm to convert this "Raw"
value to a "Normalized" value in the range from 1 to 254.  Please keep
in mind that \fBsmartctl\fP only reports the different Attribute
types, values, and thresholds as read from the device.  It does
\fBnot\fP carry out the conversion between "Raw" and "Normalized"
values: this is done by the disk\'s firmware.

The conversion from Raw value to a quantity with physical units is
not specified by the SMART standard. In most cases, the values printed
by \fBsmartctl\fP are sensible.  For example the temperature Attribute
generally has its raw value equal to the temperature in Celsius.
However in some cases vendors use unusual conventions.  For example
the Hitachi disk on my laptop reports its power\-on hours in minutes,
not hours. Some IBM disks track three temperatures rather than one, in
their raw values.  And so on.

Each Attribute also has a Threshold value (whose range is 0 to 255)
which is printed under the heading "THRESH".  If the Normalized value
is \fBless than or equal to\fP the Threshold value, then the Attribute
is said to have failed.  If the Attribute is a pre\-failure Attribute,
then disk failure is imminent.

Each Attribute also has a "Worst" value shown under the heading
"WORST".  This is the smallest (closest to failure) value that the
disk has recorded at any time during its lifetime when SMART was
enabled.  [Note however that some vendors firmware may actually
\fBincrease\fP the "Worst" value for some "rate\-type" Attributes.]

The Attribute table printed out by \fBsmartctl\fP also shows the
"TYPE" of the Attribute. Attributes are one of two possible types:
Pre\-failure or Old age.  Pre\-failure Attributes are ones which, if
less than or equal to their threshold values, indicate pending disk
failure.  Old age, or usage Attributes, are ones which indicate
end\-of\-product life from old\-age or normal aging and wearout, if
the Attribute value is less than or equal to the threshold.  \fBPlease
note\fP: the fact that an Attribute is of type 'Pre\-fail' does
\fBnot\fP mean that your disk is about to fail!  It only has this
meaning if the Attribute\'s current Normalized value is less than or
equal to the threshold value.

If the Attribute\'s current Normalized value is less than or equal to
the threshold value, then the "WHEN_FAILED" column will display
"FAILING_NOW". If not, but the worst recorded value is less than or
equal to the threshold value, then this column will display
"In_the_past".  If the "WHEN_FAILED" column has no entry (indicated by
a dash: \'\-\') then this Attribute is OK now (not failing) and has
also never failed in the past.

The table column labeled "UPDATED" shows if the SMART Attribute values
are updated during both normal operation and off\-line testing, or
only during offline testing.  The former are labeled "Always" and the
latter are labeled "Offline".

So to summarize: the Raw Attribute values are the ones that might have
a real physical interpretation, such as "Temperature Celsius",
"Hours", or "Start\-Stop Cycles".  Each manufacturer converts these,
using their detailed knowledge of the disk\'s operations and failure
modes, to Normalized Attribute values in the range 1\-254.  The
current and worst (lowest measured) of these Normalized Attribute
values are stored on the disk, along with a Threshold value that the
manufacturer has determined will indicate that the disk is going to
fail, or that it has exceeded its design age or aging limit.
\fBsmartctl\fP does \fBnot\fP calculate any of the Attribute values,
thresholds, or types, it merely reports them from the SMART data on
the device.

Note that starting with ATA/ATAPI\-4, revision 4, the meaning of these
Attribute fields has been made entirely vendor\-specific.  However most
ATA/ATAPI\-5 disks seem to respect their meaning, so we have retained
the option of printing the Attribute values.

For SCSI devices the "attributes" are obtained from the temperature
and start-stop cycle counter log pages. Certain vendor specific
attributes are listed if recognised. The attributes are output in a
relatively free format (compared with ATA disk attributes).
.TP
.B \-l TYPE, \-\-log=TYPE
Prints either the SMART Error Log, the SMART Self\-Test Log, the SMART
Selective Self-Test Log [ATA only], or the Log Directory [ATA only].
The valid arguments to this option are:

.I error
\- prints only the SMART error log.  SMART disks maintain a log of the
most recent five non\-trivial errors. For each of these errors, the
disk power\-on lifetime at which the error occurred is recorded, as is
the device status (idle, standby, etc) at the time of the error.  For
some common types of errors, the Error Register (ER) and Status
Register (SR) values are decoded and printed as text. The meanings of these
are:
.nf
   \fBABRT\fP:  Command \fBAB\fPo\fBRT\fPed
   \fBAMNF\fP:  \fBA\fPddress \fBM\fPark \fBN\fPot \fBF\fPound
   \fBCCTO\fP:  \fBC\fPommand \fBC\fPompletion \fBT\fPimed \fBO\fPut
   \fBEOM\fP:   \fBE\fPnd \fBO\fPf \fBM\fPedia
   \fBICRC\fP:  \fBI\fPnterface \fBC\fPyclic \fBR\fPedundancy \fBC\fPode (CRC) error
   \fBIDNF\fP:  \fBID\fPentity \fBN\fPot \fBF\fPound
   \fBILI\fP:   (packet command\-set specific)
   \fBMC\fP:    \fBM\fPedia \fBC\fPhanged
   \fBMCR\fP:   \fBM\fPedia \fBC\fPhange \fBR\fPequest
   \fBNM\fP:    \fBN\fPo \fBM\fPedia
   \fBobs\fP:   \fBobs\fPolete
   \fBTK0NF\fP: \fBT\fPrac\fBK 0 N\fPot \fBF\fPound
   \fBUNC\fP:   \fBUNC\fPorrectable Error in Data
   \fBWP\fP:    Media is \fBW\fPrite \fBP\fProtected
.fi
In addition, up to the last five commands that preceded the error are
listed, along with a timestamp measured from the start of the
corresponding power cycle. This is displayed in the form
Dd+HH:MM:SS.msec where D is the number of days, HH is hours, MM is
minutes, SS is seconds and msec is milliseconds.  [Note: this time
stamp wraps after 2^32 milliseconds, or 49 days 17 hours 2 minutes and
47.296 seconds.]  The key ATA disk registers are also recorded in the
log.  The final column of the error log is a text\-string description
of the ATA command defined by the Command Register (CR) and Feature
Register (FR) values.  Commands that are obsolete in the most current
(ATA\-7) spec are listed like this: \fBREAD LONG (w/ retry) [OBS\-4]\fP,
indicating that the command became obsolete with or in the ATA\-4
specification.  Similarly, the notation \fB[RET\-\fP\fIN\fP\fB]\fP is
used to indicate that a command was retired in the ATA\-\fIN\fP
specification.  Some commands are not defined in any version of the
ATA specification but are in common use nonetheless; these are marked
\fB[NS]\fP, meaning non\-standard.

The ATA Specification (ATA\-5 Revision 1c, Section 8.41.6.8.2) says:
\fB"Error log structures shall include UNC errors, IDNF errors for
which the address requested was valid, servo errors, write fault
errors, etc.  Error log data structures shall not include errors
attributed to the receipt of faulty commands such as command codes not
implemented by the device or requests with invalid parameters or
invalid addresses."\fP The definitions of these terms are:
.br
\fBUNC\fP (\fBUNC\fPorrectable): data is uncorrectable.  This refers
to data which has been read from the disk, but for which the Error
Checking and Correction (ECC) codes are inconsistent.  In effect, this
means that the data can not be read.
.br
\fBIDNF\fP (\fBID N\fPot \fBF\fPound): user\-accessible address could
not be found. For READ LOG type commands, \fBIDNF\fP can also indicate
that a device data log structure checksum was incorrect.

If the command that caused the error was a READ or WRITE command, then
the Logical Block Address (LBA) at which the error occurred will be
printed in base 10 and base 16.  The LBA is a linear address, which
counts 512\-byte sectors on the disk, starting from zero.  (Because of
the limitations of the SMART error log, if the LBA is greater than
0xfffffff, then either no error log entry will be made, or the error
log entry will have an incorrect LBA. This may happen for drives with
a capacity greater than 128 GiB or 137 GB.) On Linux systems the
smartmontools web page has instructions about how to convert the LBA
address to the name of the disk file containing the erroneous disk
sector.

Please note that some manufacturers \fBignore\fP the ATA
specifications, and make entries in the error log if the device
receives a command which is not implemented or is not valid.

.I error [SCSI]
\- prints the error counter log pages for reads, write and verifies.
The verify row is only output if it has an element other than zero.

.I selftest
\- prints the SMART self\-test log.  The disk maintains a self\-test log
showing the results of the self tests, which can be run using the
\'\-t\' option described below.  For each of the most recent
twenty\-one self\-tests, the log shows the type of test (short or
extended, off\-line or captive) and the final status of the test.  If
the test did not complete successfully, then the percentage of the
test remaining is shown.  The time at which the test took place,
measured in hours of disk lifetime, is also printed.  If any errors
were detected, the Logical Block Address (LBA) of the first error is
printed in hexadecimal notation. On Linux systems the smartmontools
web page has instructions about how to convert this LBA address to the
name of the disk file containing the erroneous block.

.I selftest [SCSI]
\- the self\-test log for a SCSI device has a slightly different format
than for an ATA device.  For each of the most recent twenty
self\-tests, it shows the type of test and the status (final or in
progress) of the test. SCSI standards use the terms "foreground" and
"background" (rather than ATA\'s corresponding "captive" and
"off\-line") and "short" and "long" (rather than ATA\'s corresponding
"short" and "extended") to describe the type of the test.  The printed
segment number is only relevant when a test fails in the third or
later test segment.  It identifies the test that failed and consists
of either the number of the segment that failed during the test, or
the number of the test that failed and the number of the segment in
which the test was run, using a vendor\-specific method of putting both
numbers into a single byte.  The Logical Block Address (LBA) of the
first error is printed in hexadecimal notation.  On Linux systems the
smartmontools web page has instructions about how to convert this LBA
address to the name of the disk file containing the erroneous block.
If provided, the SCSI Sense Key (SK), Additional Sense Code (ASC) and
Additional Sense Code Qualifier (ASQ) are also printed. The self tests
can be run using the \'\-t\' option described below (using the ATA
test terminology).

.I selective [ATA]
\- Some ATA\-7 disks (example: Maxtor) also maintain a selective
self\-test log.  Please see the \'\-t select\' option below for a
description of selective self\-tests.  The selective self\-test log
shows the start/end Logical Block Addresses (LBA) of each of the five
test spans, and their current test status.  If the span is being
tested or the remainder of the disk is being read\-scanned, the
current 65536\-sector block of LBAs being tested is also displayed.
The selective self\-test log also shows if a read\-scan of the
remainder of the disk will be carried out after the selective
self\-test has completed (see \'\-t afterselect\' option) and the time
delay before restarting this read\-scan if it is interrupted (see
\'\-t pending\' option). This is a new smartmontools feature; please
report unusual or incorrect behavior to the smartmontools\-support
mailing list.

.I directory
\- if the device supports the General Purpose Logging feature set
(ATA\-6 and ATA\-7 only) then this prints the Log Directory (the log at
address 0).  The Log Directory shows what logs are available and their
length in sectors (512 bytes).  The contents of the logs at address 1
[Summary SMART error log] and at address 6 [SMART self\-test log] may
be printed using the previously\-described
.I error
and
.I selftest
arguments to this option. [Please note: this is a new, experimental
feature.  We would like to add support for printing the contents of
extended and comprehensive SMART self\-test and error logs.  If your
disk supports these, and you would like to assist, please contact the
\fBsmartmontools\fP developers.]

.TP
.B \-v N,OPTION, \-\-vendorattribute=N,OPTION
Sets a vendor\-specific display OPTION for Attribute N.  This option
may be used multiple times. Valid arguments to this option are:

.I help
\- Prints (to STDOUT) a list of all valid arguments to this option,
then exits.

.I 9,minutes
\- Raw Attribute number 9 is power\-on time in minutes.  Its raw value
will be displayed in the form "Xh+Ym".  Here X is hours, and Y is
minutes in the range 0\-59 inclusive.  Y is always printed with two
digits, for example "06" or "31" or "00".

.I 9,seconds
\- Raw Attribute number 9 is power\-on time in seconds.  Its raw value
will be displayed in the form "Xh+Ym+Zs".  Here X is hours, Y is
minutes in the range 0\-59 inclusive, and Z is seconds in the range
0\-59 inclusive.  Y and Z are always printed with two digits, for
example "06" or "31" or "00".

.I 9,halfminutes
\- Raw Attribute number 9 is power\-on time, measured in units of 30
seconds.  This format is used by some Samsung disks.  Its raw value
will be displayed in the form "Xh+Ym".  Here X is hours, and Y is
minutes in the range 0\-59 inclusive.  Y is always printed with two
digits, for example "06" or "31" or "00".

.I 9,temp
\- Raw Attribute number 9 is the disk temperature in Celsius.

.I 192,emergencyretractcyclect
\- Raw Attribute number 192 is the Emergency Retract Cycle Count.

.I 193,loadunload
\- Raw Attribute number 193 contains two values. The first is the
number of load cycles.  The second is the number of unload cycles.
The difference between these two values is the number of times that
the drive was unexpectedly powered off (also called an emergency
unload). As a rule of thumb, the mechanical stress created by one
emergency unload is equivalent to that created by one hundred normal
unloads.

.I 194,10xCelsius
\- Raw Attribute number 194 is ten times the disk temperature in
Celsius.  This is used by some Samsung disks (example: model SV1204H
with RK100\-13 firmware).

.I 194,unknown
\- Raw Attribute number 194 is NOT the disk temperature, and its
interpretation is unknown. This is primarily useful for the \-P
(presets) option.

.I 198,offlinescanuncsectorct
\- Raw Attribute number 198 is the Offline Scan UNC Sector Count.

.I 200,writeerrorcount
\- Raw Attribute number 200 is the Write Error Count.

.I 201,detectedtacount
\- Raw Attribute number 201 is the Detected TA Count.

.I 220,temp
\- Raw Attribute number 220 is the disk temperature in Celsius.

Note: a table of hard drive models, listing which Attribute
corresponds to temperature, can be found at:
http://coredump.free.fr/linux/hddtemp.db

.I N,raw8
\- Print the Raw value of Attribute N as six 8\-bit unsigned base\-10
integers.  This may be useful for decoding the meaning of the Raw
value.  The form \'N,raw8\' prints Raw values for ALL Attributes in this
form.  The form (for example) \'123,raw8\' only prints the Raw value for
Attribute 123 in this form.

.I N,raw16
\- Print the Raw value of Attribute N as three 16\-bit unsigned base\-10
integers.  This may be useful for decoding the meaning of the Raw
value.  The form \'N,raw16\' prints Raw values for ALL Attributes in this
form.  The form (for example) \'123,raw16\' only prints the Raw value for
Attribute 123 in this form.

.I N,raw48
\- Print the Raw value of Attribute N as a 48\-bit unsigned base\-10
integer.  This may be useful for decoding the meaning of the Raw
value.  The form \'N,raw48\' prints Raw values for ALL Attributes in
this form.  The form (for example) \'123,raw48\' only prints the Raw
value for Attribute 123 in this form.

.TP
.B \-F TYPE, \-\-firmwarebug=TYPE
Modifies the behavior of \fBsmartctl\fP to compensate for some known
and understood device firmware bug.  The arguments to this option are
exclusive, so that only the final option given is used.  The valid
values are:

.I none
\- Assume that the device firmware obeys the ATA specifications.  This
is the default, unless the device has presets for \'\-F\' in the
device database (see note below).

.I samsung
\- In some Samsung disks (example: model SV4012H Firmware Version:
RM100\-08) some of the two\- and four\-byte quantities in the SMART data
structures are byte\-swapped (relative to the ATA specification).
Enabling this option tells \fBsmartctl\fP to evaluate these quantities
in byte\-reversed order.  Some signs that your disk needs this option
are (1) no self\-test log printed, even though you have run self\-tests;
(2) very large numbers of ATA errors reported in the ATA error log;
(3) strange and impossible values for the ATA error log timestamps.

.I samsung2
\- In more recent Samsung disks (firmware revisions ending in "\-23")
the number of ATA errors reported is byte swapped.  Enabling this
option tells \fBsmartctl\fP to evaluate this quantity in byte\-reversed
order.

Note that an explicit \'\-F\' option on the command line will
over\-ride any preset values for \'\-F\' (see the \'\-P\' option
below).

.TP
.B \-P TYPE, \-\-presets=TYPE
Specifies whether \fBsmartctl\fP should use any preset options that
are available for this drive. By default, if the drive is recognized
in the \fBsmartmontools\fP database, then the presets are used.

\fBsmartctl\fP can automatically set appropriate options for known
drives.  For example, the Maxtor 4D080H4 uses Attribute 9 to stores
power\-on time in minutes whereas most drives use that Attribute to
store the power\-on time in hours.  The command\-line option \'-v
9,minutes\' ensures that \fBsmartctl\fP correctly interprets Attribute
9 in this case, but that option is preset for the Maxtor 4D080H4 and
so need not be specified by the user on the \fBsmartctl\fP command
line.

The argument
.I show
will show any preset options for your drive and the argument
.I showall
will show all known drives in the \fBsmartmontools\fP database, along
with their preset options.  If there are no presets for your drive and
you think there should be (for example, a \-v or \-F option is needed
to get \fBsmartctl\fP to display correct values) then please contact
the \fBsmartmontools\fP developers so that this information can be
added to the \fBsmartmontools\fP database.  Contact information is at the
end of this man page.

The valid arguments to this option are:

.I use
\- if a drive is recognized, then use the stored presets for it.  This
is the default. Note that presets will NOT over\-ride additional
Attribute interpretation (\'-v N,something\') command\-line options or
explicit \'\-F\' command\-line options..

.I ignore
\- do not use presets.

.I show
\- show if the drive is recognized in the database, and if so, its
presets, then exit.

.I showall
\- list all recognized drives, and the presets that are set for them,
then exit.

.TP
.B SMART RUN/ABORT OFFLINE TEST AND SELF\-TEST OPTIONS:
.TP
.B \-t TEST, \-\-test=TEST
Executes TEST immediately.  The \'\-C\' option can be used in
conjunction with this option to run the short or long (and also for
ATA devices, selective or conveyance) self\-tests in captive mode
(known as "foreground mode" for SCSI devices).  Note that only one
test can be run at a time, so this option should only be used once per
command line.

The valid arguments to this option are:  

.I offline
\- runs SMART Immediate Offline Test.  This immediately
starts the test described above.  This command can be given during
normal system operation.  The effects of this test are visible only in
that it updates the SMART Attribute values, and if errors are
found they will appear in the SMART error log, visible with the \'\-l error\'
option. [In the case of SCSI devices runs the default self test in
foreground. No entry is placed in the self test log.]

If the \'\-c\' option to \fBsmartctl\fP shows that the device has the
"Suspend Offline collection upon new command" capability then you can
track the progress of the Immediate Offline test using the \'\-c\'
option to \fBsmartctl\fP.  If the \'\-c\' option show that the device
has the "Abort Offline collection upon new command" capability then
most commands will abort the Immediate Offline Test, so you should not
try to track the progress of the test with \'\-c\', as it will abort
the test.

.I short
\- runs SMART Short Self Test (usually under ten minutes).
[Note: in the case of SCSI devices,
this command option runs the "Background short" self\-test.]
This command can be given during normal system operation (unless run in
captive mode \- see the \'\-C\' option below).  This is a
test in a different category than the immediate or automatic offline
tests.  The "Self" tests check the electrical and mechanical
performance as well as the read performance of the disk.  Their
results are reported in the Self Test Error Log, readable with
the \'\-l selftest\' option.  Note that on some disks the progress of the
self\-test can be monitored by watching this log during the self\-test; with other disks
use the \'\-c\' option to monitor progress.

.I long
\- runs SMART Extended Self Test (tens of minutes).
[Note: in the case of SCSI devices,
this command option runs the "Background long" self\-test.]
This is a
longer and more thorough version of the Short Self Test described
above.  Note that this command can be given during normal
system operation (unless run in captive mode \- see the \'\-C\' option below).

.I conveyance
\- [ATA ONLY] runs a SMART Conveyance Self Test (minutes).  This
self\-test routine is intended to identify damage incurred during
transporting of the device. This self\-test routine should take on the
order of minutes to complete.  Note that this command can be given
during normal system operation (unless run in captive mode \- see the
\'\-C\' option below).

.I select,N\-M

\- [ATA ONLY] [NEW EXPERIMENTAL SMARTCTL FEATURE] runs a SMART
Selective Self Test, to test a \fBrange\fP of disk Logical Block
Addresses (LBAs), rather than the entire disk.  Each range of LBAs
that is checked is called a "span" and is specified by a starting LBA
(N) and an ending LBA (M) with N less than or equal to M.  For example
the command:
.nf
  smartctl \-t select,10\-20 /dev/hda
.fi
runs a self test on one span consisting of LBAs ten to twenty
(inclusive). The \'\-t\' option can be given up to five times, to test
up to five spans.  For example the command:
.nf
  smartctl \-t select,0\-100 \-t select,1000\-2000 /dev/hda
.fi
runs a self test on two spans.  The first span consists of 101 LBAs
and the second span consists of 1001 LBAs.  Note that the spans can
overlap partially or completely, for example:
.nf
  smartctl \-t select,0\-10 \-t select,5\-15 \-t select,10\-20 /dev/hda
.fi
The results of the selective self\-test can be obtained (both during
and after the test) by printing the SMART self\-test log, using the
\'\-l selftest\' option to smartctl.

Selective self tests are particularly useful as disk capacities
increase: an extended self test (smartctl \-t long) can take several
hours.  Selective self\-tests are helpful if (based on SYSLOG error
messages, previous failed self\-tests, or SMART error log entries) you
suspect that a disk is having problems at a particular range of
Logical Block Addresses (LBAs).

Selective self\-tests can be run during normal system operation (unless
done in captive mode \- see the \'\-C\' option below).

[Note: this new experimental smartmontools feature is currently only
available under Linux.  The Linux kernel must be compiled with the
configuration option CONFIG_IDE_TASKFILE_IO enabled.  Please report
unusual or incorrect behavior to the smartmontools\-support mailing
list.]

.I afterselect,on
\- [ATA ONLY] perform an offline read scan after a Selective Self\-test
has completed. This option must be used together with one or more of
the \fIselect,N\-M\fP options above. If the LBAs that have been
specified in the Selective self\-test pass the test with no errors
found, then read scan the \fBremainder\fP of the disk.  If the device
is powered\-cycled while this read scan is in progress, the read scan
will be automatically resumed after a time specified by the pending
timer (see below).  The value of this option is preserved between
selective self\-tests.

.I afterselect,off
\- [ATA ONLY] do not read scan the remainder of the disk after a
Selective self\-test has completed.  This option must be use together
with one or more of the \fIselect,N\-M\fP options above.  The value of this
option is preserved between selective self\-tests.

.I pending,N 
\- [ATA ONLY] set the pending offline read scan timer to N minutes.
Here N is an integer in the range from 0 to 65535 inclusive.  If the
device is powered off during a read scan after a Selective self\-test,
then resume the test automatically N minutes after power\-up.  This
option must be use together with one or more of the \fIselect,N\-M\fP
options above. The value of this option is preserved between selective
self\-tests.

.TP
.B \-C, \-\-captive
Runs self\-tests in captive mode.  This has no effect with \'\-t
offline\' or if the \'\-t\' option is not used. [Note: in the case of
SCSI devices, this command option runs the self\-test in "Foreground"
mode.]

\fBWARNING: Tests run in captive mode may busy out the drive for the
length of the test.  Only run captive tests on drives without any
mounted partitions!\fP

.TP
.B \-X, \-\-abort
Aborts non\-captive SMART Self Tests.  Note that this
command will abort the Offline Immediate Test routine only if your
disk has the "Abort Offline collection upon new command" capability.
.PP
.SH EXAMPLES
.nf
.B smartctl \-a /dev/hda
.fi
Print all SMART information for drive /dev/hda (Primary Master).
.PP
.nf
.B smartctl \-s off /dev/hdd
.fi
Disable SMART on drive /dev/hdd (Secondary Slave).
.PP
.nf
.B smartctl \-\-smart=on \-\-offlineauto=on \-\-saveauto=on /dev/hda
.fi
Enable SMART on drive /dev/hda, enable automatic offline
testing every four hours, and enable autosaving of
SMART Attributes.  This is a good start\-up line for your system\'s
init files.  You can issue this command on a running system.
.PP
.nf
.B smartctl \-t long /dev/hdc
.fi
Begin an extended self\-test of drive /dev/hdc.  You can issue this
command on a running system.  The results can be seen in the self\-test
log visible with the \'\-l selftest\' option after it has completed.
.PP
.nf
.B smartctl \-s on \-t offline /dev/hda
.fi
Enable SMART on the disk, and begin an immediate offline test of
drive /dev/hda.  You can issue this command on a running system.  The
results are only used to update the SMART Attributes, visible
with the \'\-A\' option.  If any device errors occur, they are logged to
the SMART error log, which can be seen with the \'\-l error\' option.
.PP
.nf
.B smartctl \-A \-v 9,minutes /dev/hda
.fi
Shows the vendor Attributes, when the disk stores its power\-on time
internally in minutes rather than hours.
.PP
.nf
.B smartctl \-q errorsonly \-H \-l selftest /dev/hda
.fi
Produces output only if the device returns failing SMART status,
or if some of the logged self\-tests ended with errors.
.PP
.nf
.B smartctl \-q silent \-a /dev/hda
.fi
Examine all SMART data for device /dev/hda, but produce no
printed output.  You must use the exit status (the
.B $?
shell variable) to learn if any Attributes are out of bound, if the
SMART status is failing, if there are errors recorded in the
self\-test log, or if there are errors recorded in the disk error log.
.PP
.nf
.B smartctl \-a \-d 3ware,0 /dev/sda
.fi
Examine all SMART data for the first ATA disk connected to a 3ware
RAID controller card.
.PP
.nf
.B smartctl \-t short \-d 3ware,3 /dev/sdb
.fi
Start a short self\-test on the fourth ATA disk connected to the 3ware RAID
controller card which is the second SCSI device /dev/sdb.
.nf
.B smartctl \-t select,10\-100 \-t select,30\-300 \-t afterselect,on \-t pending,45 /dev/hda
.fi
Run a selective self\-test on LBAs 10 to 100 and 30 to 300.  After the
these LBAs have been tested, read\-scan the remainder of the disk.  If the disk is
power\-cycled during the read\-scan, resume the scan 45 minutes after power to the
device is restored.
.PP
.SH RETURN VALUES
The return values of \fBsmartctl\fP are defined by a bitmask.  If all
is well with the disk, the return value (exit status) of
\fBsmartctl\fP is 0 (all bits turned off).  If a problem occurs, or an
error, potential error, or fault is detected, then a non\-zero status
is returned.  In this case, the eight different bits in the return
value have the following meanings for ATA disks; some of these values
may also be returned for SCSI disks.
.TP
.B Bit 0:
Command line did not parse.
.TP
.B Bit 1:
Device open failed, or device did not return an IDENTIFY DEVICE structure. 
.TP
.B Bit 2:
Some SMART command to the disk failed, or there was a checksum error
in a SMART data structure (see \'\-b\' option above).
.TP
.B Bit 3:
SMART status check returned "DISK FAILING".
.TP
.B Bit 4:
SMART status check returned "DISK OK" but we found prefail Attributes <= threshold.
.TP
.B Bit 5:
SMART status check returned "DISK OK" but we found that some (usage
or prefail) Attributes have been <= threshold at some time in the
past. 
.TP
.B Bit 6:
The device error log contains records of errors.
.TP
.B Bit 7:
The device self\-test log contains records of errors.

To test within the shell for whether or not the different bits are
turned on or off, you can use the following type of construction (this
is bash syntax):
.nf
.B smartstat=$(($? & 8))
.fi
This looks at only at bit 3 of the exit status
.B $?
(since 8=2^3).  The shell variable
$smartstat will be nonzero if SMART status check returned "disk
failing" and zero otherwise.

.PP
.SH NOTES
The TapeAlert log page flags are cleared for the initiator when the
page is read. This means that each alert condition is reported only
once by \fBsmartctl\fP for each initiator for each activation of the
condition.

.PP
.SH AUTHOR
\fBBruce Allen\fP smartmontools\-support@lists.sourceforge.net
.fi
University of Wisconsin \- Milwaukee Physics Department
 
.PP
.SH CONTRIBUTORS
The following have made large contributions to smartmontools:
.nf
\fBCasper Dik\fP (Solaris SCSI interface)
\fBChristian Franke\fP (Windows interface)
\fBDouglas Gilbert\fP (SCSI subsystem)
\fBGuido Guenther\fP (Autoconf/Automake packaging)
\fBEduard Martinescu\fP (FreeBSD interface)
\fBFr\*'ed\*'eric L. W. Meunier\fP (Web site and Mailing list)
\fBKeiji Sawada\fP (Solaris ATA interface)
\fBSergey Svishchev\fP (NetBSD interface)
\fBPhil Williams\fP (User interface and drive database)
.fi
Many other individuals have made smaller contributions and corrections.

.PP
.SH CREDITS
.fi
This code was derived from the smartsuite package, written by Michael
Cornwell, and from the previous UCSC smartsuite package.  It extends
these to cover ATA\-5 disks.  This code was originally developed as a
Senior Thesis by Michael Cornwell at the Concurrent Systems Laboratory
(now part of the Storage Systems Research Center), Jack Baskin School
of Engineering, University of California, Santa
Cruz. \fBhttp://ssrc.soe.ucsc.edu/\fP .
.SH
HOME PAGE FOR SMARTMONTOOLS: 
.fi
Please see the following web site for updates, further documentation, bug
reports and patches:
.nf
.B
http://smartmontools.sourceforge.net/

.SH
SEE ALSO:
\fBsmartd\fP(8), \fBbadblocks\fP(8), \fBide\-smart\P(8).
.SH
REFERENCES FOR SMART
.fi
An introductory article about smartmontools is \fIMonitoring Hard
Disks with SMART\fP, by Bruce Allen, Linux Journal, January 2004,
pages 74-77. This is http://www.linuxjournal.com/article.php?sid=6983
online.

If you would like to understand better how SMART works, and what it
does, a good place to start is Section 8.41 of the "AT Attachment with
Packet Interface\-5" (ATA/ATAPI\-5) specification.  This documents the
SMART functionality which the \fBsmartmontools\fP utilities provide
access to.  You can find Revision 1 of this document at
\fBhttp://www.t13.org/project/d1321r1c.pdf\fP .

.fi
Future versions of the specifications (ATA/ATAPI\-6 and ATA/ATAPI\-7),
and later revisions (2, 3) of the ATA/ATAPI\-5 specification are
available from \fBhttp://www.t13.org/#FTP_site\fP .

.fi
The functioning of SMART was originally defined by the SFF\-8035i
revision 2 and the SFF\-8055i revision 1.4 specifications.  These are
publications of the Small Form Factors (SFF) Committee.  Links to
these documents may be found in the References section of the
\fBsmartmontools\fP home page at
\fBhttp://smartmontools.sourceforge.net/\fP .

.SH
CVS ID OF THIS PAGE:
$Id: smartctl.8.in,v 1.53 2004/06/13 19:49:54 ballen4705 Exp $
.\" Local Variables:	         
.\" mode: nroff         
.\" End: