1SMARTD.CONF(5)              SMART Monitoring Tools              SMARTD.CONF(5)
2
3
4

NAME

6       smartd.conf - SMART Disk Monitoring Daemon Configuration File
7
8

DESCRIPTION

10       [This man page is generated for the Linux version of smartmontools.  It
11       does not contain info specific to other platforms.]
12
13       /etc/smartmontools/smartd.conf is the configuration file for the smartd
14       daemon.
15
16       If  the  configuration  file /etc/smartmontools/smartd.conf is present,
17       smartd reads it at startup, before fork(2)ing into the  background.  If
18       smartd  subsequently  receives  a  HUP signal, it will then re-read the
19       configuration file.  If smartd is running in debug mode,  then  an  INT
20       signal  will  also  make it re-read the configuration file. This signal
21       can be generated by typing <CONTROL-C> in  the  terminal  window  where
22       smartd is running.
23
24       In  the  absence  of  a  configuration file smartd will try to open all
25       available devices (see smartd(8) man page).  A configuration file  with
26       a single line ´DEVICESCAN -a' would have the same effect.
27
28       This  can  be  annoying if you have an ATA or SCSI device that hangs or
29       misbehaves when receiving SMART commands.  Even if this causes no prob‐
30       lems,  you  may  be  annoyed  by the string of error log messages about
31       devices that can´t be opened.
32
33       One can avoid this problem, and gain more control  over  the  types  of
34       events monitored by smartd, by using the configuration file /etc/smart‐
35       montools/smartd.conf.  This file contains a list of devices to monitor,
36       with  one device per line.  An example file is included with the smart‐
37       montools distribution. You will find this sample configuration file  in
38       /usr/share/doc/smartmontools/.  For  security,  the  configuration file
39       should not be writable by anyone but root. The syntax of the file is as
40       follows:
41
42       ·   There  should  be one device listed per line, although you may have
43           lines that are entirely comments or white space.
44
45       ·   Any text following a hash sign ´#´ and up to the end of the line is
46           taken to be a comment, and ignored.
47
48       ·   Lines  may  be  continued by using a backslash ´\´ as the last non-
49           whitespace or non-comment item on a line.
50
51       ·   Note: a line whose first character is a hash sign ´#´ is treated as
52           a  white-space blank line, not as a non-existent line, and will end
53           a continuation line.
54
55       Here is an example configuration file.  It´s for illustrative  purposes
56       only;  please don´t copy it onto your system without reading to the end
57       of the DIRECTIVES Section below!
58
59       ################################################
60       # This is an example smartd startup config file
61       # /etc/smartmontools/smartd.conf
62       #
63       # On the second disk, start a long self-test every
64       # Sunday between 3 and 4 am.
65       #
66         /dev/sda -a -m admin@example.com,root@localhost
67         /dev/sdb -a -I 194 -I 5 -i 12 -s L/../../7/03
68       #
69       # Send a TEST warning email to admin on startup.
70       #
71         /dev/sdc -m admin@example.com -M test
72       #
73       # Strange device. It´s SCSI. Start a scheduled
74       # long self test between 5 and 6 am Monday/Thursday
75         /dev/weird -d scsi -s L/../../(1|4)/05
76       #
77       # An ATA disk may appear as a SCSI device to the
78       # OS. If a SCSI to ATA Translation (SAT) layer
79       # is between the OS and the device then this can be
80       # flagged with the '-d sat' option. This situation
81       # may become common with SATA disks in SAS and FC
82       # environments.
83         /dev/sda -a -d sat
84       #
85       # Three disks connected to a MegaRAID controller
86       # Start short self-tests daily between 1-2, 2-3, and
87       # 3-4 am.
88         /dev/sda -d megaraid,0 -a -s S/../.././01
89         /dev/sda -d megaraid,1 -a -s S/../.././02
90         /dev/sda -d megaraid,2 -a -s S/../.././03
91         /dev/bus/0 -d megaraid,2 -a -s S/../.././03
92       #
93       # Three disks connected to an AacRaid controller
94       # Start short self-tests daily between 1-2, 2-3, and
95       # 3-4 am.
96         /dev/sda -d aacraid,0,0,66 -a -s S/../.././01
97         /dev/sda -d aacraid,0,0,67 -a -s S/../.././02
98         /dev/sda -d aacraid,0,0,68 -a -s S/../.././03
99       #
100       # Four ATA disks on a 3ware 6/7/8000 controller.
101       # Start short self-tests daily between midnight and 1am,
102       # 1-2, 2-3, and 3-4 am. Starting with the Linux 2.6
103       # kernel series, /dev/sdX is deprecated in favor of
104       # /dev/tweN. For example replace /dev/sdc by /dev/twe0
105       # and /dev/sdd by /dev/twe1.
106         /dev/sdc -d 3ware,0 -a -s S/../.././00
107         /dev/sdc -d 3ware,1 -a -s S/../.././01
108         /dev/sdd -d 3ware,2 -a -s S/../.././02
109         /dev/sdd -d 3ware,3 -a -s S/../.././03
110       #
111       # Two ATA disks on a 3ware 9000 controller.
112       # Start long self-tests Sundays between midnight and
113       # 1am and 2-3 am
114         /dev/twa0 -d 3ware,0 -a -s L/../../7/00
115         /dev/twa0 -d 3ware,1 -a -s L/../../7/02
116       #
117       # Two SATA (not SAS) disks on a 3ware 9750 controller.
118       # Start long self-tests Sundays between midnight and
119       # 1am and 2-3 am
120         /dev/twl0 -d 3ware,0 -a -s L/../../7/00
121         /dev/twl0 -d 3ware,1 -a -s L/../../7/02
122       #
123       # Three SATA disks on a HighPoint RocketRAID controller.
124       # Start short self-tests daily between 1-2, 2-3, and
125       # 3-4 am.
126       # under Linux
127         /dev/sde -d hpt,1/1 -a -s S/../.././01
128         /dev/sde -d hpt,1/2 -a -s S/../.././02
129         /dev/sde -d hpt,1/3 -a -s S/../.././03
130       #
131       # Two SATA disks connected to a HighPoint RocketRAID
132       # via a pmport device. Start long self-tests Sundays
133       # between midnight and 1am and 2-3 am.
134       # under Linux
135         /dev/sde -d hpt,1/4/1 -a -s L/../../7/00
136         /dev/sde -d hpt,1/4/2 -a -s L/../../7/02
137       # Three SATA disks connected to an Areca
138       # RAID controller. Start long self-tests Sundays
139       # between midnight and 3 am.
140         /dev/sg2 -d areca,1 -a -s L/../../7/00
141         /dev/sg2 -d areca,2 -a -s L/../../7/01
142         /dev/sg2 -d areca,3 -a -s L/../../7/02
143       #
144       # The following line enables monitoring of the
145       # ATA Error Log and the Self-Test Error Log.
146       # It also tracks changes in both Prefailure
147       # and Usage Attributes, apart from Attributes
148       # 9, 194, and 231, and shows continued lines:
149       #
150         /dev/sdd -l error \
151                  -l selftest \
152                  -t \      # Attributes not tracked:
153                  -I 194 \  # temperature
154                  -I 231 \  # also temperature
155                  -I 9      # power-on hours
156       #
157       ################################################
158
159

CONFIGURATION FILE DIRECTIVES

161       If a non-comment entry in the configuration file  is  the  text  string
162       DEVICESCAN  in  capital  letters, then smartd will ignore any remaining
163       lines in the configuration file, and will scan for devices.  DEVICESCAN
164       may optionally be followed by Directives that will apply to all devices
165       that are found in the scan.  Please see below for additional details.
166
167       If an entry in the configuration file starts with DEFAULT instead of  a
168       device  name, then all directives in this entry are set as defaults for
169       the next device entries.
170
171       This configuration:
172
173         DEFAULT -a -R5! -W 2,40,45 -I 194 -s L/../../7/00 -m admin@example.com
174         /dev/sda
175         /dev/sdb
176         /dev/sdc
177         DEFAULT -H -m admin@example.com
178         /dev/sdd
179         /dev/sde -d removable
180
181       has the same effect as:
182
183         /dev/sda -a -R5! -W 2,40,45 -I 194 -s L/../../7/00 -m admin@example.com
184         /dev/sdb -a -R5! -W 2,40,45 -I 194 -s L/../../7/00 -m admin@example.com
185         /dev/sdc -a -R5! -W 2,40,45 -I 194 -s L/../../7/00 -m admin@example.com
186         /dev/sdd -H -m admin@example.com
187         /dev/sde -d removable -H -m admin@example.com
188
189
190       The following are the Directives that may appear following  the  device
191       name  or  DEVICESCAN  or  DEFAULT  on  any  line  of the /etc/smartmon‐
192       tools/smartd.conf configuration file. Note that these are NOT  command-
193       line options for smartd.  The Directives below may appear in any order,
194       following the device name.
195
196       For an ATA device, if no Directives appear, then  the  device  will  be
197       monitored  as  if the ´-a´ Directive (monitor all SMART properties) had
198       been given.
199
200       If a SCSI disk is listed, it will be monitored at  the  maximum  imple‐
201       mented  level: roughly equivalent to using the ´-H -l selftest´ options
202       for an ATA disk.  So with the exception of ´-d´, ´-m´,  ´-l  selftest´,
203       ´-s´,  and  ´-M´, the Directives below are ignored for SCSI disks.  For
204       SCSI disks, the ´-m´ Directive sends a warning email if the SMART  sta‐
205       tus indicates a disk failure or problem, if the SCSI inquiry about disk
206       status fails, or if new errors appear in the self-test log.
207
208       If a 3ware controller is used then the corresponding SCSI (/dev/sd?) or
209       character device (/dev/twe?, /dev/twa?, /dev/twl? or /dev/tws?) must be
210       listed, along with the ´-d 3ware,N´ Directive (see below).   The  indi‐
211       vidual  ATA  disks  hosted  by the 3ware controller appear to smartd as
212       normal ATA devices.  Hence all the ATA directives can be used for these
213       disks (but see note below).
214
215       If  an  Areca  controller  is  used then the corresponding device (SCSI
216       /dev/sg? on Linux or /dev/arcmsr0 on FreeBSD)  must  be  listed,  along
217       with the ´-d areca,N´ Directive (see below).  The individual SATA disks
218       hosted by the Areca controller appear to smartd as normal ATA  devices.
219       Hence  all  the  ATA  directives  can  be  used for these disks.  Areca
220       firmware version 1.46 or later which  supports  smartmontools  must  be
221       used; Please see the smartctl(8) man page for further details.
222
223       -d TYPE
224              Specifies  the  type of the device.  The valid arguments to this
225              directive are:
226
227              auto - attempt to guess the device type from the device name  or
228              from  controller  type  info provided by the operating system or
229              from a matching USB ID entry in the drive database.  This is the
230              default.
231
232              ata - the device type is ATA.  This prevents smartd from issuing
233              SCSI commands to an ATA device.
234
235              scsi - the device type is SCSI.  This prevents smartd from issu‐
236              ing ATA commands to a SCSI device.
237
238              nvme[,NSID]  -  [FreeBSD,  Linux,  Windows and Cygwin only] [NEW
239              EXPERIMENTAL SMARTD FEATURE] the  device  type  is  NVM  Express
240              (NVMe).   The optional parameter NSID specifies the namespace id
241              (in hex) passed to the driver.  Use 0xffffffff for the broadcast
242              namespace  id.   The  default  for  NSID  is  the  namespace  id
243              addressed by the device name.
244
245              sat[,auto][,N] - the device type  is  SCSI  to  ATA  Translation
246              (SAT).   This  is for ATA disks that have a SCSI to ATA Transla‐
247              tion (SAT) Layer (SATL) between the disk and the operating  sys‐
248              tem.   SAT  defines  two  ATA PASS THROUGH SCSI commands, one 12
249              bytes long and the other 16 bytes long.  The default is  the  16
250              byte  variant which can be overridden with either ´-d sat,12´ or
251              ´-d sat,16´.
252
253              If ´-d sat,auto´ is specified, device  type  SAT  (for  ATA/SATA
254              disks)  is  only  used  if  the SCSI INQUIRY data reports a SATL
255              (VENDOR: "ATA     ").  Otherwise device type SCSI (for  SCSI/SAS
256              disks) is used.
257
258              usbcypress - this device type is for ATA disks that are behind a
259              Cypress USB to PATA bridge.  This will use the ATACB proprietary
260              scsi  pass  through command.  The default SCSI operation code is
261              0x24,  but  although  it  can  be  overridden  with  ´-d  usbcy‐
262              press,0xN´,  where  N is the scsi operation code, you're running
263              the risk of damage to the device or filesystems on it.
264
265              usbjmicron[,p][,x][,PORT] - this device type is for  SATA  disks
266              that  are  behind a JMicron USB to PATA/SATA bridge.  The 48-bit
267              ATA commands (required e.g. for ´-l xerror´, see below)  do  not
268              work  with  all  of  these bridges and are therefore disabled by
269              default.  These commands can be enabled  by  ´-d  usbjmicron,x´.
270              If  two disks are connected to a bridge with two ports, an error
271              message is printed if no PORT is specified.   The  port  can  be
272              specified  by  ´-d usbjmicron[,x],PORT´ where PORT is 0 (master)
273              or 1 (slave).  This is not necessary if the device uses  a  port
274              multiplier  to  connect  multiple  disks to one port.  The disks
275              appear under separate /dev/ice names then.  CAUTION:  Specifying
276              ´,x´  for  a  device  which  does  not support it results in I/O
277              errors and may disconnect the drive.  The same  applies  if  the
278              specified PORT does not exist or is not connected to a disk.
279
280              The Prolific PL2507/3507 USB bridges with older firmware support
281              a pass-through command similar to JMicron and work with ´-d usb‐
282              jmicron,0´.  Newer Prolific firmware requires a modified command
283              which can be selected by ´-d usbjmicron,p´.  Note that this does
284              not yet support the SMART status command.
285
286              usbprolific - [NEW EXPERIMENTAL SMARTD FEATURE] this device type
287              is   for   SATA   disks   that    are    behind    a    Prolific
288              PL2571/2771/2773/2775 USB to SATA bridge.
289
290              usbsunplus  - this device type is for SATA disks that are behind
291              a SunplusIT USB to SATA bridge.
292
293              marvell - [Linux only] interact with SATA disks  behind  Marvell
294              chip-set  controllers  (using  the  Marvell  rather  than libata
295              driver).
296
297              megaraid,N - [Linux only] the device consists  of  one  or  more
298              SCSI/SAS disks connected to a MegaRAID controller.  The non-neg‐
299              ative integer N (in the range of 0  to  127  inclusive)  denotes
300              which  disk on the controller is monitored.  This interface will
301              also work for Dell PERC controllers.  In  log  files  and  email
302              messages  this disk will be identified as megaraid_disk_XXX with
303              XXX in the range from 000 to 127 inclusive.  It is  possible  to
304              set  RAID  device name as /dev/bus/N, where N is a SCSI bus num‐
305              ber.  Please see the smartctl(8) man page for further details.
306
307              aacraid,H,L,ID - [Linux, Windows and Cygwin only]  [NEW  EXPERI‐
308              MENTAL  SMARTD  FEATURE]  the  device  consists  of  one or more
309              SCSI/SAS disks connected to an AacRaid controller.  The non-neg‐
310              ative  integers  H,L,ID (Host number, Lun, ID) denote which disk
311              on the controller is monitored.  In log files and email messages
312              this  disk  will be identified as aacraid_disk_HH_LL_ID.  Please
313              see the smartctl(8) man page for further details.
314
315              3ware,N - [FreeBSD and Linux only] the device consists of one or
316              more  ATA  disks connected to a 3ware RAID controller.  The non-
317              negative integer N (in  the  range  from  0  to  127  inclusive)
318              denotes which disk on the controller is monitored.  In log files
319              and  email  messages   this   disk   will   be   identified   as
320              3ware_disk_XXX with XXX in the range from 000 to 127 inclusive.
321
322              Note  that  while  you  may  use  any  of the 3ware SCSI logical
323              devices /dev/tw* to address any of  the  physical  disks  (3ware
324              ports),  error  and log messages will make the most sense if you
325              always list the 3ware SCSI logical device corresponding  to  the
326              particular  physical disks.  Please see the smartctl(8) man page
327              for further details.
328
329              areca,N - [FreeBSD, Linux, Windows and Cygwin only]  the  device
330              consists  of  one  or more SATA disks connected to an Areca SATA
331              RAID controller.  The positive integer N (in the range from 1 to
332              24 inclusive) denotes which disk on the controller is monitored.
333              In log files and email messages this disk will be  identifed  as
334              areca_disk_XX  with  XX  in  the  range from 01 to 24 inclusive.
335              Please see the smartctl(8) man page for further details.
336
337              areca,N/E - [FreeBSD, Linux, Windows and Cygwin only] the device
338              consists  of one or more SATA or SAS disks connected to an Areca
339              SAS RAID controller.  The integer N (range 1 to 128) denotes the
340              channel  (slot)  and  E  (range  1  to 8) denotes the enclosure.
341              Important: This requires Areca SAS controller  firmware  version
342              1.51 or later.
343
344              cciss,N - [FreeBSD and Linux only] the device consists of one or
345              more SCSI/SAS or SATA disks  connected  to  a  cciss  RAID  con‐
346              troller.   The non-negative integer N (in the range from 0 to 15
347              inclusive) denotes which disk on the  controller  is  monitored.
348              In  log files and email messages this disk will be identified as
349              cciss_disk_XX with XX in the range  from  00  to  15  inclusive.
350              Please see the smartctl(8) man page for further details.
351
352              hpt,L/M/N  - [FreeBSD and Linux only] the device consists of one
353              or more ATA disks  connected  to  a  HighPoint  RocketRAID  con‐
354              troller.   The  integer L is the controller id, the integer M is
355              the channel number, and the integer N is the PMPort number if it
356              is  available.   The  allowed values of L are from 1 to 4 inclu‐
357              sive, M are from 1 to 128 inclusive and N from 1 to 4 if  PMPort
358              available.   And  also  these values are limited by the model of
359              the HighPoint RocketRAID controller.  In  log  files  and  email
360              messages  this disk will be identified as hpt_X/X/X and X/X/X is
361              the same as L/M/N, note if no N indicated, N set to the  default
362              value  1.   Please  see  the  smartctl(8)  man  page for further
363              details.
364
365              ignore - the device specified by this configuration entry should
366              be  ignored.   This  allows to ignore specific devices which are
367              detected by a following DEVICESCAN configuration line.   It  may
368              also  be  used to temporary disable longer multi-line configura‐
369              tion entries.  This Directive may be used  in  conjunction  with
370              the other ´-d´ Directives.
371
372              removable  -  the  device or its media is removable.  This indi‐
373              cates to smartd that it should  continue  (instead  of  exiting,
374              which  is the default behavior) if the device does not appear to
375              be present when smartd is started.  This Directive may  be  used
376              in conjunction with the other ´-d´ Directives.
377
378       -n POWERMODE[,N][,q]
379              [ATA  only]  This  ´nocheck´ Directive is used to prevent a disk
380              from being spun-up when it is periodically polled by smartd.
381
382              ATA disks have five different power states. In order of increas‐
383              ing  power  consumption  they  are:  ´OFF´,  ´SLEEP´, ´STANDBY´,
384              ´IDLE´, and ´ACTIVE´.  Typically in the OFF, SLEEP, and  STANDBY
385              modes  the  disk´s  platters  are  not spinning. But usually, in
386              response to SMART commands issued by smartd, the  disk  platters
387              are  spun  up.  So if this option is not used, then a disk which
388              is in a low-power mode may be spun up and  put  into  a  higher-
389              power mode when it is periodically polled by smartd.
390
391              Note  that  if the disk is in SLEEP mode when smartd is started,
392              then it won't respond to smartd commands, and so the disk  won't
393              be registered as a device for smartd to monitor. If a disk is in
394              any other low-power mode, then the commands issued by smartd  to
395              register the disk will probably cause it to spin-up.
396
397              The  ´-n´  (nocheck)  Directive  specifies  if smartd´s periodic
398              checks should still be carried out when the device is in a  low-
399              power mode.  It may be used to prevent a disk from being spun-up
400              by periodic smartd polling.  The  allowed  values  of  POWERMODE
401              are:
402
403              never  -  smartd  will poll (check) the device regardless of its
404              power mode. This may cause a disk which is spun-down to be spun-
405              up  when  smartd checks it.  This is the default behavior if the
406              '-n' Directive is not given.
407
408              sleep - check the device unless it is in SLEEP mode.
409
410              standby - check the device unless it  is  in  SLEEP  or  STANDBY
411              mode.   In  these  modes  most disks are not spinning, so if you
412              want to prevent a laptop disk from spinning up  each  time  that
413              smartd polls, this is probably what you want.
414
415              idle  -  check the device unless it is in SLEEP, STANDBY or IDLE
416              mode.  In the IDLE state, most disks are still spinning, so this
417              is probably not what you want.
418
419              Maximum  number of skipped checks (in a row) can be specified by
420              appending  positive  number  ´,N´   to   POWERMODE   (like   ´-n
421              standby,15´).  After N checks are skipped in a row, powermode is
422              ignored and the check is performed anyway.
423
424              When a periodic test  is  skipped,  smartd  normally  writes  an
425              informal log message. The message can be suppressed by appending
426              the option ´,q´ to POWERMODE (like ´-n standby,q´).   This  pre‐
427              vents a laptop disk from spinning up due to this message.
428
429              Both ´,N´ and ´,q´ can be specified together.
430
431       -T TYPE
432              Specifies  how  tolerant smartd should be of SMART command fail‐
433              ures.  The valid arguments to this Directive are:
434
435              normal - do not try to monitor the disk  if  a  mandatory  SMART
436              command  fails, but continue if an optional SMART command fails.
437              This is the default.
438
439              permissive - try to monitor the disk even if it appears to  lack
440              SMART  capabilities.   This  may  be required for some old disks
441              (prior to ATA-3 revision 4) that implemented  SMART  before  the
442              SMART  standards were incorporated into the ATA/ATAPI Specifica‐
443              tions.  [Please see the smartctl -T command-line option.]
444
445       -o VALUE
446              [ATA only] Enables or disables SMART Automatic  Offline  Testing
447              when  smartd  starts  up  and  has no further effect.  The valid
448              arguments to this Directive are on and off.
449
450              The delay between tests is  vendor-specific,  but  is  typically
451              four hours.
452
453              Note that SMART Automatic Offline Testing is not part of the ATA
454              Specification.  Please see the smartctl -o  command-line  option
455              documentation for further information about this feature.
456
457       -S VALUE
458              Enables or disables Attribute Autosave when smartd starts up and
459              has no further effect.  The valid arguments  to  this  Directive
460              are  on  and  off.   Also affects SCSI devices.  [Please see the
461              smartctl -S command-line option.]
462
463       -H     [ATA] Check the health status of the disk with the SMART  RETURN
464              STATUS  command.   If this command reports a failing health sta‐
465              tus, then disk failure is predicted in less than 24 hours, and a
466              message  at  loglevel  ´LOG_CRIT´  will  be  logged  to  syslog.
467              [Please see the smartctl -H command-line option.]
468
469              [NVMe] [FreeBSD, Linux, Windows and Cygwin only] [NEW EXPERIMEN‐
470              TAL  SMARTD FEATURE] Checks the "Critical Warning" byte from the
471              SMART/Health Information log.  If any warning bit is set, a mes‐
472              sage at loglevel ´LOG_CRIT´ will be logged to syslog.
473
474       -l TYPE
475              Reports  increases in the number of errors in one of three SMART
476              logs.  The valid arguments to this Directive are:
477
478              error - [ATA] report if the number of ATA errors reported in the
479              Summary SMART error log has increased since the last check.
480
481              error  -  [NVMe]  [FreeBSD, Linux, Windows and Cygwin only] [NEW
482              EXPERIMENTAL SMARTD FEATURE] report  if  the  "Number  of  Error
483              Information  Log  Entries" from the SMART/Health Information log
484              has increased since the last check.
485
486              xerror - [ATA] report if the number of ATA  errors  reported  in
487              the  Extended  Comprehensive SMART error log has increased since
488              the last check.
489
490              If both ´-l error´ and ´-l xerror´ are specified, smartd  checks
491              the maximum of both values.
492
493              [Please see the smartctl -l xerror command-line option.]
494
495              xerror  -  [NVMe] [FreeBSD, Linux, Windows and Cygwin only] [NEW
496              EXPERIMENTAL SMARTD FEATURE] same as ´-l error´.
497
498              selftest - report if the number of failed tests reported in  the
499              SMART  Self-Test  Log  has increased since the last check, or if
500              the timestamp associated with the most recent  failed  test  has
501              increased.  Note that such errors will only be logged if you run
502              self-tests on the disk (and it fails a test!).   Self-Tests  can
503              be  run  automatically  by smartd: please see the ´-s´ Directive
504              below.  Self-Tests  can  also  be  run  manually  by  using  the
505              ´-t short´  and ´-t long´ options of smartctl and the results of
506              the testing can be observed  using  the  smartctl  ´-l selftest´
507              command-line  option.   [Please  see the smartctl -l and -t com‐
508              mand-line options.]
509
510              [ATA only] Failed self-tests  outdated  by  a  newer  successful
511              extended  self-test  are  ignored.  The warning email counter is
512              reset if the number of failed self tests  dropped  to  0.   This
513              typically  happens  when  an extended self-test is run after all
514              bad sectors have been reallocated.
515
516              offlinests[,ns] - [ATA only] report if the Offline Data  Collec‐
517              tion  status  has changed since the last check.  The report will
518              be logged as LOG_CRIT if the  new  status  indicates  an  error.
519              With  some  drives  the  status  often  changes,  therefore  ´-l
520              offlinests´ is not enabled by '-a´ Directive.   Appending  ´,ns´
521              (no standby) to this directive is not implemented on Linux.
522
523              selfteststs[,ns]  - [ATA only] report if the Self-Test execution
524              status has changed since the last check.   The  report  will  be
525              logged  as  LOG_CRIT  if  the  new  status  indicates  an error.
526              Appending ´,ns´ (no standby) to this  directive  is  not  imple‐
527              mented on Linux.
528
529              scterc,READTIME,WRITETIME - [ATA only] sets the SCT Error Recov‐
530              ery Control settings to the specified values (deciseconds)  when
531              smartd starts up and has no further effect.  Values of 0 disable
532              the feature, other values less than 65  are  probably  not  sup‐
533              ported.  For RAID configurations, this is typically set to 70,70
534              deciseconds.  [Please see the smartctl  -l  scterc  command-line
535              option.]
536
537       -e NAME[,VALUE]
538              Sets  non-SMART device settings when smartd starts up and has no
539              further effect.  [Please see  the  smartctl  --set  command-line
540              option.]  Valid arguments are:
541
542              aam,[N|off]  - [ATA only] Sets the Automatic Acoustic Management
543              (AAM) feature.
544
545              apm,[N|off] - [ATA only]  Sets  the  Advanced  Power  Management
546              (APM) feature.
547
548              lookahead,[on|off]  -  [ATA  only] Sets the read look-ahead fea‐
549              ture.
550
551              security-freeze - [ATA only] Sets ATA Security feature to frozen
552              mode.
553
554              standby,[N|off]  -  [ATA only] Sets the standby (spindown) timer
555              and places the drive in the IDLE mode.
556
557              wcache,[on|off] - [ATA only] Sets the volatile write cache  fea‐
558              ture.
559
560       -s REGEXP
561              Run  Self-Tests  or Offline Immediate Tests, at scheduled times.
562              A Self- or Offline Immediate Test will be  run  at  the  end  of
563              periodic  device  polling,  if  all  12 characters of the string
564              T/MM/DD/d/HH match the extended regular expression REGEXP. Here:
565
566              T   is the type of the test.  The values that smartd will try to
567                  match  (in  turn)  are:  ´L´ for a Long Self-Test, ´S´ for a
568                  Short Self-Test, ´C´ for a Conveyance Self-Test (ATA  only),
569                  and  ´O´  for an Offline Immediate Test (ATA only).  As soon
570                  as a match is found, the test will be started and  no  addi‐
571                  tional  matches  will  be  sought  for  that device and that
572                  polling cycle.
573
574                  To run scheduled Selective  Self-Tests,  use  ´n´  for  next
575                  span,  ´r´  to  redo last span, or ´c´ to continue with next
576                  span or redo last span based on status of  last  test.   The
577                  LBA  range  is  based  on the first span from the last test.
578                  See the smartctl -t select,[next|redo|cont] options for fur‐
579                  ther info.
580
581                  Some disks (e.g. WD) do not preserve the selective self test
582                  log  accross  power  cycles.   If  state  persistence  (´-s´
583                  option)  is  enabled,  the  last  test  span is preserved by
584                  smartd and used if (and only if) the selective self test log
585                  is empty.
586
587              MM  is the month of the year, expressed with two decimal digits.
588                  The range is from 01 (January) to 12  (December)  inclusive.
589                  Do  not  use a single decimal digit or the match will always
590                  fail!
591
592              DD  is the day of the month, expressed with two decimal  digits.
593                  The  range  is from 01 to 31 inclusive.  Do not use a single
594                  decimal digit or the match will always fail!
595
596              d   is the day of the week, expressed with  one  decimal  digit.
597                  The range is from 1 (Monday) to 7 (Sunday) inclusive.
598
599              HH  is the hour of the day, written with two decimal digits, and
600                  given in hours after midnight.  The range is 00 (midnight to
601                  just before 1am) to 23 (11pm to just before midnight) inclu‐
602                  sive.  Do not use a single decimal digit or the  match  will
603                  always fail!
604
605              Some  examples  follow.   In reading these, keep in mind that in
606              extended regular expressions a dot ´.´ matches any single  char‐
607              acter,  and a parenthetical expression such as ´(A|B|C)´ denotes
608              any one of the three possibilities A, B, or C.
609
610              To schedule a short Self-Test between 2-3am every morning, use:
611               -s S/../.././02
612              To schedule a long Self-Test between 4-5am every Sunday morning,
613              use:
614               -s L/../../7/04
615              To  schedule  a  long Self-Test between 10-11pm on the first and
616              fifteenth day of each month, use:
617               -s L/../(01|15)/./22
618              To schedule an Offline Immediate test after every midnight, 6am,
619              noon,and  6pm,  plus a Short Self-Test daily at 1-2am and a Long
620              Self-Test every Saturday at 3-4am, use:
621               -s (O/../.././(00|06|12|18)|S/../.././01|L/../../6/03)
622              If Long Self-Tests of a large disks take longer than the  system
623              uptime,  a  full disk test can be performed by several Selective
624              Self-Tests.  To setup a full test of a 1TB disk within  20  days
625              (one 50GB span each day), run this command once:
626                smartctl -t select,0-99999999 /dev/sda
627              To run the next test spans on Monday-Friday between 12-13am, run
628              smartd with this directive:
629               -s n/../../[1-5]/12
630
631
632              Scheduled tests are run  immediately  following  the  regularly-
633              scheduled  device  polling, if the current local date, time, and
634              test type, match REGEXP.   By  default  the  regularly-scheduled
635              device  polling  occurs  every  thirty  minutes  after  starting
636              smartd.  Take caution if you use the ´-i´ option  to  make  this
637              polling  interval  more  than  sixty minutes: the poll times may
638              fail to coincide with any of the testing  times  that  you  have
639              specified  with  REGEXP.  In this case the test will be run fol‐
640              lowing the next device polling.
641
642              Before running an offline or self-test, smartd checks to be sure
643              that  a  self-test  is  not  already running.  If a self-test is
644              already running, then this running self test will not be  inter‐
645              rupted to begin another test.
646
647              smartd  will not attempt to run any type of test if another test
648              was already started or run in the same hour.
649
650              To avoid performance problems during system  boot,  smartd  will
651              not  attempt to run any scheduled tests following the very first
652              device polling (unless ´-q onecheck´ is specified).
653
654              Each time a test is run, smartd will log  an  entry  to  SYSLOG.
655              You  can  use these or the '-q showtests' command-line option to
656              verify that you  constructed  REGEXP  correctly.   The  matching
657              order  (L  before  S before C before O) ensures that if multiple
658              test types are all scheduled for the same hour, the longer  test
659              type has precedence.  This is usually the desired behavior.
660
661              If  the  scheduled tests are used in conjunction with state per‐
662              sistence (´-s´ option), smartd will also try to match the  hours
663              since last shutdown (or 90 days at most). If any test would have
664              been started during downtime, the longest (see above)  of  these
665              tests is run after second device polling.
666
667              If  the  ´-n´  directive  is  used  and any test would have been
668              started during disk standby time, the longest of these tests  is
669              run when the disk is active again.
670
671              Unix  users:  please  beware that the rules for extended regular
672              expressions [regex(7)] are not the same as the rules  for  file-
673              name pattern matching by the shell [glob(7)].  smartd will issue
674              harmless informational warning messages if it detects characters
675              in  REGEXP  that appear to indicate that you have made this mis‐
676              take.
677
678       -m ADD Send a warning email to the email address ADD if the ´-H´, ´-l´,
679              ´-f´,  ´-C´, or ´-O´ Directives detect a failure or a new error,
680              or if a SMART command to the disk  fails.  This  Directive  only
681              works  in  conjunction  with these other Directives (or with the
682              equivalent default ´-a´ Directive).
683
684              To prevent your email in-box from getting filled up with warning
685              messages, by default only a single warning will be sent for each
686              of the enabled alert types, ´-H´, ´-l´, ´-f´, ´-C´, or ´-O´ even
687              if  more than one failure or error is detected or if the failure
688              or error persists.  [This behavior can be modified; see the ´-M´
689              Directive below.]
690
691              To  send  email  to more than one user, please use the following
692              "comma      separated"      form      for      the      address:
693              user1@add1,user2@add2,...,userN@addN (with no spaces).
694
695              To  test  that  email is being sent correctly, use the ´-M test´
696              Directive described below to send  one  test  email  message  on
697              smartd startup.
698
699              By  default, email is sent using the system mail(1) command.  In
700              order that smartd find this command (normally /usr/bin/mail) the
701              executable  must be in the path of the shell or environment from
702              which smartd was started.  If you wish to  specify  an  explicit
703              path to the mail executable (for example /usr/local/bin/mail) or
704              a custom script to run,  please  use  the  ´-M  exec´  Directive
705              below.
706
707              Note  also that there is a special argument <nomailer> which can
708              be given to the ´-m´ Directive in conjunction with the ´-M exec´
709              Directive. Please see below for an explanation of its effect.
710
711              If the mailer or the shell running it produces any STDERR/STDOUT
712              output, then a snippet of that output will be copied to  SYSLOG.
713              The  remainder  of  the  output  is  discarded.  If problems are
714              encountered in sending mail, this should help you to  understand
715              and  fix  them.  If you have mail problems, we recommend running
716              smartd in debug mode with the ´-d´ flag,  using  the  ´-M  test´
717              Directive described below.
718
719              If  a word of the comma separated list has the form ´@plugin´, a
720              custom script /etc/smartmontools/smartd_warning.d/plugin is  run
721              and  the  word is removed from the list before sending mail. The
722              string ´plugin´ may be any valid name except ´ALL´.   If  ´@ALL´
723              is  specified,  all  scripts  in /etc/smartmontools/smartd_warn‐
724              ing.d/*  are  run  instead.   This  is  handled  by  the  script
725              /etc/smartmontools/smartd_warning.sh (see also ´-M exec´ below).
726
727       -M TYPE
728              These  Directives  modify the behavior of the smartd email warn‐
729              ings enabled with the  ´-m´  email  Directive  described  above.
730              These  ´-M´  Directives  only  work in conjunction with the ´-m´
731              Directive and can not be used without it.
732
733              Multiple -M Directives may be given.  If more than  one  of  the
734              following  three  -M  Directives  are given (example: -M once -M
735              daily) then the final one (in the example, -M daily) is used.
736
737              The valid arguments to the -M Directive are (one of the  follow‐
738              ing three):
739
740              once - send only one warning email for each type of disk problem
741              detected.  This is the default unless  state  persistence  (´-s´
742              option) is enabled.
743
744              daily  -  send additional warning reminder emails, once per day,
745              for each type of disk problem detected.  This is the default  if
746              state persistence (´-s´ option) is enabled.
747
748              diminishing  -  send additional warning reminder emails, after a
749              one-day interval, then  a  two-day  interval,  then  a  four-day
750              interval, and so on for each type of disk problem detected. Each
751              interval is twice as long as the previous interval.
752
753              If a disk problem is no  longer  detected,  the  internal  email
754              counter  is reset.  If the problem reappears a new warning email
755              is sent immediately.
756
757              In addition, one may add zero or more of  the  following  Direc‐
758              tives:
759
760              test - send a single test email immediately upon smartd startup.
761              This allows one to verify that  email  is  delivered  correctly.
762              Note  that  if this Directive is used, smartd will also send the
763              normal email warnings that were enabled with the ´-m´ Directive,
764              in addition to the single test email!
765
766              exec  PATH - run the executable PATH instead of the default mail
767              command, when smartd needs to send email.  PATH must point to an
768              executable binary file or script.
769
770              By  setting  PATH  to point to a customized script, you can make
771              smartd perform useful tricks when a  disk  problem  is  detected
772              (beeping  the  console,  shutting down the machine, broadcasting
773              warnings to all logged-in users, etc.)  But please  be  careful.
774              smartd  will block until the executable PATH returns, so if your
775              executable hangs, then  smartd  will  also  hang.   Some  sample
776              scripts  are  included  in /usr/share/doc/smartmontools/example‐
777              scripts/.
778
779              The return status of the executable is  recorded  by  smartd  in
780              SYSLOG.  The  executable  is  not expected to write to STDOUT or
781              STDERR.  If it does, then this is interpreted as indicating that
782              something is going wrong with your executable, and a fragment of
783              this output is logged to SYSLOG to help you  to  understand  the
784              problem.  Normally, if you wish to leave some record behind, the
785              executable should send mail or write to a file or device.
786
787              Before running the executable, smartd sets a number of  environ‐
788              ment variables.  These environment variables may be used to con‐
789              trol  the  executable´s  behavior.   The  environment  variables
790              exported by smartd are:
791
792              SMARTD_MAILER
793                  is  set  to  the  argument of -M exec, if present or else to
794                  ´mail´ (examples: /usr/local/bin/mail, mail).
795
796              SMARTD_DEVICE
797                  is set to the device path (example: /dev/sda).
798
799              SMARTD_DEVICETYPE
800                  is set to the device type specified  by  ´-d´  directive  or
801                  ´auto´ if none.
802
803              SMARTD_DEVICESTRING
804                  is  set to the device description.  For SMARTD_DEVICETYPE of
805                  ata or scsi, this is the same as SMARTD_DEVICE.   For  3ware
806                  RAID    controllers,    the    form    used   is   ´/dev/sdc
807                  [3ware_disk_01]´.  For HighPoint RocketRAID controller,  the
808                  form  is  ´/dev/sdd  [hpt_1/1/1]´ under Linux or ´/dev/hptrr
809                  [hpt_1/1/1]´ under FreeBSD.  For Areca controllers, the form
810                  is  ´/dev/sg2  [areca_disk_09]´  on  Linux or  ´/dev/arcmsr0
811                  [areca_disk_09]´ on FreeBSD.   In  these  cases  the  device
812                  string  contains  a  space  and  is  NOT  quoted.  So to use
813                  $SMARTD_DEVICESTRING in a shell script you  should  probably
814                  enclose it in double quotes.
815
816              SMARTD_DEVICEINFO
817                  is  set to device identify information.  It includes most of
818                  the info printed by smartctl -i but uses a brief single line
819                  format.   This device info is also logged when smartd starts
820                  up.  The string contains space characters and is NOT quoted.
821
822              SMARTD_FAILTYPE
823                  gives the reason for the warning or message email.  The pos‐
824                  sible values that it takes and their meanings are:
825                  EmailTest: this is an email test message.
826                  Health: the SMART health status indicates imminent failure.
827                  Usage: a usage Attribute has failed.
828                  SelfTest: the number of self-test failures has increased.
829                  ErrorCount:  the  number  of errors in the ATA error log has
830                  increased.
831                  CurrentPendingSector: one of more disk sectors could not  be
832                  read  and  are marked to be reallocated (replaced with spare
833                  sectors).
834                  OfflineUncorrectableSector:  during  off-line  testing,   or
835                  self-testing, one or more disk sectors could not be read.
836                  Temperature:  Temperature  reached  critical  limit  (see -W
837                  directive).
838                  FailedHealthCheck: the SMART health status command failed.
839                  FailedReadSmartData: the command  to  read  SMART  Attribute
840                  data failed.
841                  FailedReadSmartErrorLog: the command to read the SMART error
842                  log failed.
843                  FailedReadSmartSelfTestLog: the command to  read  the  SMART
844                  self-test log failed.
845                  FailedOpenDevice: the open() command to the device failed.
846
847              SMARTD_ADDRESS
848                  is determined by the address argument ADD of the ´-m´ Direc‐
849                  tive.  If ADD is <nomailer>, then SMARTD_ADDRESS is not set.
850                  Otherwise,  it  is  set to the comma-separated-list of email
851                  addresses  given  by  the  argument  ADD,  with  the  commas
852                  replaced  by  spaces  (example:admin@example.com  root).  If
853                  more than one email address is given, then this string  will
854                  contain  space characters and is NOT quoted, so to use it in
855                  a shell script you may want to enclose it in double quotes.
856
857              SMARTD_MESSAGE
858                  is set to the one sentence  summary  warning  email  message
859                  string  from  smartd.   This  message  string contains space
860                  characters and is NOT quoted. So to use $SMARTD_MESSAGE in a
861                  shell  script  you  should  probably  enclose  it  in double
862                  quotes.
863
864              SMARTD_FULLMESSAGE
865                  is set to the contents of the entire email  warning  message
866                  string  from smartd.  This message string contains space and
867                  return  characters  and   is   NOT   quoted.   So   to   use
868                  $SMARTD_FULLMESSAGE  in  a  shell script you should probably
869                  enclose it in double quotes.
870
871              SMARTD_TFIRST
872                  is a text string giving the time and date at which the first
873                  problem of this type was reported. This text string contains
874                  space characters and no newlines, and  is  NOT  quoted.  For
875                  example:
876                  Sun Feb  9 14:58:19 2003 CST
877
878              SMARTD_TFIRSTEPOCH
879                  is  an  integer,  which is the unix epoch (number of seconds
880                  since Jan 1, 1970) for SMARTD_TFIRST.
881
882              SMARTD_PREVCNT
883                  is an integer specifying the  number  of  previous  messages
884                  sent.  It is set to ´0´ for the first message.
885
886              SMARTD_NEXTDAYS
887                  is  an  integer specifying the number of days until the next
888                  message will be sent.  It it set to empty on ´-M  once´  and
889                  set to ´1´ on ´-M daily´.
890
891              If  the  ´-m ADD´ Directive is given with a normal address argu‐
892              ment, then the executable pointed to by PATH will be  run  in  a
893              shell  with  STDIN  receiving the body of the email message, and
894              with the same command-line arguments:
895              -s "$SMARTD_SUBJECT" $SMARTD_ADDRESS
896              that would normally be provided to ´mail´.  Examples include:
897              -m user@home -M exec /usr/bin/mail
898              -m admin@work -M exec /usr/local/bin/mailto
899              -m root -M exec /Example_1/shell/script/below
900
901              If the ´-m ADD´ Directive is  given  with  the  special  address
902              argument  <nomailer>  then  the executable pointed to by PATH is
903              run in a shell with no STDIN and no command-line arguments,  for
904              example:
905              -m <nomailer> -M exec /Example_2/shell/script/below
906              If the executable produces any STDERR/STDOUT output, then smartd
907              assumes that something is going wrong, and  a  snippet  of  that
908              output will be copied to SYSLOG.  The remainder of the output is
909              then discarded.
910
911              Some EXAMPLES of scripts that can be used  with  the  ´-M  exec´
912              Directive  are  given  below.   Some  sample  scripts  are  also
913              included in /usr/share/doc/smartmontools/examplescripts/.
914
915              The   executable   is   run   by   the   script   /etc/smartmon‐
916              tools/smartd_warning.sh.   This  script formats subject and full
917              message based on SMARTD_MESSAGE and other environment  variables
918              set  by  smartd.   The  environment variables SMARTD_SUBJECT and
919              SMARTD_FULLMESSAGE are set by the script before running the exe‐
920              cutable.
921
922       -f     [ATA  only]  Check  for  ´failure´  of any Usage Attributes.  If
923              these Attributes are less than or equal  to  the  threshold,  it
924              does NOT indicate imminent disk failure.  It "indicates an advi‐
925              sory condition where the usage or age of the device has exceeded
926              its  intended  design life period."  [Please see the smartctl -A
927              command-line option.]
928
929       -p     [ATA only] Report anytime that a Prefail Attribute  has  changed
930              its value since the last check. [Please see the smartctl -A com‐
931              mand-line option.]
932
933       -u     [ATA only] Report anytime that a Usage Attribute has changed its
934              value since the last check. [Please see the smartctl -A command-
935              line option.]
936
937       -t     [ATA only] Equivalent to turning on the two previous flags  ´-p´
938              and  ´-u´.   Tracks  changes in all device Attributes (both Pre‐
939              failure and Usage). [Please see  the  smartctl  -A  command-line
940              option.]
941
942       -i ID  [ATA  only]  Ignore device Attribute number ID when checking for
943              failure of Usage Attributes.  ID must be a  decimal  integer  in
944              the  range  from 1 to 255.  This Directive modifies the behavior
945              of the ´-f´ Directive and has no effect without it.
946
947              This is useful, for example, if you have a  very  old  disk  and
948              don´t  want to keep getting messages about the hours-on-lifetime
949              Attribute (usually Attribute 9)  failing.   This  Directive  may
950              appear multiple times for a single device, if you want to ignore
951              multiple Attributes.
952
953       -I ID  [ATA only] Ignore device Attribute ID when tracking  changes  in
954              the Attribute values.  ID must be a decimal integer in the range
955              from 1 to 255.  This Directive  modifies  the  behavior  of  the
956              ´-p´, ´-u´, and ´-t´ tracking Directives and has no effect with‐
957              out one of them.
958
959              This is useful, for example, if one of the device Attributes  is
960              the disk temperature (usually Attribute 194 or 231). It´s annoy‐
961              ing to get reports each  time  the  temperature  changes.   This
962              Directive  may appear multiple times for a single device, if you
963              want to ignore multiple Attributes.
964
965       -r ID[!]
966              [ATA only] When tracking, report the Raw value of  Attribute  ID
967              along with its (normally reported) Normalized value.  ID must be
968              a decimal integer in the range from 1 to  255.   This  Directive
969              modifies  the  behavior  of  the  ´-p´,  ´-u´, and ´-t´ tracking
970              Directives and has no effect without one of them.   This  Direc‐
971              tive may be given multiple times.
972
973              A  common  use of this Directive is to track the device Tempera‐
974              ture (often ID=194 or 231).
975
976              If the optional flag ´!´ is appended, a change of the Normalized
977              value  is  considered  critical.   The  report will be logged as
978              LOG_CRIT and a warning email will be sent if ´-m´ is specified.
979
980       -R ID[!]
981              [ATA only] When tracking,  report  whenever  the  Raw  value  of
982              Attribute  ID  changes.   (Normally  smartd  only tracks/reports
983              changes of the Normalized Attribute values.)  ID must be a deci‐
984              mal integer in the range from 1 to 255.  This Directive modifies
985              the behavior of the ´-p´, ´-u´, and ´-t´ tracking Directives and
986              has  no effect without one of them.  This Directive may be given
987              multiple times.
988
989              If this Directive is given, it automatically  implies  the  ´-r´
990              Directive  for  the same Attribute, so that the Raw value of the
991              Attribute is reported.
992
993              A common use of this Directive is to track the  device  Tempera‐
994              ture (often ID=194 or 231).  It is also useful for understanding
995              how different types of system behavior  affects  the  values  of
996              certain Attributes.
997
998              If  the optional flag ´!´ is appended, a change of the Raw value
999              is considered critical.  The report will be logged  as  LOG_CRIT
1000              and a warning email will be sent if ´-m´ is specified.  An exam‐
1001              ple is ´-R 5!´ to warn when new sectors are reallocated.
1002
1003       -C ID[+]
1004              [ATA only] Report if the current number of  pending  sectors  is
1005              non-zero.   Here  ID is the id number of the Attribute whose raw
1006              value is the Current Pending Sector count.  The allowed range of
1007              ID  is  0  to  255  inclusive.   To turn off this reporting, use
1008              ID = 0.  If the -C ID option is not given, then it  defaults  to
1009              -C 197 (since Attribute 197 is generally used to monitor pending
1010              sectors).  If the name of this Attribute is  changed  by  a  ´-v
1011              197,FORMAT,NAME´ directive, the default is changed to -C 0.
1012
1013              If  ´+´  is specified, a report is only printed if the number of
1014              sectors has increased between two check cycles.  Some  disks  do
1015              not  reset this attribute when a bad sector is reallocated.  See
1016              also ´-v 197,increasing´ below.
1017
1018              The warning email counter is reset if the number of pending sec‐
1019              tors dropped to 0.  This typically happens when all pending sec‐
1020              tors have been reallocated or could be read again.
1021
1022              A pending sector is a disk sector (containing 512 bytes of  your
1023              data)  which the device would like to mark as ``bad" and reallo‐
1024              cate.  Typically this is because your  computer  tried  to  read
1025              that sector, and the read failed because the data on it has been
1026              corrupted and has inconsistent  Error  Checking  and  Correction
1027              (ECC)  codes.   This is important to know, because it means that
1028              there is some unreadable data on the disk.  The problem of  fig‐
1029              uring out what file this data belongs to is operating system and
1030              file system specific.  You can typically  force  the  sector  to
1031              reallocate  by  writing to it (translation: make the device sub‐
1032              stitute a spare good sector for the bad one) but at the price of
1033              losing the 512 bytes of data stored there.
1034
1035       -U ID[+]
1036              [ATA only] Report if the number of offline uncorrectable sectors
1037              is non-zero.  Here ID is the id number of  the  Attribute  whose
1038              raw  value  is  the  Offline  Uncorrectable  Sector  count.  The
1039              allowed range of ID is 0 to 255 inclusive.   To  turn  off  this
1040              reporting,  use  ID = 0.  If the -U ID option is not given, then
1041              it defaults to -U 198 (since Attribute 198 is generally used  to
1042              monitor  offline  uncorrectable  sectors).   If the name of this
1043              Attribute is changed  by  a  ´-v  198,FORMAT,NAME´  (except  ´-v
1044              198,FORMAT,Offline_Scan_UNC_SectCt´),  directive, the default is
1045              changed to -U 0.
1046
1047              If ´+´ is specified, a report is only printed if the  number  of
1048              sectors  has increased since the last check cycle. Some disks do
1049              not reset this attribute when a bad sector is reallocated.   See
1050              also ´-v 198,increasing´ below.
1051
1052              The  warning  email  counter  is  reset if the number of offline
1053              uncorrectable sectors dropped to 0.  This typically happens when
1054              all offline uncorrectable sectors have been reallocated or could
1055              be read again.
1056
1057              An offline uncorrectable sector is a disk sector which  was  not
1058              readable during an off-line scan or a self-test.  This is impor‐
1059              tant to know, because if you have data stored in this disk  sec‐
1060              tor,  and  you  need to read it, the read will fail.  Please see
1061              the previous ´-C´ option for more details.
1062
1063       -W DIFF[,INFO[,CRIT]]
1064              Report if the current temperature had changed by at  least  DIFF
1065              degrees  since  last report, or if new min or max temperature is
1066              detected.  Report or Warn if the temperature is greater or equal
1067              than  one of INFO or CRIT degrees Celsius.  If the limit CRIT is
1068              reached, a message with loglevel ´LOG_CRIT´ will  be  logged  to
1069              syslog and a warning email will be send if ´-m´ is specified. If
1070              only  the  limit  INFO  is  reached,  a  message  with  loglevel
1071              ´LOG_INFO´ will be logged.
1072
1073              The  warning  email  counter is reset if the temperature dropped
1074              below INFO or CRIT-5 if INFO is not specified.
1075
1076              If this directive is used in conjunction with state  persistence
1077              (´-s´  option), the min and max temperature values are preserved
1078              across boot cycles. The minimum temperature value is not updated
1079              during the first 30 minutes after startup.
1080
1081              To  disable any of the 3 reports, set the corresponding limit to
1082              0.  Trailing zero arguments may be omitted. By default, all tem‐
1083              perature reports are disabled (´-W 0´).
1084
1085              To track temperature changes of at least 2 degrees, use:
1086              -W 2
1087              To log informal messages on temperatures of at least 40 degrees,
1088              use:
1089              -W 0,40
1090              For warning  messages/mails  on  temperatures  of  at  least  45
1091              degrees, use:
1092              -W 0,0,45
1093              To combine all of the above reports, use:
1094              -W 2,40,45
1095
1096              For  ATA devices, smartd interprets Attribute 194 or 190 as Tem‐
1097              perature Celsius by default. This can be changed to Attribute  9
1098              or  220  by  the  drive  database  or  by the ´-v 9,temp´ or ´-v
1099              220,temp´ directive.
1100
1101              [NEW EXPERIMENTAL  SMARTD  FEATURE]  For  NVMe  devices,  smartd
1102              checks  the  maximum  of the Composite Temperature value and all
1103              Temperature Sensor values reported by  SMART/Health  Information
1104              log.
1105
1106       -F TYPE
1107              [ATA  only]  Modifies  the  behavior of smartd to compensate for
1108              some known and understood device firmware bug.   This  directive
1109              may be used multiple times.  The valid arguments are:
1110
1111              none  - Assume that the device firmware obeys the ATA specifica‐
1112              tions.  This is the default, unless the device has  presets  for
1113              ´-F´  in the drive database.  Using this directive will override
1114              any preset values.
1115
1116              nologdir - Suppresses read attempts of SMART or  GP  Log  Direc‐
1117              tory.   Support  for  all  standard  logs  is assumed without an
1118              actual check.  Some Intel SSDs may freeze if log  address  0  is
1119              read.
1120
1121              samsung - In some Samsung disks (example: model SV4012H Firmware
1122              Version: RM100-08) some of the two- and four-byte quantities  in
1123              the  SMART data structures are byte-swapped (relative to the ATA
1124              specification).  Enabling this option tells smartd  to  evaluate
1125              these  quantities  in byte-reversed order.  Some signs that your
1126              disk needs this option are (1) no self-test  log  printed,  even
1127              though  you  have  run self-tests; (2) very large numbers of ATA
1128              errors reported in the ATA error log; (3) strange and impossible
1129              values for the ATA error log timestamps.
1130
1131              samsung2  -  In  some  Samsung  disks  the  number of ATA errors
1132              reported is byte swapped.  Enabling this option tells smartd  to
1133              evaluate this quantity in byte-reversed order.
1134
1135              samsung3  -  Some  Samsung disks (at least SP2514N with Firmware
1136              VF100-37) report a self-test still in progress with 0% remaining
1137              when the test was already completed. If this directive is speci‐
1138              fied, smartd will not skip the  next  scheduled  self-test  (see
1139              Directive ´-s´ above) in this case.
1140
1141              xerrorlba - This only affects smartctl.
1142
1143              [Please see the smartctl -F command-line option.]
1144
1145       -v ID,FORMAT[:BYTEORDER][,NAME]
1146              [ATA  only]  Sets  a  vendor-specific raw value print FORMAT, an
1147              optional BYTEORDER and an optional NAME for Attribute ID.   This
1148              directive  may  be  used multiple times.  Please see smartctl -v
1149              command-line option for further details.
1150
1151              The following arguments affect smartd warning output:
1152
1153              197,increasing - Raw Attribute number 197 (Current Pending  Sec‐
1154              tor  Count)  is  not  reset if uncorrectable sectors are reallo‐
1155              cated.  This sets ´-C 197+´ if no other ´-C´ directive is speci‐
1156              fied.
1157
1158              198,increasing - Raw Attribute number 198 (Offline Uncorrectable
1159              Sector Count) is not reset if uncorrectable sectors are  reallo‐
1160              cated.  This sets ´-U 198+´ if no other ´-U´ directive is speci‐
1161              fied.
1162
1163       -P TYPE
1164              [ATA only]  Specifies  whether  smartd  should  use  any  preset
1165              options  that are available for this drive.  The valid arguments
1166              to this Directive are:
1167
1168              use - use any presets that are available for this  drive.   This
1169              is the default.
1170
1171              ignore - do not use any presets for this drive.
1172
1173              show - show the presets listed for this drive in the database.
1174
1175              showall - show the presets that are available for all drives and
1176              then exit.
1177
1178              [Please see the smartctl -P command-line option.]
1179
1180       -a     Equivalent to turning on all of the following  Directives:  ´-H´
1181              to  check  the  SMART  health status, ´-f´ to report failures of
1182              Usage (rather than Prefail) Attributes, ´-t´ to track changes in
1183              both  Prefailure  and  Usage  Attributes,  ´-l error´  to report
1184              increases in the number of ATA errors, ´-l selftest´  to  report
1185              increases  in  the number of Self-Test Log errors, ´-l selftest‐
1186              sts´ to report changes of Self-Test execution status,  ´-C  197´
1187              to  report  nonzero  values of the current pending sector count,
1188              and ´-U 198´ to report nonzero values  of  the  offline  pending
1189              sector count.
1190
1191              Note  that  -a is the default for ATA devices.  If none of these
1192              other Directives is given, then -a is assumed.
1193
1194       #      Comment: ignore the remainder of the line.
1195
1196       \      Continuation character: if this is the last  non-white  or  non-
1197              comment  character  on a line, then the following line is a con‐
1198              tinuation of the current one.
1199
1200       If you are not sure which Directives to use,  I  suggest  experimenting
1201       for  a  few  minutes with smartctl to see what SMART functionality your
1202       disk(s) support(s).  If you do not like voluminous syslog  messages,  a
1203       good choice of smartd configuration file Directives might be:
1204       -H -l selftest -l error -f.
1205       If you want more frequent information, use: -a.
1206
1207
1208       ADDITIONAL DETAILS ABOUT DEVICESCAN
1209              If  a  non-comment  entry  in the configuration file is the text
1210              string DEVICESCAN in capital letters, then  smartd  will  ignore
1211              any remaining lines in the configuration file, and will scan for
1212              devices (see also smartd(8) man page).
1213
1214              If DEVICESCAN is not followed by  any  Directives,  then  smartd
1215              will  scan  for  both ATA and SCSI devices, and will monitor all
1216              possible SMART properties of any devices that are found.
1217
1218              DEVICESCAN may optionally be followed by any  valid  Directives,
1219              which will be applied to all devices that are found in the scan.
1220              For example
1221              DEVICESCAN -m root@example.com
1222              will scan for all devices, and then monitor them.  It will  send
1223              one email warning per device for any problems that are found.
1224              DEVICESCAN -d ata -m root@example.com
1225              will do the same, but restricts the scan to ATA devices only.
1226              DEVICESCAN -H -d ata -m root@example.com
1227              will  do  the same, but only monitors the SMART health status of
1228              the devices, (rather than the default  -a,  which  monitors  all
1229              SMART properties).
1230              [NEW EXPERIMENTAL SMARTD FEATURE] Multiple ´-d TYPE´ options may
1231              be specified with DEVICESCAN to combine the scan results of more
1232              than one TYPE.
1233
1234              Configuration  entries  for  specific  devices  may  precede the
1235              DEVICESCAN entry.  For example
1236              DEFAULT -m root@example.com
1237              /dev/sda -s S/../.././02
1238              /dev/sdc -d ignore
1239              DEVICESCAN -s L/../.././02
1240              will scan for all devices except /dev/sda and /dev/sdc,  monitor
1241              them,  and  run a long test between 2-3am every morning.  Device
1242              /dev/sda will also be monitored, but only a short test  will  be
1243              run.   Device  /dev/sdc will be ignored.  Warning emails will be
1244              sent for all monitored devices.
1245
1246
1247       EXAMPLES OF SHELL SCRIPTS FOR ´-M exec´
1248              These are two examples of shell scripts that can  be  used  with
1249              the ´-M exec PATH´ Directive described previously.  The paths to
1250              these scripts and similar executables is the  PATH  argument  to
1251              the ´-M exec PATH´ Directive.
1252
1253              Example  1:  This  script  is  for  use with ´-m ADDRESS -M exec
1254              PATH´.  It appends the output of smartctl -a to  the  output  of
1255              the smartd email warning message and sends it to ADDRESS.
1256
1257              #! /bin/sh
1258
1259              # Save the email message (STDIN) to a file:
1260              cat > /root/msg
1261
1262              # Append the output of smartctl -a to the message:
1263              /usr/sbin/smartctl -a -d $SMART_DEVICETYPE $SMARTD_DEVICE >> /root/msg
1264
1265              # Now email the message to the user at address ADD:
1266              /usr/bin/mail -s "$SMARTD_SUBJECT" $SMARTD_ADDRESS < /root/msg
1267
1268              Example  2:  This  script is for use with ´-m <nomailer> -M exec
1269              PATH´. It warns all users about a disk problem,  waits  30  sec‐
1270              onds, and then powers down the machine.
1271
1272              #! /bin/sh
1273
1274              # Warn all users of a problem
1275              wall <<EOF
1276              Problem detected with disk: $SMARTD_DEVICESTRING
1277              Warning message from smartd is: $SMARTD_MESSAGE
1278              Shutting down machine in 30 seconds...
1279              EOF
1280
1281              # Wait half a minute
1282              sleep 30
1283
1284              # Power down the machine
1285              /sbin/shutdown -hf now
1286
1287              Some  example  scripts  are  distributed  with the smartmontools
1288              package, in /usr/share/doc/smartmontools/examplescripts/.
1289
1290              Please note that these scripts typically run  as  root,  so  any
1291              files  that  they  read/write should not be writable by ordinary
1292              users or reside in directories like /tmp that  are  writable  by
1293              ordinary users and may expose your system to symlink attacks.
1294
1295              As  previously  described,  if  the  scripts  write to STDOUT or
1296              STDERR, this is interpreted as  indicating  that  there  was  an
1297              internal error within the script, and a snippet of STDOUT/STDERR
1298              is logged to SYSLOG.  The remainder is flushed.
1299
1300

FILES

1302       /etc/smartmontools/smartd.conf
1303              full path of this file.
1304
1305

SEE ALSO

1307       smartd(8), smartctl(8), mail(1), regex(7).
1308
1309

PACKAGE VERSION

1311       smartmontools-6.5 2016-05-07 r4318
1312       $Id: smartd.conf.5.in 4307 2016-04-24 12:37:31Z chrfranke $
1313
1314
1315
1316smartmontools-6.5                 2016-05-07                    SMARTD.CONF(5)
Impressum