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

DEVICESCAN

148       If a non-comment entry in the configuration file is the text string DE‐
149       VICESCAN in capital letters, then  smartd  will  ignore  any  remaining
150       lines  in  the  configuration  file, and will scan for devices.  If DE‐
151       VICESCAN is not followed by any Directives, then '-a' will apply to all
152       devices.
153
154       DEVICESCAN  may optionally be followed by Directives that will apply to
155       all devices that are found in the scan.  For example
156
157         DEVICESCAN -m root@example.com
158
159       will scan for all devices, and then monitor them.   It  will  send  one
160       email warning per device for any problems that are found.
161
162         DEVICESCAN -H -m root@example.com
163
164       will  do the same, but only monitors the SMART health status of the de‐
165       vices, rather than the default '-a'.
166
167       Multiple '-d TYPE' options may be specified with DEVICESCAN to  combine
168       the scan results of more than one TYPE.
169
170       Configuration  entries  for specific devices may precede the DEVICESCAN
171       entry.  For example
172
173         DEFAULT -m root@example.com
174         /dev/sda -s S/../.././02
175         /dev/sdc -d ignore
176         DEVICESCAN -s L/../.././02
177
178       will scan for all devices except /dev/sda and /dev/sdc,  monitor  them,
179       and run a long test between 2–3 am every morning.  Device /dev/sda will
180       also be monitored, but only a short test will be run.  Device  /dev/sdc
181       will  be  ignored.   Warning  emails will be sent for all monitored de‐
182       vices.
183
184       A device is ignored by DEVICESCAN if a configuration line with the same
185       device  name  exists.  Symbolic links are resolved before this check is
186       done.  A device name is also ignored if another device with same  iden‐
187       tify  information (vendor, model, firmware version, serial number, WWN)
188       already exists.
189
190

DEFAULT SETTINGS

192       If an entry in the configuration file starts with DEFAULT instead of  a
193       device  name, then all directives in this entry are set as defaults for
194       the next device entries.
195
196       This configuration:
197
198         DEFAULT -a -R5! -W 2,40,45 -I 194 -s L/../../7/00 -m admin@example.com
199         /dev/sda
200         /dev/sdb
201         /dev/sdc
202         DEFAULT -H -m admin@example.com
203         /dev/sdd
204         /dev/sde -d removable
205
206       has the same effect as:
207
208         /dev/sda -a -R5! -W 2,40,45 -I 194 -s L/../../7/00 -m admin@example.com
209         /dev/sdb -a -R5! -W 2,40,45 -I 194 -s L/../../7/00 -m admin@example.com
210         /dev/sdc -a -R5! -W 2,40,45 -I 194 -s L/../../7/00 -m admin@example.com
211         /dev/sdd -H -m admin@example.com
212         /dev/sde -d removable -H -m admin@example.com
213
214

CONFIGURATION FILE DIRECTIVES

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

FILES

1386       /etc/smartmontools/smartd.conf
1387              full path of this file.
1388
1389

SEE ALSO

1391       smartd(8), smartctl(8), mail(1), regex(7).
1392
1393

PACKAGE VERSION

1395       smartmontools-7.4 2023-08-01 r5530
1396       $Id: smartd.conf.5.in 5521 2023-07-24 16:44:49Z chrfranke $
1397
1398
1399
1400smartmontools-7.4                 2023-08-01                    SMARTD.CONF(5)
Impressum