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

 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

Glossary
MoreInfo
Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
FAQ
Copyright Info
Terms of Use
Privacy Info
Disclaimer
WorkBoard
Thanks
Donations
Advertising
Masthead / Impressum
Your Account

Communication
Feedback
Forums
Private Messages
Surveys

Features
HOWTOs
News Archive
Submit News
Topics
User Articles
Web Links

Google
Google


The Web
linux-tutorial.info

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

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

  

smartd



SYNOPSIS

       smartd [options]


DESCRIPTION

       smartd  is  a  daemon  that  monitors 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
       smartd  is  compatible  with ATA/ATAPI-5 and earlier stan­
       dards (see REFERENCES below)

       smartd will attempt to  enable  SMART  monitoring  on  ATA
       devices  (equivalent  to  smartctl -s on ) and polls these
       and SCSI devices every 30 minutes (configurable),  logging
       SMART  errors and changes of SMART Attributes via the SYS­
       LOG interface.  The  default  location  for  these  SYSLOG
       notifications and warnings is /var/log/messages.

       If  you  send  a USR1 signal to smartd it will immediately
       check the status of the disks, and then return to  polling
       the  disks every 30 minutes. See the '-i' option below for
       additional details.

       smartd can be configured at start-up using the  configura­
       tion  file /etc/smartd.conf.  If the configuration file is
       subsequently modified, smartd can be told to  re-read  the
       configuration file by sending it a HUP signal, for example
       with the command:
       killall -HUP smartd.
       On startup, if smartd finds a syntax error in the configu­
       ration file, it will print an error message and then exit.
       However if smartd is already running, then is told with  a
       HUP  signal  to  re-read  the configuration file, and then
       find a syntax error in this file, it will print  an  error
       message  and  then  continue, ignoring the contents of the
       (faulty) configuration file, as  if  the  HUP  signal  had
       never been received.

       When  smartd  is  running  in  debug mode, the QUIT signal
       (normally  generated  from  a  shell  with  CONTROL-C)  is
       treated  in  the same way as a HUP signal: it makes smartd
       reload its configuration file. To  kill  smartd  use  CON­
       TROL-\.

       On  startup,  in  the  absence  of  the configuration file
       /etc/smartd.conf, the smartd daemon first  scans  for  all
       devices that support SMART, using /dev/hd[a-l] for IDE/ATA
       devices, and /dev/sd[a-z] for SCSI devices. It then  moni­
       tors  for  all possible SMART errors (corresponding to the
       -d, --debug
              Runs smartd in "debug" mode. In this mode, it  dis­
              plays status information to STDOUT rather than log­
              ging it in SYSLOG and does not  fork(2).   It  also
              prints  more  verbose  information about what it is
              doing than when operating in "daemon" mode. In this
              mode,  the  QUIT  signal (normally generated from a
              terminal with CONTROL-C) makes  smartd  reload  its
              configuration file.  Use CONTROL-\ to quit.

       -D, --showdirectives
              Prints  a  list  (to  STDOUT)  of  all the possible
              Directives which may appear  in  the  configuration
              file   /etc/smartd.conf,  and  then  exits.   These
              Directives are also described  later  in  this  man
              page.  They  may  appear  in the configuration file
              following the device name.

       -h, --help, --usage
              Prints usage message to STDOUT and exits.

       -i N, --interval=N
              Sets the interval between disk checks to N seconds,
              where  N is a decimal integer.  The minimum allowed
              value is ten and the maximum is the  largest  posi­
              tive integer that can be represented on your system
              (often 2^31-1).  The default is 1800 seconds.

              Note that the superuser can make smartd  check  the
              status  of  the disks at any time by sending it the
              SIGUSR1 signal, for example with the command:
              kill -SIGUSR1 <pid>
              where <pid> is the process  id  number  of  smartd.
              One may also use:
              killall -USR1 smartd
              for the same purpose.

       -p NAME, --pidfile=NAME
              Writes  pidfile  NAME containing the smartd Process
              ID number (PID).  To  avoid  symlink  attacks  make
              sure  the  directory to which pidfile is written is
              only writeable for root.  Without this  option,  or
              if  the  --debug  option  is  given, no PID file is
              written on startup.  If smartd  is  killed  with  a
              maskable signal then the pidfile is removed.

       -q WHEN, --quit=WHEN
              Specifies  when,  if ever, smartd should exit.  The
              valid arguments are to this option are:

              nodev - Exit if there are no devices to monitor, or
              if  any errors are found at startup in the configu­
              ments). In this mode, even if there are no  devices
              to   monitor,   or   if   the   configuration  file
              /etc/smartd.conf has errors, smartd  will  continue
              to  run, waiting to load a configuration file list­
              ing valid devices.

              onecheck - Start smartd in debug mode, then  regis­
              ter devices, then check device's SMART status once,
              and then exit with zero exit status if all of these
              steps worked correctly.

              This  last  option  is  intended for ´distribution-
              writers´ who want to create  automated  scripts  to
              determine  whether or not to automatically start up
              smartd  after  installing   smartmontools.    After
              starting  smartd with this command-line option, the
              distribution's install scripts should wait  a  rea­
              sonable  length  of  time  (say  ten  seconds).  If
              smartd has not exited  with  zero  status  by  that
              time,  the  script  should send smartd a SIGTERM or
              SIGKILL and assume that  smartd  will  not  operate
              correctly on the host.  Conversely, if smartd exits
              with zero status, then it is safe to run smartd  in
              normal  daemon mode. If smartd is unable to monitor
              any devices or encounters other  problems  then  it
              will return with non-zero exit status.

       -r TYPE, --report=TYPE
              Intended primarily to help smartmontools developers
              understand the behavior of  smartmontools  on  non-
              conforming  or  poorly  conforming  hardware.  This
              option reports details of smartd 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.  Whe used
              more than once, the detail of these ioctl()  trans­
              actions  are reported in greater detail.  The valid
              arguments to this option are:

              ioctl - report all ioctl() transactions.

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

              scsiioctl  -  report only ioctl() transactions with
              SCSI devices.

              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

       run  smartd.   Entries  are  logged  to SYSLOG (by default
       /var/log/messages.)

       smartd -d -i 30
       Run in foreground (debug) mode, checking the  disk  status
       every 30 seconds.

       smartd -q onecheck
       Registers  devices,  and  checks the status of the devices
       exactly once. The exit status (the bash $?  variable) will
       be  zero  if all went well, and nonzero if no devices were
       detected or some other problem was encountered.

       Note that smartmontools  provides  a  start-up  script  in
       /etc/init.d/smartd  which  is responsible for starting and
       stopping the daemon via the normal init interface.   Using
       this script, you can start smartd by giving the command:
       /usr/sbin/rcsmartd start
       and stop it by using the command:
       /usr/sbin/rcsmartd stop

       If  you want smartd to start running whenever your machine
       is booted, this can be enabled by YaST Runlevel Editor  or
       by using the command:
       /sbin/chkconfig --add smartd
       and disabled using the command:
       /sbin/chkconfig --del smartd


CONFIGURATION FILE /etc/smartd.conf

       In the absence of a configuration file, smartd will try to
       open the 12 ATA  devices  /dev/hd[a-l]  and  the  26  SCSI
       devices /dev/sd[a-z].  This can be annoying if you have an
       ATA or SCSI device that hangs or misbehaves when receiving
       SMART  commands.  Even if this causes no problems, you may
       be annoyed by the  string  of  error  log  messages  about
       block-major  devices that can't be found, and SCSI devices
       that can't be opened.

       One can avoid this problem, and gain more control over the
       types of events monitored by smartd, by using the configu­
       ration file /etc/smartd.conf.  This file contains  a  list
       of devices to monitor, with one device per line.  An exam­
       ple file is included with the smartmontools  distribution.
       You   will   find   this   sample  configuration  file  in
       /usr/share/doc/packages/smartmontools/. For security,  the
       configuration  file  should  not be writable by anyone but
       root. The syntax of the file is as follows:

              There  should  be  one  device  listed  per   line,

       without reading to  the  end  of  the  DIRECTIVES  Section
       below!

       ################################################
       # This is an example smartd startup config
       # file /etc/smartd.conf for monitoring three
       # ATA disks and two SCSI disks.
       #
       # First ATA disk on each of two interfaces:
       #
         /dev/hda -a -m admin@yoyodyne.com,root@localhost
         /dev/hdc -a -I 194 -I 5 -i 12
       #
       # SCSI disks. Send a TEST warning email to admin on
       # startup.
       #
         /dev/sda
         /dev/sdc -m admin@yoyodyne.com -M test
       #
       # Strange device. It's SCSI:
       #
         /dev/weird -d scsi
       #
       # Three ATA disks connected to a 3ware controller
       #
         /dev/sdb -d 3ware,0 -a
         /dev/sdb -d 3ware,1 -a
         /dev/sdb -d 3ware,2 -a
       #
       # The following line enables monitoring of the
       # ATA Error Log and the Self-Test Error Log.
       # It also tracks changes in both Prefailure
       # and Usage Attributes, apart from Attributes
       # 9, 194, and 231, and shows continued lines:
       #
         /dev/hdd -l error \
                  -l selftest \
                  -t \      # Attributes not tracked:
                  -I 194 \  # temperature
                  -I 231 \  # also temperature
                  -I 9      # power-on hours
       #
       ################################################


CONFIGURATION FILE DIRECTIVES

       If  the  first non-comment entry in the configuration file
       is the text string DEVICESCAN  in  capital  letters,  then
       smartd  will  ignore any remaining lines in the configura­
       tion file, and will  scan  for  devices.   DEVICESCAN  may
       optionally  be  followed  by Directives that will apply to

       If a SCSI disk is listed, it will be monitored at the only
       implemented level: roughly equivalent to  using  the  '-H'
       option  for  an  ATA disk.  So with the exception of ´-d´,
       ´-m´, and ´-M´, the Directives below are ignored for  SCSI
       disks.  For SCSI disks, the ´-m´ Directive sends a warning
       email if the SMART status  indicates  a  disk  failure  or
       problem, or if the SCSI inquiry about disk status fails.

       If  a 3ware controller is used then the corresponding SCSI
       device must be listed, along with the ´-d 3ware,N´  Direc­
       tive  (see below).  The individual ATA disks hosted by the
       3ware controller appear to smartd as normal  ATA  devices.
       Hence  all  the ATA directives can be used for these disks
       (but see note below).

       -d TYPE
              Specifies the type of the device.   This  Directive
              may  be used multiple times for one device, but the
              arguments ata,  scsi,  and  3ware,N  are  mutually-
              exclusive.  If  more  than one is given then smartd
              will use the last one which appears.

              If none of these three  arguments  is  given,  then
              smartd  will first attempt to guess the device type
              by looking at whether the sixth  character  in  the
              device  name  is  an 's' or an 'h'.  This will work
              for device names like  /dev/hda  or  /dev/sdb,  and
              corresponds  to  choosing ata or scsi respectively.
              If smartd can't guess from  this  sixth  character,
              then  it will simply try to access the device using
              first ATA and then SCSI ioctl()s.

              The valid arguments to this Directive are:

              ata - the device type is ATA.  This prevents smartd
              from issuing SCSI commands to an ATA device.

              scsi  -  the  device  type  is SCSI.  This prevents
              smartd from issuing ATA commands to a SCSI  device.

              3ware,N  -  the  device consists of one or more ATA
              disks connected to a  3ware  RAID  controller.  The
              non-negative  integer  N (in the range from 0 to 15
              inclusive) denotes which disk on the controller  is
              monitored.

              This  Directive  may  at  first  appear  confusing,
              because the 3ware controller is a SCSI device (such
              as  /dev/sda)  and  should be listed as such in the
              the  configuration  file.   However  when  the  ´-d
              instructions.

              removable  -  the device or its media is removable.
              This indicates to smartd that  it  should  continue
              (instead of exiting, which is the default behavior)
              if the device does not appear to  be  present  when
              smartd  is  started.  This Directive may be used in
              conjunction with the other ´-d´ Directives.

       -T TYPE
              Specifies how tolerant smartd should  be  of  SMART
              command  failures.   The  valid  arguments  to this
              Directive are:

              normal - do not try to monitor the disk if a manda­
              tory  SMART  command  fails,  but  continue  if  an
              optional SMART command fails.  This is the default.

              permissive  -  try  to  monitor the disk even if it
              appears to lack SMART capabilities.   This  may  be
              required  for  some old disks (prior to ATA-3 revi­
              sion 4) that implemented  SMART  before  the  SMART
              standards  were  incorporated  into  the  ATA/ATAPI
              Specifications.

              [Please see the smartctl -T command-line option.]

       -o VALUE
              Enables or disables SMART Automatic Offline Testing
              when  smartd  starts  up and has no further effect.
              The valid arguments to this Directive  are  on  and
              off.

              The  delay between tests is vendor-specific, but is
              typically four hours.

              Note that SMART Automatic Offline  Testing  is  not
              part  of  the  ATA  Specification.   Please see the
              smartctl -o command-line option  documentation  for
              further information about this feature.

       -S VALUE
              Enables  or disables Attribute Autosave when smartd
              starts up and has no  further  effect.   The  valid
              arguments   to  this  Directive  are  on  and  off.
              [Please see the smartctl -S command-line option.]

       -H     Check the SMART health status of the disk.  If  any
              Prefailure  Attributes  are  less  than or equal to
              their threshold values, then disk failure  is  pre­
              dicted in less than 24 hours, and a message at pri­
              ority 'CRITICAL' will be logged to syslog.  [Please
              only be logged if you run self-tests  on  the  disk
              (and  it fails the tests!).  [Self-Tests can be run
              by using the '-t short' and  '-t long'  options  of
              smartctl  and  the  results  of  the testing can be
              observed using the smartctl '-l selftest'  command-
              line option.]

              [Please see the smartctl -l command-line option.]

       -f     Check  for  'failure'  of any Usage Attributes.  If
              these Attributes are less  than  or  equal  to  the
              threshold, it does NOT indicate imminent disk fail­
              ure.  It "indicates an advisory condition where the
              usage  or  age  of  the  device  has  exceeded  its
              intended  design  life  period."  [Please  see  the
              smartctl -A command-line option.]

       -m ADD Send  a  warning  email to the email address ADD if
              the '-H', '-l', or '-f' Directives detect a failure
              or  a  new error, or if a SMART command to the disk
              fails. This Directive  only  works  in  conjunction
              with these other Directives (or with the equivalent
              default '-a' Directive).

              To prevent your email in-box from getting filled up
              with  warning  messages,  by  default only a single
              warning will be sent for each of the  enabled  test
              types,  '-H',  '-l', or '-f', even if more than one
              failure or error is detected or if the  failure  or
              error  persists.   [This  behavior can be modified;
              see the '-M' Directive below.]

              To send email to more than one user, please use the
              following  "comma  separated" form for the address:
              user1@add1,user2@add2,...,userN@addN    (with    no
              spaces).

              To test that email is being sent correctly, use the
              '-M test' Directive described  below  to  send  one
              test email message on smartd startup.

              By  default,  email  is  sent using the system mail
              command.  In order that smartd find the  mail  com­
              mand   (normally  /bin/mail)  an  executable  named
              'mail' must be in the path of the shell or environ­
              ment from which smartd was started.  If you wish to
              specify an explicit path  to  the  mail  executable
              (for   example  /usr/local/bin/mail)  or  a  custom
              script to run, please use the '-M  exec'  Directive
              below.

              ing  -M  Directives  are given (example: -M once -M
              daily) then the  final  one  (in  the  example,  -M
              daily) is used.

              The valid arguments to the -M Directive are:

              once - send only one warning email for each type of
              disk problem detected.  This is the default.

              daily - send additional  warning  reminder  emails,
              once  per  day,  for  each  type  of  disk  problem
              detected.

              diminishing  -  send  additional  warning  reminder
              emails,  after  a  one-day interval, then a two-day
              interval, then a four-day interval, and so  on  for
              each  type  of disk problem detected. Each interval
              is twice as long as the previous interval.

              test - send a single test  email  immediately  upon
              smartd  startup.   This  allows  one to verify that
              email is delivered correctly.

              exec PATH - run the executable PATH instead of  the
              default  mail  command,  when  smartd needs to send
              email.  PATH must point  to  an  executable  binary
              file or script.

              By  setting  PATH  to point to a customized script,
              you can make smartd perform useful  tricks  when  a
              disk  problem  is  detected  (beeping  the console,
              shutting down the machine, broadcasting warnings to
              all  logged-in users, etc.)  But please be careful.
              smartd  will  block  until  the   executable   PATH
              returns,  so  if your executable hangs, then smartd
              will also hang.  Some sample scripts  are  included
              in   /usr/share/doc/packages/smartmontools/example­
              scripts/.

              The return status of the executable is recorded  by
              smartd  in  SYSLOG, but the executable's STDOUT and
              STDERR are directed to /dev/null, so if you wish to
              leave some other record behind, the executable must
              send mail or write to a file or device.

              Before running the executable, smartd sets a number
              of  environment variables.  These environment vari­
              ables may  be  used  to  control  the  executable's
              behavior.   The  environment  variables exported by
              smartd are:
              SMARTD_MAILER is set to the argument of -M exec, if
              present  or  else  to  'mail' (examples: /bin/mail,
              probably enclose it in double quotes.
              SMARTD_FAILTYPE gives the reason for the warning or
              message email.  The possible values that it  takes,
              and  their significance, are: emailtest (this is an
              email test message); health (the SMART health  sta­
              tus  indicates  imminent  failure);  usage (a usage
              Attribute has  failed);  selftest  (the  number  of
              self-test  failures has increased); errorcount (the
              number  of  errors  in  the  ATA  error   log   has
              increased);  FAILEDhealthcheck  (the  SMART  health
              status command  failed);  FAILEDreadsmartdata  (the
              command  to  read  SMART  Attribute  data  failed);
              FAILEDreadsmarterrorlog (the command  to  read  the
              SMART error log failed); FAILEDreadsmartsefltestlog
              (the  command  to  read  the  SMART  self-test  log
              failed);  abd  FAILEDopendevice (the open() command
              to the device failed).
              SMARTD_ADDRESS is set to the address  argument  ADD
              of  the  '-m'  Directive, unless ADD is <nomailer>.
              This is a comma-delineated list of email  addresses
              (example: admin@yoyodyne.com).
              SMARTD_MESSAGE  is set to the warning email message
              string from smartd.  This message  string  contains
              space  characters  and  is  NOT  quoted.  So to use
              $SMARTD_MESSAGE in a bash script you should  proba­
              bly enclose it in double quotes.
              SMARTD_TFIRST  is a text string giving the time and
              date at which the first problem of  this  type  was
              reported.  This  text string contains space charac­
              ters and no newlines, and is NOT quoted. For  exam­
              ple:
              Sun Feb  9 14:58:19 2003 CST
              SMARTD_TFIRSTEPOCH is an integer, which is the unix
              epoch (number of seconds since  Jan  1,  1970)  for
              SMARTD_TFIRST.

              The  shell  which  is  used  to run PATH is system-
              dependent. For vanilla linux/glibc it's  bash.  For
              other  systems,  the man page for system (3) should
              say what shell is used.

              If the '-m ADD' Directive is given  with  a  normal
              address argument, then the executable pointed to by
              PATH will be run in a shell  with  STDIN  receiving
              the  body  of  the email message, and with the same
              command-line arguments:
              -s "$SMARTD_SUBJECT" $SMARTD_ADDRESS
              that would normally be provided to  'mail'.   Exam­
              ples include:
              -m user@home -M exec /bin/mail
              -m admin@work -M exec /usr/local/bin/mailto
              -m root -M exec /Example_1/bash/script/below
              its value since the last  check,  30  minutes  ago.
              [Please see the smartctl -A command-line option.]

       -u     Report  anytime  that a Usage Attribute has changed
              its value since the last  check,  30  minutes  ago.
              [Please see the smartctl -A command-line option.]

       -t     Equivalent  to  turning  on  the two previous flags
              '-p'  and  '-u'.   Tracks  changes  in  all  device
              Attributes (both Prefailure and Usage). [Please see
              the smartctl -A command-line option.]

       -i ID  Ignore device Attribute number ID when checking for
              failure  of Usage Attributes.  ID must be a decimal
              integer in the range from 1 to 255.  This Directive
              modifies the behavior of the '-f' Directive and has
              no effect without it.

              This is useful, for example, if you have a very old
              disk  and don't want to keep getting messages about
              the hours-on-lifetime Attribute (usually  Attribute
              9)  failing.   This  Directive  may appear multiple
              times for a single device, if you  want  to  ignore
              multiple Attributes.

       -I ID  Ignore device Attribute ID when tracking changes in
              the Attribute values.  ID must be a decimal integer
              in  the  range from 1 to 255.  This Directive modi­
              fies the behavior  of  the  '-p',  '-u',  and  '-t'
              tracking  Directives  and has no effect without one
              of them.

              This is useful, for example, if one of  the  device
              Attributes   is   the   disk  temperature  (usually
              Attribute 194 or 231). It's annoying to get reports
              each  time the temperature changes.  This Directive
              may appear multiple times for a single  device,  if
              you want to ignore multiple Attributes.

       -r ID  When tracking, report the Raw value of Attribute ID
              along  with  its  (normally  reported)   Normalized
              value.   ID  must be a decimal integer in the range
              from 1 to 255.  This Directive modifies the  behav­
              ior of the '-p', '-u', and '-t' tracking Directives
              and has no effect without one of them.  This Direc­
              tive may be given multiple times.

              A  common  use  of  this  Directive is to track the
              device Temperature (often ID=194 or 231).

       -R ID  When tracking, report whenever  the  Raw  value  of
              also useful for understanding how  different  types
              of  system  behavior  affects the values of certain
              Attributes.

       -F TYPE, --firmwarebug=TYPE
              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  error  log;
              (3) strange and impossible values for the ATA error
              log timestamps.

              [Please see the smartctl -F command-line option.]

       -v N,OPTION
              Modifies the labeling for Attribute  N,  for  disks
              which use non-standard Attribute definitions.  This
              is useful in connection with the  Attribute  track­
              ing/reporting Directives.

              This  Directive  may  appear  multiple times. Valid
              arguments to this Directive are:

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

              9,halfminutes - Raw Attribute number 9 is  power-on
              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) Directive.

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

              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  exam­
              ple)  '123,raw16'  only  prints  the  Raw value for
              Attribute 123 in this form.

              N,raw48 - Print the Raw value of Attribute N  as  a
              drive.  This is the default.

              ignore - do not use any presets for this drive.

              show  -  show  the presets listed for this drive in
              the database.

              showall - show the presets that are  available  for
              all drives and then exit.

              [Please see the smartctl -P command-line option.]

       -a     Equivalent  to  turning  on  all  of  the following
              Directives: '-H' to check the SMART health  status,
              '-f'  to report failures of Usage (rather than Pre­
              fail) Attributes, '-t' to  track  changes  in  both
              Prefailure  and  Usage Attributes, '-l selftest' to
              report increases in the  number  of  Self-Test  Log
              errors,  and  '-l error' to report increases in the
              number of ATA errors.

              Note that -a is the default for  ATA  devices.   If
              none of these other Directives is given, then -a is
              assumed.

       #      Comment: ignore the remainder of the line.

       \      Continuation character: if this is  the  last  non-
              white  or non-comment character on a line, then the
              following line is a  continuation  of  the  current
              one.

       If  you  are  not  sure which Directives to use, I suggest
       experimenting for a few minutes with smartctl to see  what
       SMART  functionality  your  disk(s) support(s).  If you do
       not like voluminous syslog  messages,  a  good  choice  of
       smartd configuration file Directives might be:
       -H -l selftest -l error -f.
       If you want more frequent information, use: -a.

       ADDITIONAL DETAILS ABOUT DEVICESCAN
              If the first non-comment entry in the configuration
              file is the text string DEVICESCAN in capital  let­
              ters,  then  smartd will ignore any remaining lines
              in  the  configuration  file,  and  will  scan  for
              devices.

              If  DEVICESCAN  is  not followed by any Directives,
              then  smartd  will  scan  for  both  ATA  and  SCSI
              will  do  the  same,  but  only  monitors the SMART
              health status of  the  devices,  (rather  than  the
              default -a, which monitors all SMART properties).

       EXAMPLES OF SHELL SCRIPTS FOR '-M exec'
              These are two examples of shell scripts that can be
              used with the '-M exec  PATH'  Directive  described
              previously.  The paths to these scripts and similar
              executables is the PATH argument to  the  '-M  exec
              PATH' Directive.

              Example  1: This script is for use with '-m ADDRESS
              -M exec PATH'.  It appends the output  of  smartctl
              -a  to  the output of the smartd email warning mes­
              sage and sends it to ADDRESS.

              #! /bin/bash

              # Save the email message (STDIN) to a file:
              cat > /root/msg
               "
              # Append the output of smartctl -a to the message:
              /usr/sbin/smartctl -a -d $SMART_DEVICETYPE $SMARTD_DEVICE >> /root/msg

              # Now email the message to the user at address ADD:
              /bin/mail -s "$SMARTD_SUBJECT" $SMARTD_ADDRESS < /root/msg

              Example  2:  This  script  is  for  use  with   '-m
              <nomailer>  -M exec PATH'. It warns all users about
              a disk problem, waits 30 seconds, and  then  powers
              down the machine.

              #! /bin/bash

              # Warn all users of a problem
              wall 'Problem detected with disk: ' "$SMARTD_DEVICESTRING"
              wall 'Warning message from smartd is: ' "$SMARTD_MESSAGE"
              wall 'Shutting down machine in 30 seconds... '

              # Wait half a minute
              sleep 30

              # Power down the machine
              /sbin/shutdown -hf now

              Some  example  scripts  are  distributed  with  the
              smartmontools  package,   in   /usr/share/doc/pack­
              ages/smartmontools/examplescripts/.

              Please  note  that  these  scripts typically run as
              root, so any files that they read/write should  not

       in this case is about 22  Celsius).   The  '-R'  and  '-r'
       Directives  modify  this behavior, so that the information
       is printed with the Raw values as well, for example:
       'Device: /dev/hda, SMART Attribute: 194 Temperature_Celsius changed from 94 [Raw 22] to 93 [Raw 23]'
       Here the Raw values are the actual  disk  temperatures  in
       Celsius.  The way in which the Raw values are printed, and
       the names under which the Attributes are reported, is gov­
       erned  by  the  various  ´-v  Num,Description'  Directives
       described previously.

       Please see the smartctl manual page for  further  explana­
       tion   of  the  differences  between  Normalized  and  Raw
       Attribute values.

       smartd will make log entries at  loglevel  LOG_CRIT  if  a
       SMART Attribute has failed, for example:
       'Device: /dev/hdc, Failed SMART Attribute: 5 Reallocated_Sector_Ct'
        This  loglevel is used for reporting enabled by the '-H',
       -f', '-l selftest',  and  '-l error'  Directives.  Entries
       reporting  failure  of  SMART Prefailure Attributes should
       not be ignored: they mean that the disk is  failing.   Use
       the smartctl utility to investigate.


RETURN VALUES

       The return value (exit status) of smartd can have the fol­
       lowing values:

       0:     Daemon startup successful, or smartd was killed  by
              a SIGTERM (or in debug mode, a SIGQUIT).

       1:     Commandline did not parse.

       2:     There    was   a   problem   opening   or   parsing
              /etc/smartd.conf.

       3:     Forking the daemon failed.

       4:     Couldn't create PID file.

       8:     smartd ran out of memory during startup.

       9:     A compile time constant of smartd  was  too  small.
              This can be caused by an excessive number of disks,
              or by lines in  /etc/smartd.conf that are too long.
              Please  report  this problem to  smartmontools-sup­
              port@lists.sourceforge.net.

       10     An inconsistency was  found  in  smartd's  internal
              data structures. This should never happen.  It must
              be due to either a coding or compiler bug.   Please
              report    such   failures   to   smartmontools-sup­

       132 and above
              smartd was killed by a signal that is  not  explic­
              itly  listed  above.   The  exit status is then 128
              plus the signal number.  For example if  smartd  is
              killed  by  SIGKILL (signal 9) then the exit status
              is 137.


AUTHOR

       Bruce Allen smartmontools-support@lists.sourceforge.net
       University of Wisconsin - Milwaukee Physics Department


CREDITS

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


HOME PAGE FOR SMARTMONTOOLS:

       Please  see  the  following  web site for updates, further
       documentation, bug reports and patches:
       http://smartmontools.sourceforge.net/


SEE ALSO:

       smartd.conf (5), smartctl (8), syslogd (8)


REFERENCES FOR SMART

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

Login
Nickname

Password

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 help in many different ways.


Friends



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