Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
Linux Magazine

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
Copyright Info
Terms of Use
Privacy Info
Masthead / Impressum
Your Account

Private Messages

News Archive
Submit News
User Articles
Web Links


The Web

Who's Online
There are currently, 70 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here




       smartctl [options] device


       smartctl   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  smartctl is compat­
       ible  with  ATA/ATAPI-5  and earlier standards (see REFER­
       ENCES below)

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

       smartctl also provides support for polling TapeAlert  mes­
       sages from SCSI tape drives and changers.

       The  user  must  specify  the  device  to be controlled or
       interrogated as  the  final  argument  to  smartctl.   ATA
       devices  use  the form "/dev/hd*" and SCSI devices use the
       form "/dev/sd*".  For SCSI Tape Drives and  Changers  with
       TapeAlert   support   use   the  devices  "/dev/nst*"  and
       "/dev/sg*".  More general paths  may  also  be  specified.
       smartctl  will  attempt  to guess the device type, but the
       '-d' option can be used to specify a device type of ATA or
       SCSI if required.

       Note  that  the  printed  output of smartctl 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  0x
       for  example:  "0xff". This man page follows the same con­


       The options are grouped  below  into  several  categories.
       smartctl  will  execute  the corresponding commands in the

       -?     Same as -h.

       -V, --version, --copyright, --license
              Prints  version,  copyright, license, home page and
              CVS-id information for your  copy  of  smartctl  to
              STDOUT  and then exits.  Please include this infor­
              mation if you are reporting bugs or problems.

       -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.

       -a, --all
              Prints all SMART  information  about  the  disk  or
              TapeAlert  information  about  the  tape  drive  or
              changer.  This is equivalent to '-H  -i  -c  -A  -l
              error  -l  selftest'  (for SCSI, '-H -i -l error -l


       -q TYPE, --quietmode=TYPE
              Specifies that smartctl should run in  one  of  the
              two  quiet  modes  described here.  The valid argu­
              ments to this option are:

              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.

              silent  -  print  no output.  The only way to learn
              about what was found is to use the exit  status  of
              smartctl (see RETURN VALUES below).

       -d TYPE, --device=TYPE
              Specifies  the type of the device.  The valid argu­
              ments to this option are ata, scsi, and 3ware,N. If
              this  option is not used then smartctl will attempt
              to guess the device type from the device name.

              To look at ATA disks behind 3ware  SCSI  RAID  con­
              trollers, use syntax such as:

       -T TYPE, --tolerance=TYPE
              Specifies  how tolerant smartctl should be of SMART
              command failures.   The  valid  arguments  to  this
              option are:

              normal  - exit on failure of a mandatory SMART com­
              mand, and ignore failures of  optional  SMART  com­
              mands.   This  is  the default. It can lead to mes­
              sages like ´Feature X  not  implemented´,  followed
              shortly by ´Error: unable to enable Feature X´.  On
              some devices, giving unimplemented  optional  SMART
              commands  doesn´t  even  cause  an error.  This can
              result in  misleading  smartctl  messages  such  as
              ´Feature  X  not  implemented´, followed shortly by
              ´Feature X: enabled´.  In most such cases, contrary
              to the final message, the Feature is not enabled.

              conservative  -  exit  on failure of any SMART com­

              permissive - ignore failures of any SMART commands.

              Here "mandatory" means "required by the ATA/ATAPI-5
              Specification if the device  implements  the  SMART
              command  set" and "optional" means "not required by
              the ATA/ATAPI-5 Specification even  if  the  device
              implements the SMART command set."  The 'mandatory'
              SMART commands are:  (1)  Enable/Disable  Attribute
              Autosave,  (2)  Enable/Disable SMART, and (3) SMART
              Return Status.

       -b TYPE, --badsum=TYPE
              Specifies the action  smartctl  should  take  if  a
              checksum error is detected in the: (1) Device Iden­
              tity Structure, (2) SMART Self-Test Log  Structure,
              (3)  SMART  Attribute  Value  Structure,  (4) SMART
              Attribute Threshold Structure, or (5) ATA Error Log

              The valid arguments to this option are:

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

              exit - exit smartctl.

              ignore - continue silently without issuing a  warn­
              ioctl - report all ioctl() transactions.

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

              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 exam­
              ple, ataioctl,2 The default  level  is  1,  so  '-r
              ataioctl,1' and '-r ataioctl' are equivalent.


              Note:  if  multiple options are used to both enable
              and disable a feature, then  both  the  enable  and
              disable  commands  will be issued.  The enable com­
              mand will always be issued before the corresponding
              disable command.

       -s VALUE, --smart=VALUE
              Enables  or  disables  SMART  on device.  The valid
              arguments to this option are on and off.  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

       -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 on and off.

              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.   How­
              effect  on  the  performance  of the device.  It is
              turned on by the '-s on' option.

              The second 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.   Nor­
              mally,  the disk will suspend offline testing while
              disk accesses are taking place, and then  automati­
              cally  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  immedi­

              Any  errors  detected  in  automatic  or  immediate
              offline testing are reflected in the values of  the
              SMART  Attributes;  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

              The third category of testing is the  'self'  test­
              ing.   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.

              Note: in this manual page, the word Test is used in
              connection with the second category just described,
              e.g.  for  the  'offline' testing.  The words Self-
              test are used in connection with  the  third  cate­

       -S VALUE, --saveauto=VALUE
              values. TapeAlert status is obtained by reading the
              TapeAlert log page.

              If  the  device reports failing health status, this
              means either that the device has already failed, 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 get your data
              off the disk and someplace safe as soon as you can.

       -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 scan­
              ning, 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

       -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: smartctl
              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.  Note that smartctl only reports the
              different Attribute values and thresholds.  It does
              not carry out  the  conversion  between  'Raw'  and
              Each  Attribute  also  has a Threshold value (whose
              range is 0 to 255) which is printed under the head­
              ing 'THRESH'.  If the Normalized value is less than
              or equal to 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 will have  firmware
              which  will  increase  the  'Worst'  value for some
              "rate-type" Attributes.]

              The Attribute table printed out  by  smartctl  also
              shows  the  'TYPE'  of  the Attribute.  Pre-failure
              Attributes are ones which, if less than or equal to
              their threshold values, indicate pending disk fail­
              ure.  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.

              If  the  Attribute's current Normalized value is <=
              threshold, then the ´WHEN_FAILED' column will  dis­
              play 'FAILED NOW!'.  If not, but the worst recorded
              value is <= threshold, then this column  will  dis­
              play ´In the past'.

              The  table  column  labeled  'UPDATED' shows if the
              SMART Attribute values are updated during both nor­
              mal  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' 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 worst (lowest measured) of
              these Normalized Attribute values is stored on  the
              disk,  along  with a Threshold value that the manu­
              facturer has determined will indicate that the disk
              is  going  to  fail,  or  that  it has exceeded its
              design age or aging limit.  smartctl does not  cal­
              culate  any of these values, it merely reports them
              from the SMART data on the disk.

              Note that starting with  ATA/ATAPI-4,  revision  4,
              power-on lifetime at which the  error  occurred  is
              recorded,  as  is the device status (idle, standby,
              etc) at the time of the error.  Finally, up to  the
              last five commands that preceded the error are also
              recorded, along with a timestamp measured  in  sec­
              onds  from  the  start  of  the corresponding power
              cycle.  [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: READ  LONG  (w/  retry)  [OBS-4],
              indicating that the command became obsolete with or
              in the ATA-4 specification.  Similarly,  the  nota­
              tion [RET-N] is used to indicate that a command was
              retired in the ATA-N specification.  Some  commands
              are  not defined in any version of the ATA specifi­
              cation but are in common use nonetheless; these are
              marked [NS], meaning non-standard.

              The  ATA  Specification (ATA-5 Revision 1c, Section
     to be precise) says:
              "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
              The definitions of these terms are:
              UNC (UNCorrectable): data is uncorrectable.
              IDNF  (ID Not Found): user-accessible address could
              not be found. For READ LOG type commands this  also
              can  indicate  that  a  device  data  log structure
              checksum was incorrect.

              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.

              selftest - prints only  the  SMART  self-test  log.
              The disk maintains a 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
              ´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 ven­
              dor-specific method of putting both numbers into  a
              single  byte.   The  Logical Block Address (LBA) of
              the first error is printed in hexadecimal notation.
              If  provided,  the  SCSI Sense Key (SK), Additional
              Sense Code (ASC) and Additional Sense  Code  Quali­
              fier  (ASQ) are also printed. The self tests can be
              run using the ´-t' option  described  below  (using
              the ATA test terminology).

              directory - if the device supports the General Pur­
              pose 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
              error   and  selftest  arguments  to  this  option.
              [Please note: this is a new, experimental  feature.
              We  would like to add support for printing the con­
              tents of extended and comprehensive SMART self-test
              and  error  logs.  If your disk supports these, and
              you would like to assist, please contact the smart­
              montools developers.]

       -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:

              help - Prints (to STDOUT) a list of all valid argu­
              ments to this option, then exits.

              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'.

              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

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

              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  emer­
              gency  unload  is equivalent to that created by one
              hundred normal unloads.

              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).

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

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

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

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

              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

              N,raw8 - Print the Raw value of Attribute N as  six
              8-bit  unsigned base-10 integers.  This may be use­
              ful 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

              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
              Modifies the behavior of smartctl to compensate for
              some known and understood device firmware bug.  The
              valid arguments to this option are:

              none Assume that the device firmware obeys the  ATA
              specifications.  This is the default.

              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
              smartctl 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 num­
              bers of ATA errors reported in the ATA  erorr  log;
              (3) strange and impossible values for the ATA error
              log timestamps.

       -P TYPE, --presets=TYPE
              Specifies whether smartctl should  use  any  preset
              options  that  are  available  for  this  drive. By
              default, if the drive is recognized in  the  smart­
              montools database, then the presets are used.

              smartctl  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  smartctl  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 smartctl com­
              mand line.

              The argument show will show any preset options  for
              your  drive  and the argument showall will show all
              known drives in the smartmontools  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
              smartctl to display  correct  values)  then  please
              contact  the  smartmontools developers so that this
              information  can  be  added  to  the  smartmontools
              database.   Contact  information  is  at the end of
              this man page.

              The valid arguments to this option are:


       -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,  con­
              veyance)  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:

              offline - runs SMART Immediate Offline Test.   This
              immediately  starts the test described above.  This
              command can be given during  normal  system  opera­
              tion.  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

              If  the  '-c'  option  to  smartctl  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  smartctl.   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.

              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 nor­
              mal 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 electri­
              cal 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.

              Note that this command can be given  during  normal
              system  operation (unless run in captive mode - see
              the '-C' option below).

       -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'

              WARNING: 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!

       -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.


       smartctl -a /dev/hda
       Print  all  SMART  information for drive /dev/hda (Primary

       smartctl -s off /dev/hdd
       Disable SMART on drive /dev/hdd (Secondary Slave).

       smartctl --smart=on --offlineauto=on --saveauto=on /dev/hda
       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  sys­
       tem's init files.  You can issue this command on a running

       smartctl -t long /dev/hdc
       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  self­
       test' option after it has completed.

       smartctl -s on -t offline /dev/hda
       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
       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.

       smartctl -a -d 3ware,0 /dev/sda
       Examine all SMART data for the first ATA disk connected to
       a 3ware RAID controller card.

       smartctl -t short -d 3ware,3 /dev/sdb
       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.


       The  return  values  of smartctl are defined by a bitmask.
       For the moment this only works on ATA disks.  The  differ­
       ent bits in the return value are as follows:

       Bit 0: Command line did not parse.

       Bit 1: Device  open  failed,  or  device did not return an
              IDENTIFY DEVICE structure.

       Bit 2: Some SMART command to the disk failed, or there was
              a  checksum  error  in  a SMART data structure (see
              '-b' option above).

       Bit 3: SMART status check returned "DISK FAILING".

       Bit 4: SMART status check returned "DISK OK" but we  found
              prefail Attributes <= threshold.

       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.

       Bit 6: The device error log contains records of errors.

       Bit 7: The   device  self-test  log  contains  records  of

              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
              smartstat=$(($? & 8))
              This  looks  at only at bit 3 of the exit status $?
              (since 8=2^3).  The shell variable $smartstat  will
              be  nonzero  if  SMART  status check returned 'disk
              failing' and zero otherwise.


       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. http://ssrc.soe.ucsc.edu/ .


       Please see the following web  site  for  updates,  further
       documentation, bug reports and patches:


       smartd (8)


       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  smartmontools utilities provide
       access to.  You can find Revision 1 of  this  document  at
       http://www.t13.org/project/d1321r1c.pdf .

       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
       http://www.t13.org/#FTP_site .

       The functioning of SMART was  originally  defined  by  the
       SFF-8035i revision 2 and the SFF-8055i revision 1.4 speci­
       fications.  These are publications of the Small Form  Fac­
       tors  (SFF)  Committee.   Links  to these documents may be
       found in the References section of the smartmontools  home
       page at http://smartmontools.sourceforge.net/ .


       $Id:  smartctl.8,v 1.84 2003/08/20 06:00:16 pervalidus Exp

smartmontools-5.1  $Date: 2003/08/20 06:00:16 $       SMARTCTL(8)
Help us cut cost by not downloading the whole site!
Use of automated download sofware ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and therefore is expressedly prohibited. For more details on this, take a look here



Security Code
Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!

Amazon Wish List

Did You Know?
You can choose larger fonts by selecting a different themes.


Tell a Friend About Us

Bookmark and Share

Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.08 Seconds