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