1SMARTD(8) 2010-10-16 SMARTD(8)
2
3
4
6 smartd - SMART Disk Monitoring Daemon
7
8
10 smartd [options]
11
12
14 /usr/sbin/smartd
15
16
18 smartmontools-5.40 2010-10-16 r3189
19
20
22 smartd is a daemon that monitors the Self-Monitoring, Analysis and
23 Reporting Technology (SMART) system built into many ATA-3 and later
24 ATA, IDE and SCSI-3 hard drives. The purpose of SMART is to monitor the
25 reliability of the hard drive and predict drive failures, and to carry
26 out different types of drive self-tests. This version of smartd is
27 compatible with ATA/ATAPI-7 and earlier standards (see REFERENCES
28 below).
29
30 smartd will attempt to enable SMART monitoring on ATA devices (equiva‐
31 lent to smartctl -s on) and polls these and SCSI devices every 30 min‐
32 utes (configurable), logging SMART errors and changes of SMART
33 Attributes via the SYSLOG interface. The default location for these
34 SYSLOG notifications and warnings is system-dependent (typically
35 /var/log/messages or /var/log/syslog). To change this default loca‐
36 tion, please see the ´-l´ command-line option described below.
37
38 In addition to logging to a file, smartd can also be configured to send
39 email warnings if problems are detected. Depending upon the type of
40 problem, you may want to run self-tests on the disk, back up the disk,
41 replace the disk, or use a manufacturer´s utility to force reallocation
42 of bad or unreadable disk sectors. If disk problems are detected,
43 please see the smartctl manual page and the smartmontools web page/FAQ
44 for further guidance.
45
46 If you send a USR1 signal to smartd it will immediately check the sta‐
47 tus of the disks, and then return to polling the disks every 30 min‐
48 utes. See the ´-i´ option below for additional details.
49
50 smartd can be configured at start-up using the configuration file
51 /etc/smartd.conf (Windows: EXEDIR/smartd.conf). If the configuration
52 file is subsequently modified, smartd can be told to re-read the con‐
53 figuration file by sending it a HUP signal, for example with the com‐
54 mand:
55 killall -HUP smartd.
56 (Windows: See NOTES below.)
57
58 On startup, if smartd finds a syntax error in the configuration file,
59 it will print an error message and then exit. However if smartd is
60 already running, then is told with a HUP signal to re-read the configu‐
61 ration file, and then find a syntax error in this file, it will print
62 an error message and then continue, ignoring the contents of the
63 (faulty) configuration file, as if the HUP signal had never been
64 received.
65
66 When smartd is running in debug mode, the INT signal (normally gener‐
67 ated from a shell with CONTROL-C) is treated in the same way as a HUP
68 signal: it makes smartd reload its configuration file. To exit smartd
69 use CONTROL-\ (Cygwin: 2x CONTROL-C, Windows: CONTROL-Break).
70
71 On startup, in the absence of the configuration file /etc/smartd.conf,
72 the smartd daemon first scans for all devices that support SMART. The
73 scanning is done as follows:
74
75 LINUX: Examine all entries "/dev/hd[a-t]" for IDE/ATA devices, and
76 "/dev/sd[a-z]", "/dev/sd[a-c][a-z]" for SCSI or SATA devices.
77
78 FREEBSD: Authoritative list of disk devices is obtained from SCSI (CAM)
79 and ATA subsystems.
80
81 NETBSD/OPENBSD:
82 Authoritative list of disk devices is obtained from sysctl
83 ´hw.disknames´.
84
85 SOLARIS: Examine all entries "/dev/rdsk/c?t?d?s?" for IDE/ATA and SCSI
86 disk devices, and entries "/dev/rmt/*" for SCSI tape devices.
87
88 DARWIN: The IOService plane is scanned for ATA block storage devices.
89
90 WINDOWS 9x/ME:
91 Examine all entries "/dev/hd[a-d]" (bitmask from
92 "\\.\SMARTVSD") for IDE/ATA devices. Examine all entries
93 "/dev/scsi[0-9][0-f]" for SCSI devices on ASPI adapter 0-9, ID
94 0-15.
95
96 WINDOWS NT4/2000/XP/2003/Vista:
97 Examine all entries "/dev/sd[a-j]" ("\\.\PhysicalDrive[0-9]")
98 for IDE/(S)ATA and SCSI disk devices
99
100 If a 3ware 9000 controller is installed, examine all entries
101 "/dev/sdX,N" for the first logical drive (´unit´ "/dev/sdX")
102 and all physical disks (´ports´ ",N") detected behind this
103 controller. Same for a second controller if present.
104
105 CYGWIN: See "WINDOWS NT4/2000/XP/2003/Vista" above.
106
107 OS/2,eComStation:
108 Use the form "/dev/hd[a-z]" for IDE/ATA devices.
109
110 smartd then monitors for all possible SMART errors (corresponding to
111 the ´-a´ Directive in the configuration file; see CONFIGURATION FILE
112 below).
113
114
116 -A PREFIX, --attributelog=PREFIX
117 [NEW EXPERIMENTAL SMARTD FEATURE] [ATA ONLY] Writes smartd
118 attribute information (normalized and raw attribute values) to
119 files ´PREFIX´´MODEL-SERIAL.ata.csv´. At each check cycle
120 attributes are logged as a line of semicolon separated triplets
121 of the form "attribute-ID;attribute-norm-value;attribute-raw-
122 value;". Each line is led by a date string of the form "yyyy-mm-
123 dd HH:MM:SS" (in UTC).
124
125 MODEL and SERIAL are build from drive identify information,
126 invalid characters are replaced by underline.
127
128 If the PREFIX has the form ´/path/dir/´ (e.g.
129 ´/var/lib/smartd/´), then files ´MODEL-SERIAL.ata.csv´ are cre‐
130 ated in directory ´/path/dir´. If the PREFIX has the form
131 ´/path/name´ (e.g. ´/var/lib/misc/attrlog-´), then files 'nameM‐
132 ODEL-SERIAL.ata.csv' are created in directory '/path/'. The
133 path must be absolute, except if debug mode is enabled.
134
135 -B [+]FILE, --drivedb=[+]FILE
136 [NEW EXPERIMENTAL SMARTD FEATURE] Read the drive database from
137 FILE. The new database replaces the built in database by
138 default. If ´+´ is specified, then the new entries prepend the
139 built in entries. Please see the smartctl(8) man page for fur‐
140 ther details.
141
142 -c FILE, --configfile=FILE
143 Read smartd configuration Directives from FILE, instead of from
144 the default location /etc/smartd.conf (Windows:
145 EXEDIR/smartd.conf). If FILE does not exist, then smartd will
146 print an error message and exit with nonzero status. Thus, ´-c
147 /etc/smartd.conf´ can be used to verify the existence of the
148 default configuration file.
149
150 By using ´-´ for FILE, the configuration is read from standard
151 input. This is useful for commands like:
152 echo /dev/hdb -m user@home -M test | smartd -c - -q onecheck
153 to perform quick and simple checks without a configuration file.
154
155 -C, --capabilities
156 Use capabilities(7) (EXPERIMENTAL).
157
158 Warning: Mail notification does not work when used.
159
160 -d, --debug
161 Runs smartd in "debug" mode. In this mode, it displays status
162 information to STDOUT rather than logging it to SYSLOG and does
163 not fork(2) into the background and detach from the controlling
164 terminal. In this mode, smartd also prints more verbose infor‐
165 mation about what it is doing than when operating in "daemon"
166 mode. In this mode, the QUIT signal (normally generated from a
167 terminal with CONTROL-C) makes smartd reload its configuration
168 file. Please use CONTROL-\ to exit (Cygwin: 2x CONTROL-C, Win‐
169 dows: CONTROL-Break).
170
171 Windows only: The "debug" mode can be toggled by the command
172 smartd sigusr2. A new console for debug output is opened when
173 debug mode is enabled.
174
175 -D, --showdirectives
176 Prints a list (to STDOUT) of all the possible Directives which
177 may appear in the configuration file /etc/smartd.conf, and then
178 exits. These Directives are also described later in this man
179 page. They may appear in the configuration file following the
180 device name.
181
182 -h, --help, --usage
183 Prints usage message to STDOUT and exits.
184
185 -i N, --interval=N
186 Sets the interval between disk checks to N seconds, where N is a
187 decimal integer. The minimum allowed value is ten and the maxi‐
188 mum is the largest positive integer that can be represented on
189 your system (often 2^31-1). The default is 1800 seconds.
190
191 Note that the superuser can make smartd check the status of the
192 disks at any time by sending it the SIGUSR1 signal, for example
193 with the command:
194 kill -SIGUSR1 <pid>
195 where <pid> is the process id number of smartd. One may also
196 use:
197 killall -USR1 smartd
198 for the same purpose.
199 (Windows: See NOTES below.)
200
201 -l FACILITY, --logfacility=FACILITY
202 Uses syslog facility FACILITY to log the messages from smartd.
203 Here FACILITY is one of local0, local1, ..., local7, or daemon
204 [default]. If this command-line option is not used, then by
205 default messages from smartd are logged to the facility daemon.
206
207 If you would like to have smartd messages logged somewhere other
208 than the default location, this can typically be accomplished
209 with (for example) the following steps:
210
211 [1] Modify the script that starts smartd to include the smartd
212 command-line argument ´-l local3´. This tells smartd to log
213 its messages to facility local3.
214
215 [2] Modify the syslogd configuration file (typically /etc/sys‐
216 log.conf) by adding a line of the form:
217 local3.* /var/log/smartd.log
218 This tells syslogd to log all the messages from facility
219 local3 to the designated file: /var/log/smartd.log.
220
221 [3] Tell syslogd to re-read its configuration file, typically by
222 sending the syslogd process a SIGHUP hang-up signal.
223
224 [4] Start (or restart) the smartd daemon.
225
226 For more detailed information, please refer to the man pages for
227 syslog.conf, syslogd, and syslog. You may also want to modify
228 the log rotation configuration files; see the man pages for
229 logrotate and examine your system´s /etc/logrotate.conf file.
230
231 Cygwin: Support for syslogd as described above is available
232 starting with Cygwin 1.5.15. On older releases or if no local
233 syslogd is running, the ´-l´ option has no effect. In this
234 case, all syslog messages are written to Windows event log or to
235 file C:/CYGWIN_SYSLOG.TXT if the event log is not available.
236
237 Windows: Some syslog functionality is implemented internally in
238 smartd as follows: If no ´-l´ option (or ´-l daemon´) is speci‐
239 fied, messages are written to Windows event log or to file
240 ./smartd.log if event log is not available (Win9x/ME or access
241 denied). By specifying other values of FACILITY, log output is
242 redirected as follows: ´-l local0´ to file ./smartd.log, ´-l
243 local1´ to standard output (redirect with ´>´ to any file), ´-l
244 local2´ to standard error, ´-l local[3-7]´: to file
245 ./smartd[1-5].log.
246
247 When using the event log, the enclosed utility syslogevt.exe
248 should be registered as an event message file to avoid error
249 messages from the event viewer. Use ´syslogevt -r smartd´ to
250 register, ´syslogevt -u smartd´ to unregister and ´syslogevt´
251 for more help.
252
253 -n, --no-fork
254 Do not fork into background; this is useful when executed from
255 modern init methods like initng, minit or supervise.
256
257 On Cygwin, this allows running smartd as service via cygrunsrv,
258 see NOTES below.
259
260 On Windows, this option is not available, use ´--service´
261 instead.
262
263 -p NAME, --pidfile=NAME
264 Writes pidfile NAME containing the smartd Process ID number
265 (PID). To avoid symlink attacks make sure the directory to
266 which pidfile is written is only writable for root. Without
267 this option, or if the --debug option is given, no PID file is
268 written on startup. If smartd is killed with a maskable signal
269 then the pidfile is removed.
270
271 -q WHEN, --quit=WHEN
272 Specifies when, if ever, smartd should exit. The valid argu‐
273 ments are to this option are:
274
275 nodev - Exit if there are no devices to monitor, or if any
276 errors are found at startup in the configuration file. This is
277 the default.
278
279 errors - Exit if there are no devices to monitor, or if any
280 errors are found in the configuration file /etc/smartd.conf at
281 startup or whenever it is reloaded.
282
283 nodevstartup - Exit if there are no devices to monitor at
284 startup. But continue to run if no devices are found whenever
285 the configuration file is reloaded.
286
287 never - Only exit if a fatal error occurs (no remaining system
288 memory, invalid command line arguments). In this mode, even if
289 there are no devices to monitor, or if the configuration file
290 /etc/smartd.conf has errors, smartd will continue to run, wait‐
291 ing to load a configuration file listing valid devices.
292
293 onecheck - Start smartd in debug mode, then register devices,
294 then check device´s SMART status once, and then exit with zero
295 exit status if all of these steps worked correctly.
296
297 This last option is intended for ´distribution-writers´ who want
298 to create automated scripts to determine whether or not to auto‐
299 matically start up smartd after installing smartmontools. After
300 starting smartd with this command-line option, the distribu‐
301 tion´s install scripts should wait a reasonable length of time
302 (say ten seconds). If smartd has not exited with zero status by
303 that time, the script should send smartd a SIGTERM or SIGKILL
304 and assume that smartd will not operate correctly on the host.
305 Conversely, if smartd exits with zero status, then it is safe to
306 run smartd in normal daemon mode. If smartd is unable to monitor
307 any devices or encounters other problems then it will return
308 with non-zero exit status.
309
310 showtests - Start smartd in debug mode, then register devices,
311 then write a list of future scheduled self tests to stdout, and
312 then exit with zero exit status if all of these steps worked
313 correctly. Device's SMART status is not checked.
314
315 This option is intended to test whether the '-s REGEX' direc‐
316 tives in smartd.conf will have the desired effect. The output
317 lists the next test schedules, limited to 5 tests per type and
318 device. This is followed by a summary of all tests of each
319 device within the next 90 days.
320
321 -r TYPE, --report=TYPE
322 Intended primarily to help smartmontools developers understand
323 the behavior of smartmontools on non-conforming or poorly-con‐
324 forming hardware. This option reports details of smartd trans‐
325 actions with the device. The option can be used multiple times.
326 When used just once, it shows a record of the ioctl() transac‐
327 tions with the device. When used more than once, the detail of
328 these ioctl() transactions are reported in greater detail. The
329 valid arguments to this option are:
330
331 ioctl - report all ioctl() transactions.
332
333 ataioctl - report only ioctl() transactions with ATA devices.
334
335 scsiioctl - report only ioctl() transactions with SCSI devices.
336
337 Any argument may include a positive integer to specify the level
338 of detail that should be reported. The argument should be fol‐
339 lowed by a comma then the integer with no spaces. For example,
340 ataioctl,2 The default level is 1, so ´-r ataioctl,1´ and ´-r
341 ataioctl´ are equivalent.
342
343 -s PREFIX, --savestates=PREFIX
344 [NEW EXPERIMENTAL SMARTD FEATURE] [ATA ONLY] Reads/writes smartd
345 state information from/to files ´PRE‐
346 FIX´´MODEL-SERIAL.ata.state´. This preserves SMART attributes,
347 drive min and max temperatures (-W directive), info about last
348 sent warning email (-m directive), and the time of next check of
349 the self-test REGEXP (-s directive) across boot cycles.
350
351 MODEL and SERIAL are build from drive identify information,
352 invalid characters are replaced by underline.
353
354 If the PREFIX has the form ´/path/dir/´ (e.g.
355 ´/var/lib/smartd/´), then files ´MODEL-SERIAL.ata.state´ are
356 created in directory ´/path/dir´. If the PREFIX has the form
357 ´/path/name´ (e.g. ´/var/lib/misc/smartd-´), then files 'nameMO‐
358 DEL-SERIAL.ata.state' are created in directory '/path/'. The
359 path must be absolute, except if debug mode is enabled.
360
361 The state information files are read on smartd startup. The
362 files are always (re)written after reading the configuration
363 file, before rereading the configuration file (SIGHUP), before
364 smartd shutdown, and after a check forced by SIGUSR1. After a
365 normal check cycle, a file is only rewritten if an important
366 change (which usually results in a SYSLOG output) occurred.
367
368 --service
369 Cygwin and Windows only: Enables smartd to run as a Windows ser‐
370 vice.
371
372 On Cygwin, this option is kept for backward compatibility only.
373 It has the same effect as ´-n, --no-fork´, see above.
374
375 On Windows, this option enables the buildin service support.
376 The option must be specified in the service command line as the
377 first argument. It should not be used from console. See NOTES
378 below for details.
379
380 -V, --version, --license, --copyright
381 Prints version, copyright, license, home page and SVN revision
382 information for your copy of smartd to STDOUT and then exits.
383 Please include this information if you are reporting bugs or
384 problems.
385
386
388 smartd
389 Runs the daemon in forked mode. This is the normal way to run smartd.
390 Entries are logged to SYSLOG.
391
392 smartd -d -i 30
393 Run in foreground (debug) mode, checking the disk status every 30 sec‐
394 onds.
395
396 smartd -q onecheck
397 Registers devices, and checks the status of the devices exactly once.
398 The exit status (the bash $? variable) will be zero if all went well,
399 and nonzero if no devices were detected or some other problem was
400 encountered.
401
402 Note that smartmontools provides a start-up script in
403 /etc/rc.d/init.d/smartd which is responsible for starting and stopping
404 the daemon via the normal init interface. Using this script, you can
405 start smartd by giving the command:
406 /etc/rc.d/init.d/smartd start
407 and stop it by using the command:
408 /etc/rc.d/init.d/smartd stop
409
410
411
413 In the absence of a configuration file, under Linux smartd will try to
414 open the 20 ATA devices /dev/hd[a-t] and the 26 SCSI devices /dev/sd[a-
415 z]. Under FreeBSD, smartd will try to open all existing ATA devices
416 (with entries in /dev) /dev/ad[0-9]+ and all existing SCSI devices
417 (using CAM subsystem). Under NetBSD/OpenBSD, smartd will try to open
418 all existing ATA devices (with entries in /dev) /dev/wd[0-9]+c and all
419 existing SCSI devices /dev/sd[0-9]+c. Under Solaris smartd will try to
420 open all entries "/dev/rdsk/c?t?d?s?" for IDE/ATA and SCSI disk
421 devices, and entries "/dev/rmt/*" for SCSI tape devices. Under Windows
422 smartd will try to open all entries "/dev/hd[a-j]" ("\\.\Physi‐
423 calDrive[0-9]") for IDE/ATA devices on WinNT4/2000/XP, "/dev/hd[a-d]"
424 (bitmask from "\\.\SMARTVSD") for IDE/ATA devices on Win95/98/98SE/ME,
425 and "/dev/scsi[0-9][0-7]" (ASPI adapter 0-9, ID 0-7) for SCSI devices
426 on all versions of Windows. Under Darwin, smartd will open any ATA
427 block storage device.
428
429 This can be annoying if you have an ATA or SCSI device that hangs or
430 misbehaves when receiving SMART commands. Even if this causes no prob‐
431 lems, you may be annoyed by the string of error log messages about
432 block-major devices that can´t be found, and SCSI devices that can´t be
433 opened.
434
435 One can avoid this problem, and gain more control over the types of
436 events monitored by smartd, by using the configuration file
437 /etc/smartd.conf. This file contains a list of devices to monitor,
438 with one device per line. An example file is included with the smart‐
439 montools distribution. You will find this sample configuration file in
440 /usr/share/doc/smartmontools/. For security, the configuration file
441 should not be writable by anyone but root. The syntax of the file is as
442 follows:
443
444 · There should be one device listed per line, although you may have
445 lines that are entirely comments or white space.
446
447 · Any text following a hash sign ´#´ and up to the end of the line is
448 taken to be a comment, and ignored.
449
450 · Lines may be continued by using a backslash ´\´ as the last non-
451 whitespace or non-comment item on a line.
452
453 · Note: a line whose first character is a hash sign ´#´ is treated as
454 a white-space blank line, not as a non-existent line, and will end
455 a continuation line.
456
457 Here is an example configuration file. It´s for illustrative purposes
458 only; please don´t copy it onto your system without reading to the end
459 of the DIRECTIVES Section below!
460
461 ################################################
462 # This is an example smartd startup config file
463 # /etc/smartd.conf for monitoring three
464 # ATA disks, three SCSI disks, six ATA disks
465 # behind two 3ware controllers, three SATA disks
466 # directly connected to the HighPoint Rocket-
467 # RAID controller, two SATA disks connected to
468 # the HighPoint RocketRAID controller via a pmport
469 # device, four SATA disks connected to an Areca
470 # RAID controller, and one SATA disk.
471 #
472 # First ATA disk on two different interfaces. On
473 # the second disk, start a long self-test every
474 # Sunday between 3 and 4 am.
475 #
476 /dev/hda -a -m admin@example.com,root@localhost
477 /dev/hdc -a -I 194 -I 5 -i 12 -s L/../../7/03
478 #
479 # SCSI disks. Send a TEST warning email to admin on
480 # startup.
481 #
482 /dev/sda
483 /dev/sdb -m admin@example.com -M test
484 #
485 # Strange device. It´s SCSI. Start a scheduled
486 # long self test between 5 and 6 am Monday/Thursday
487 /dev/weird -d scsi -s L/../../(1|4)/05
488 #
489 # An ATA disk may appear as a SCSI device to the
490 # OS. If a SCSI to ATA Translation (SAT) layer
491 # is between the OS and the device then this can be
492 # flagged with the '-d sat' option. This situation
493 # may become common with SATA disks in SAS and FC
494 # environments.
495 /dev/sda -a -d sat
496 #
497 # Three disks connected to a MegaRAID controller
498 # Start short self-tests daily between 1-2, 2-3, and
499 # 3-4 am.
500 /dev/sda -d megaraid,0 -a -s S/../.././01
501 /dev/sda -d megaraid,1 -a -s S/../.././02
502 /dev/sda -d megaraid,2 -a -s S/../.././03
503 #
504 # Four ATA disks on a 3ware 6/7/8000 controller.
505 # Start short self-tests daily between midnight and 1am,
506 # 1-2, 2-3, and 3-4 am. Starting with the Linux 2.6
507 # kernel series, /dev/sdX is deprecated in favor of
508 # /dev/tweN. For example replace /dev/sdc by /dev/twe0
509 # and /dev/sdd by /dev/twe1.
510 /dev/sdc -d 3ware,0 -a -s S/../.././00
511 /dev/sdc -d 3ware,1 -a -s S/../.././01
512 /dev/sdd -d 3ware,2 -a -s S/../.././02
513 /dev/sdd -d 3ware,3 -a -s S/../.././03
514 #
515 # Two ATA disks on a 3ware 9000 controller.
516 # Start long self-tests Sundays between midnight and
517 # 1am and 2-3 am
518 /dev/twa0 -d 3ware,0 -a -s L/../../7/00
519 /dev/twa0 -d 3ware,1 -a -s L/../../7/02
520 #
521 # Two SATA (not SAS) disks on a 3ware 9750 controller.
522 # Start long self-tests Sundays between midnight and
523 # 1am and 2-3 am
524 /dev/twl0 -d 3ware,0 -a -s L/../../7/00
525 /dev/twl0 -d 3ware,1 -a -s L/../../7/02
526 #
527 # Three SATA disks on a HighPoint RocketRAID controller.
528 # Start short self-tests daily between 1-2, 2-3, and
529 # 3-4 am.
530 # under Linux
531 /dev/sde -d hpt,1/1 -a -s S/../.././01
532 /dev/sde -d hpt,1/2 -a -s S/../.././02
533 /dev/sde -d hpt,1/3 -a -s S/../.././03
534 # or under FreeBSD
535 # /dev/hptrr -d hpt,1/1 -a -s S/../.././01
536 # /dev/hptrr -d hpt,1/2 -a -s S/../.././02
537 # /dev/hptrr -d hpt,1/3 -a -s S/../.././03
538 #
539 # Two SATA disks connected to a HighPoint RocketRAID
540 # via a pmport device. Start long self-tests Sundays
541 # between midnight and 1am and 2-3 am.
542 # under Linux
543 /dev/sde -d hpt,1/4/1 -a -s L/../../7/00
544 /dev/sde -d hpt,1/4/2 -a -s L/../../7/02
545 # or under FreeBSD
546 # /dev/hptrr -d hpt,1/4/1 -a -s L/../../7/00
547 # /dev/hptrr -d hpt,1/4/2 -a -s L/../../7/02
548 #
549 # Three SATA disks connected to an Areca
550 # RAID controller. Start long self-tests Sundays
551 # between midnight and 3 am.
552 /dev/sg2 -d areca,1 -a -s L/../../7/00
553 /dev/sg2 -d areca,2 -a -s L/../../7/01
554 /dev/sg2 -d areca,3 -a -s L/../../7/02
555 #
556 # The following line enables monitoring of the
557 # ATA Error Log and the Self-Test Error Log.
558 # It also tracks changes in both Prefailure
559 # and Usage Attributes, apart from Attributes
560 # 9, 194, and 231, and shows continued lines:
561 #
562 /dev/hdd -l error \
563 -l selftest \
564 -t \ # Attributes not tracked:
565 -I 194 \ # temperature
566 -I 231 \ # also temperature
567 -I 9 # power-on hours
568 #
569 ################################################
570
571
573 If a non-comment entry in the configuration file is the text string
574 DEVICESCAN in capital letters, then smartd will ignore any remaining
575 lines in the configuration file, and will scan for devices. DEVICESCAN
576 may optionally be followed by Directives that will apply to all devices
577 that are found in the scan. Please see below for additional details.
578
579
580
581 The following are the Directives that may appear following the device
582 name or DEVICESCAN on any line of the /etc/smartd.conf configuration
583 file. Note that these are NOT command-line options for smartd. The
584 Directives below may appear in any order, following the device name.
585
586 For an ATA device, if no Directives appear, then the device will be
587 monitored as if the ´-a´ Directive (monitor all SMART properties) had
588 been given.
589
590 If a SCSI disk is listed, it will be monitored at the maximum imple‐
591 mented level: roughly equivalent to using the ´-H -l selftest´ options
592 for an ATA disk. So with the exception of ´-d´, ´-m´, ´-l selftest´,
593 ´-s´, and ´-M´, the Directives below are ignored for SCSI disks. For
594 SCSI disks, the ´-m´ Directive sends a warning email if the SMART sta‐
595 tus indicates a disk failure or problem, if the SCSI inquiry about disk
596 status fails, or if new errors appear in the self-test log.
597
598 If a 3ware controller is used then the corresponding SCSI (/dev/sd?) or
599 character device (/dev/twe?, /dev/twa? or /dev/twl?) must be listed,
600 along with the ´-d 3ware,N´ Directive (see below). The individual ATA
601 disks hosted by the 3ware controller appear to smartd as normal ATA
602 devices. Hence all the ATA directives can be used for these disks (but
603 see note below).
604
605 If an Areca controller is used then the corresponding SCSI generic
606 device (/dev/sg?) must be listed, along with the ´-d areca,N´ Direc‐
607 tive (see below). The individual SATA disks hosted by the Areca con‐
608 troller appear to smartd as normal ATA devices. Hence all the ATA
609 directives can be used for these disks. Areca firmware version 1.46 or
610 later which supports smartmontools must be used; Please see the
611 smartctl(8) man page for further details.
612
613 -d TYPE
614 Specifies the type of the device. This Directive may be used
615 multiple times for one device, but the arguments ata, scsi, sat,
616 marvell, cciss,N, areca,N, megaraid,N and 3ware,N are mutually-
617 exclusive. If more than one is given then smartd will use the
618 last one which appears.
619
620 If none of these three arguments is given, then smartd will
621 first attempt to guess the device type by looking at whether the
622 sixth character in the device name is an ´s´ or an ´h´. This
623 will work for device names like /dev/hda or /dev/sdb, and corre‐
624 sponds to choosing ata or scsi respectively. If smartd can´t
625 guess from this sixth character, then it will simply try to
626 access the device using first ATA and then SCSI ioctl()s.
627
628 The valid arguments to this Directive are:
629
630 ata - the device type is ATA. This prevents smartd from issuing
631 SCSI commands to an ATA device.
632
633 scsi - the device type is SCSI. This prevents smartd from issu‐
634 ing ATA commands to a SCSI device.
635
636 sat - the device type is SCSI to ATA Translation (SAT). smartd
637 will generate ATA (smart) commands and then package them in the
638 SAT defined ATA PASS THROUGH SCSI commands. The commands are
639 then routed through the SCSI pass through interface to the oper‐
640 ating system. There are two types of ATA PASS THROUGH SCSI com‐
641 mands: a 12 byte and 16 byte variant. smartd can use either and
642 defaults to the 16 byte variant. This can be overridden with
643 this syntax: ´-d sat,12´ or ´-d sat,16´.
644
645 marvell - Under Linux, interact with SATA disks behind Marvell
646 chip-set controllers (using the Marvell rather than libata
647 driver).
648
649 megaraid,N - the device consists of one or more SCSI/SAS/SATA
650 disks connected to a MegaRAID controller. The non-negative
651 integer N (in the range of 0 to 127 inclusive) denotes which
652 disk on the controller is monitored. In log files and email
653 messages this disk will be identified as megaraid_disk_XXX with
654 XXX in the range from 000 to 127 inclusive.
655
656 3ware,N - the device consists of one or more ATA disks connected
657 to a 3ware RAID controller. The non-negative integer N (in the
658 range from 0 to 127 inclusive) denotes which disk on the con‐
659 troller is monitored. In log files and email messages this disk
660 will be identified as 3ware_disk_XXX with XXX in the range from
661 000 to 127 inclusive.
662
663 This Directive may at first appear confusing, because the 3ware
664 controller is a SCSI device (such as /dev/sda) and should be
665 listed as such in the the configuration file. However when the
666 ´-d 3ware,N´ Directive is used, then the corresponding disk is
667 addressed using native ATA commands which are ´passed through´
668 the SCSI driver. All ATA Directives listed in this man page may
669 be used. Note that while you may use any of the 3ware SCSI log‐
670 ical devices /dev/sd? to address any of the physical disks
671 (3ware ports), error and log messages will make the most sense
672 if you always list the 3ware SCSI logical device corresponding
673 to the particular physical disks. Please see the smartctl(8)
674 man page for further details.
675
676 ATA disks behind 3ware controllers may alternatively be accessed
677 via a character device interface /dev/twe0-15 (3ware
678 6000/7000/8000 controllers), /dev/twa0-15 (3ware 9000 series
679 controllers) and /dev/twl0-15 (3ware 9750 series controllers).
680 Note that the 9000 series controllers may only be accessed using
681 the character device interface /dev/twa0-15 and not the SCSI
682 device interface /dev/sd?. Please see the smartctl(8) man page
683 for further details.
684
685 Note that older 3w-xxxx drivers do not pass the ´Enable
686 Autosave´ (-S on) and ´Enable Automatic Offline´ (-o on) com‐
687 mands to the disk, if the SCSI interface is used, and produce
688 these types of harmless syslog error messages instead: ´3w-xxxx:
689 tw_ioctl(): Passthru size (123392) too big´. This can be fixed
690 by upgrading to version 1.02.00.037 or later of the 3w-xxxx
691 driver, or by applying a patch to older versions. See
692 http://smartmontools.sourceforge.net/ for instructions. Alter‐
693 natively use the character device interfaces /dev/twe0-15 (3ware
694 6/7/8000 series controllers), /dev/twa0-15 (3ware 9000 series
695 controllers) or /dev/twl0-15 (3ware 9750 series controllers).
696
697 areca,N - the device consists of one or more SATA disks con‐
698 nected to an Areca SATA RAID controller. The positive integer N
699 (in the range from 1 to 24 inclusive) denotes which disk on the
700 controller is monitored. In log files and email messages this
701 disk will be identifed as areca_disk_XX with XX in the range
702 from 01 to 24 inclusive.
703
704 cciss,N - the device consists of one or more SCSI disks con‐
705 nected to a cciss RAID controller. The non-negative integer N
706 (in the range from 0 to 15 inclusive) denotes which disk on the
707 controller is monitored. In log files and email messages this
708 disk will be identified as cciss_disk_XX with XX in the range
709 from 00 to 15 inclusive.
710
711 3ware, MegaRAID, Areca and cciss controllers are currently ONLY
712 supported under Linux.
713
714 hpt,L/M/N - the device consists of one or more ATA disks con‐
715 nected to a HighPoint RocketRAID controller. The integer L is
716 the controller id, the integer M is the channel number, and the
717 integer N is the PMPort number if it is available. The allowed
718 values of L are from 1 to 4 inclusive, M are from 1 to 8 inclu‐
719 sive and N from 1 to 4 if PMPort available. And also these val‐
720 ues are limited by the model of the HighPoint RocketRAID con‐
721 troller. In log files and email messages this disk will be
722 identified as hpt_X/X/X and X/X/X is the same as L/M/N, note if
723 no N indicated, N set to the default value 1.
724
725 HighPoint RocketRAID controllers are currently ONLY supported
726 under Linux and FreeBSD.
727
728 removable - the device or its media is removable. This indi‐
729 cates to smartd that it should continue (instead of exiting,
730 which is the default behavior) if the device does not appear to
731 be present when smartd is started. This Directive may be used
732 in conjunction with the other ´-d´ Directives.
733
734 -n POWERMODE[,N][,q]
735 This ´nocheck´ Directive is used to prevent a disk from being
736 spun-up when it is periodically polled by smartd.
737
738 ATA disks have five different power states. In order of increas‐
739 ing power consumption they are: ´OFF´, ´SLEEP´, ´STANDBY´,
740 ´IDLE´, and ´ACTIVE´. Typically in the OFF, SLEEP, and STANDBY
741 modes the disk´s platters are not spinning. But usually, in
742 response to SMART commands issued by smartd, the disk platters
743 are spun up. So if this option is not used, then a disk which
744 is in a low-power mode may be spun up and put into a
745 higher-power mode when it is periodically polled by smartd.
746
747 Note that if the disk is in SLEEP mode when smartd is started,
748 then it won't respond to smartd commands, and so the disk won't
749 be registered as a device for smartd to monitor. If a disk is in
750 any other low-power mode, then the commands issued by smartd to
751 register the disk will probably cause it to spin-up.
752
753 The ´-n´ (nocheck) Directive specifies if smartd´s periodic
754 checks should still be carried out when the device is in a
755 low-power mode. It may be used to prevent a disk from being
756 spun-up by periodic smartd polling. The allowed values of POW‐
757 ERMODE are:
758
759 never - smartd will poll (check) the device regardless of its
760 power mode. This may cause a disk which is spun-down to be
761 spun-up when smartd checks it. This is the default behavior if
762 the '-n' Directive is not given.
763
764 sleep - check the device unless it is in SLEEP mode.
765
766 standby - check the device unless it is in SLEEP or STANDBY
767 mode. In these modes most disks are not spinning, so if you
768 want to prevent a laptop disk from spinning up each time that
769 smartd polls, this is probably what you want.
770
771 idle - check the device unless it is in SLEEP, STANDBY or IDLE
772 mode. In the IDLE state, most disks are still spinning, so this
773 is probably not what you want.
774
775 Maximum number of skipped checks (in a row) can be specified by
776 appending positive number ´,N´ to POWERMODE (like ´-n
777 standby,15´). After N checks are skipped in a row, powermode is
778 ignored and the check is performed anyway.
779
780 When a periodic test is skipped, smartd normally writes an
781 informal log message. The message can be suppressed by appending
782 the option ´,q´ to POWERMODE (like ´-n standby,q´). This pre‐
783 vents a laptop disk from spinning up due to this message.
784
785 Both ´,N´ and ´,q´ can be specified together.
786
787 -T TYPE
788 Specifies how tolerant smartd should be of SMART command fail‐
789 ures. The valid arguments to this Directive are:
790
791 normal - do not try to monitor the disk if a mandatory SMART
792 command fails, but continue if an optional SMART command fails.
793 This is the default.
794
795 permissive - try to monitor the disk even if it appears to lack
796 SMART capabilities. This may be required for some old disks
797 (prior to ATA-3 revision 4) that implemented SMART before the
798 SMART standards were incorporated into the ATA/ATAPI Specifica‐
799 tions. This may also be needed for some Maxtor disks which fail
800 to comply with the ATA Specifications and don't properly indi‐
801 cate support for error- or self-test logging.
802
803 [Please see the smartctl -T command-line option.]
804
805 -o VALUE
806 Enables or disables SMART Automatic Offline Testing when smartd
807 starts up and has no further effect. The valid arguments to
808 this Directive are on and off.
809
810 The delay between tests is vendor-specific, but is typically
811 four hours.
812
813 Note that SMART Automatic Offline Testing is not part of the ATA
814 Specification. Please see the smartctl -o command-line option
815 documentation for further information about this feature.
816
817 -S VALUE
818 Enables or disables Attribute Autosave when smartd starts up and
819 has no further effect. The valid arguments to this Directive
820 are on and off. Also affects SCSI devices. [Please see the
821 smartctl -S command-line option.]
822
823 -H Check the SMART health status of the disk. If any Prefailure
824 Attributes are less than or equal to their threshold values,
825 then disk failure is predicted in less than 24 hours, and a mes‐
826 sage at loglevel ´LOG_CRIT´ will be logged to syslog. [Please
827 see the smartctl -H command-line option.]
828
829 -l TYPE
830 Reports increases in the number of errors in one of three SMART
831 logs. The valid arguments to this Directive are:
832
833 error - report if the number of ATA errors reported in the Sum‐
834 mary SMART error log has increased since the last check.
835
836 xerror - [NEW EXPERIMENTAL SMARTD FEATURE] report if the number
837 of ATA errors reported in the Extended Comprehensive SMART error
838 log has increased since the last check.
839
840 If both ´-l error´ and ´-l xerror´ are specified, smartd checks
841 the maximum of both values.
842
843 [Please see the smartctl -l xerror command-line option.]
844
845 selftest - report if the number of failed tests reported in the
846 SMART Self-Test Log has increased since the last check, or if
847 the timestamp associated with the most recent failed test has
848 increased. Note that such errors will only be logged if you run
849 self-tests on the disk (and it fails a test!). Self-Tests can
850 be run automatically by smartd: please see the ´-s´ Directive
851 below. Self-Tests can also be run manually by using the
852 ´-t short´ and ´-t long´ options of smartctl and the results of
853 the testing can be observed using the smartctl ´-l selftest´
854 command-line option.]
855
856 [Please see the smartctl -l and -t command-line options.]
857
858 -s REGEXP
859 Run Self-Tests or Offline Immediate Tests, at scheduled times.
860 A Self- or Offline Immediate Test will be run at the end of
861 periodic device polling, if all 12 characters of the string
862 T/MM/DD/d/HH match the extended regular expression REGEXP. Here:
863
864 T is the type of the test. The values that smartd will try to
865 match (in turn) are: ´L´ for a Long Self-Test, ´S´ for a
866 Short Self-Test, ´C´ for a Conveyance Self-Test (ATA only),
867 and ´O´ for an Offline Immediate Test (ATA only). As soon
868 as a match is found, the test will be started and no addi‐
869 tional matches will be sought for that device and that
870 polling cycle.
871
872 [NEW EXPERIMENTAL SMARTD FEATURE] To run scheduled Selective
873 Self-Tests, use ´n´ for next span, ´r´ to redo last span, or
874 ´c´ to continue with next span or redo last span based on
875 status of last test. The LBA range is based on the first
876 span from the last test. See the smartctl -t
877 select,[next|redo|cont] options for further info.
878
879
880 MM is the month of the year, expressed with two decimal digits.
881 The range is from 01 (January) to 12 (December) inclusive.
882 Do not use a single decimal digit or the match will always
883 fail!
884
885 DD is the day of the month, expressed with two decimal digits.
886 The range is from 01 to 31 inclusive. Do not use a single
887 decimal digit or the match will always fail!
888
889 d is the day of the week, expressed with one decimal digit.
890 The range is from 1 (Monday) to 7 (Sunday) inclusive.
891
892 HH is the hour of the day, written with two decimal digits, and
893 given in hours after midnight. The range is 00 (midnight to
894 just before 1am) to 23 (11pm to just before midnight) inclu‐
895 sive. Do not use a single decimal digit or the match will
896 always fail!
897
898 Some examples follow. In reading these, keep in mind that in
899 extended regular expressions a dot ´.´ matches any single char‐
900 acter, and a parenthetical expression such as ´(A|B|C)´ denotes
901 any one of the three possibilities A, B, or C.
902
903 To schedule a short Self-Test between 2-3am every morning, use:
904 -s S/../.././02
905 To schedule a long Self-Test between 4-5am every Sunday morning,
906 use:
907 -s L/../../7/04
908 To schedule a long Self-Test between 10-11pm on the first and
909 fifteenth day of each month, use:
910 -s L/../(01|15)/./22
911 To schedule an Offline Immediate test after every midnight, 6am,
912 noon,and 6pm, plus a Short Self-Test daily at 1-2am and a Long
913 Self-Test every Saturday at 3-4am, use:
914 -s (O/../.././(00|06|12|18)|S/../.././01|L/../../6/03)
915 If Long Self-Tests of a large disks take longer than the system
916 uptime, a full disk test can be performed by several Selective
917 Self-Tests. To setup a full test of a 1TB disk within 20 days
918 (one 50GB span each day), run this command once:
919 smartctl -t select,0-99999999 /dev/sda
920 To run the next test spans on Monday-Friday between 12-13am, run
921 smartd with this directive:
922 -s n/../../[1-5]/12
923
924
925 Scheduled tests are run immediately following the regularly-
926 scheduled device polling, if the current local date, time, and
927 test type, match REGEXP. By default the regularly-scheduled
928 device polling occurs every thirty minutes after starting
929 smartd. Take caution if you use the ´-i´ option to make this
930 polling interval more than sixty minutes: the poll times may
931 fail to coincide with any of the testing times that you have
932 specified with REGEXP. In this case the test will be run fol‐
933 lowing the next device polling.
934
935 Before running an offline or self-test, smartd checks to be sure
936 that a self-test is not already running. If a self-test is
937 already running, then this running self test will not be inter‐
938 rupted to begin another test.
939
940 smartd will not attempt to run any type of test if another test
941 was already started or run in the same hour.
942
943 To avoid performance problems during system boot, smartd will
944 not attempt to run any scheduled tests following the very first
945 device polling (unless ´-q onecheck´ is specified).
946
947 Each time a test is run, smartd will log an entry to SYSLOG.
948 You can use these or the '-q showtests' command-line option to
949 verify that you constructed REGEXP correctly. The matching
950 order (L before S before C before O) ensures that if multiple
951 test types are all scheduled for the same hour, the longer test
952 type has precedence. This is usually the desired behavior.
953
954 If the scheduled tests are used in conjunction with state per‐
955 sistence (´-s´ option), smartd will also try to match the hours
956 since last shutdown (or 90 days at most). If any test would have
957 been started during downtime, the longest (see above) of these
958 tests is run after second device polling.
959
960 If the ´-n´ directive is used and any test would have been
961 started during disk standby time, the longest of these tests is
962 run when the disk is active again.
963
964 Unix users: please beware that the rules for extended regular
965 expressions [regex(7)] are not the same as the rules for
966 file-name pattern matching by the shell [glob(7)]. smartd will
967 issue harmless informational warning messages if it detects
968 characters in REGEXP that appear to indicate that you have made
969 this mistake.
970
971 -m ADD Send a warning email to the email address ADD if the ´-H´, ´-l´,
972 ´-f´, ´-C´, or ´-O´ Directives detect a failure or a new error,
973 or if a SMART command to the disk fails. This Directive only
974 works in conjunction with these other Directives (or with the
975 equivalent default ´-a´ Directive).
976
977 To prevent your email in-box from getting filled up with warning
978 messages, by default only a single warning will be sent for each
979 of the enabled alert types, ´-H´, ´-l´, ´-f´, ´-C´, or ´-O´ even
980 if more than one failure or error is detected or if the failure
981 or error persists. [This behavior can be modified; see the ´-M´
982 Directive below.]
983
984 To send email to more than one user, please use the following
985 "comma separated" form for the address:
986 user1@add1,user2@add2,...,userN@addN (with no spaces).
987
988 To test that email is being sent correctly, use the ´-M test´
989 Directive described below to send one test email message on
990 smartd startup.
991
992 By default, email is sent using the system mail command. In
993 order that smartd find the mail command (normally /bin/mail) an
994 executable named ´mail´ must be in the path of the shell or
995 environment from which smartd was started. If you wish to spec‐
996 ify an explicit path to the mail executable (for example
997 /usr/local/bin/mail) or a custom script to run, please use the
998 ´-M exec´ Directive below.
999
1000 Note that by default under Solaris, in the previous paragraph,
1001 ´mailx´ and ´/bin/mailx´ are used, since Solaris ´/bin/mail´
1002 does not accept a ´-s´ (Subject) command-line argument.
1003
1004 On Windows, the ´Blat´ mailer (http://blat.sourceforge.net/) is
1005 used by default. This mailer uses a different command line syn‐
1006 tax, see ´-M exec´ below.
1007
1008 Note also that there is a special argument <nomailer> which can
1009 be given to the ´-m´ Directive in conjunction with the ´-M exec´
1010 Directive. Please see below for an explanation of its effect.
1011
1012 If the mailer or the shell running it produces any STDERR/STDOUT
1013 output, then a snippet of that output will be copied to SYSLOG.
1014 The remainder of the output is discarded. If problems are
1015 encountered in sending mail, this should help you to understand
1016 and fix them. If you have mail problems, we recommend running
1017 smartd in debug mode with the ´-d´ flag, using the ´-M test´
1018 Directive described below.
1019
1020 The following extension is available on Windows: By specifying
1021 ´msgbox´ as a mail address, a warning "email" is displayed as a
1022 message box on the screen. Using both ´msgbox´ and regular mail
1023 addresses is possible, if ´msgbox´ is the first word in the
1024 comma separated list. With ´sysmsgbox´, a system modal (always
1025 on top) message box is used. If running as a service, a service
1026 notification message box (always shown on current visible desk‐
1027 top) is used.
1028
1029 -M TYPE
1030 These Directives modify the behavior of the smartd email warn‐
1031 ings enabled with the ´-m´ email Directive described above.
1032 These ´-M´ Directives only work in conjunction with the ´-m´
1033 Directive and can not be used without it.
1034
1035 Multiple -M Directives may be given. If more than one of the
1036 following three -M Directives are given (example: -M once -M
1037 daily) then the final one (in the example, -M daily) is used.
1038
1039 The valid arguments to the -M Directive are (one of the follow‐
1040 ing three):
1041
1042 once - send only one warning email for each type of disk problem
1043 detected. This is the default.
1044
1045 daily - send additional warning reminder emails, once per day,
1046 for each type of disk problem detected.
1047
1048 diminishing - send additional warning reminder emails, after a
1049 one-day interval, then a two-day interval, then a four-day
1050 interval, and so on for each type of disk problem detected. Each
1051 interval is twice as long as the previous interval.
1052
1053 In addition, one may add zero or more of the following Direc‐
1054 tives:
1055
1056 test - send a single test email immediately upon smartd startup.
1057 This allows one to verify that email is delivered correctly.
1058 Note that if this Directive is used, smartd will also send the
1059 normal email warnings that were enabled with the ´-m´ Directive,
1060 in addition to the single test email!
1061
1062 exec PATH - run the executable PATH instead of the default mail
1063 command, when smartd needs to send email. PATH must point to an
1064 executable binary file or script.
1065
1066 By setting PATH to point to a customized script, you can make
1067 smartd perform useful tricks when a disk problem is detected
1068 (beeping the console, shutting down the machine, broadcasting
1069 warnings to all logged-in users, etc.) But please be careful.
1070 smartd will block until the executable PATH returns, so if your
1071 executable hangs, then smartd will also hang. Some sample
1072 scripts are included in /usr/share/doc/smartmontools/example‐
1073 scripts/.
1074
1075 The return status of the executable is recorded by smartd in
1076 SYSLOG. The executable is not expected to write to STDOUT or
1077 STDERR. If it does, then this is interpreted as indicating that
1078 something is going wrong with your executable, and a fragment of
1079 this output is logged to SYSLOG to help you to understand the
1080 problem. Normally, if you wish to leave some record behind, the
1081 executable should send mail or write to a file or device.
1082
1083 Before running the executable, smartd sets a number of environ‐
1084 ment variables. These environment variables may be used to con‐
1085 trol the executable´s behavior. The environment variables
1086 exported by smartd are:
1087
1088 SMARTD_MAILER
1089 is set to the argument of -M exec, if present or else to
1090 ´mail´ (examples: /bin/mail, mail).
1091
1092 SMARTD_DEVICE
1093 is set to the device path (examples: /dev/hda, /dev/sdb).
1094
1095 SMARTD_DEVICETYPE
1096 is set to the device type specified by ´-d´ directive or
1097 ´auto´ if none.
1098
1099 SMARTD_DEVICESTRING
1100 is set to the device description. For SMARTD_DEVICETYPE of
1101 ata or scsi, this is the same as SMARTD_DEVICE. For 3ware
1102 RAID controllers, the form used is ´/dev/sdc
1103 [3ware_disk_01]´. For HighPoint RocketRAID controller, the
1104 form is ´/dev/sdd [hpt_1/1/1]´ under Linux or ´/dev/hptrr
1105 [hpt_1/1/1]´ under FreeBSD. For Areca controllers, the form
1106 is ´/dev/sg2 [areca_disk_09]´. In these cases the device
1107 string contains a space and is NOT quoted. So to use
1108 $SMARTD_DEVICESTRING in a bash script you should probably
1109 enclose it in double quotes.
1110
1111 SMARTD_FAILTYPE
1112 gives the reason for the warning or message email. The pos‐
1113 sible values that it takes and their meanings are:
1114 EmailTest: this is an email test message.
1115 Health: the SMART health status indicates imminent failure.
1116 Usage: a usage Attribute has failed.
1117 SelfTest: the number of self-test failures has increased.
1118 ErrorCount: the number of errors in the ATA error log has
1119 increased.
1120 CurrentPendingSector: one of more disk sectors could not be
1121 read and are marked to be reallocated (replaced with spare
1122 sectors).
1123 OfflineUncorrectableSector: during off-line testing, or
1124 self-testing, one or more disk sectors could not be read.
1125 Temperature: Temperature reached critical limit (see -W
1126 directive).
1127 FailedHealthCheck: the SMART health status command failed.
1128 FailedReadSmartData: the command to read SMART Attribute
1129 data failed.
1130 FailedReadSmartErrorLog: the command to read the SMART error
1131 log failed.
1132 FailedReadSmartSelfTestLog: the command to read the SMART
1133 self-test log failed.
1134 FailedOpenDevice: the open() command to the device failed.
1135
1136 SMARTD_ADDRESS
1137 is determined by the address argument ADD of the ´-m´ Direc‐
1138 tive. If ADD is <nomailer>, then SMARTD_ADDRESS is not set.
1139 Otherwise, it is set to the comma-separated-list of email
1140 addresses given by the argument ADD, with the commas
1141 replaced by spaces (example:admin@example.com root). If
1142 more than one email address is given, then this string will
1143 contain space characters and is NOT quoted, so to use it in
1144 a bash script you may want to enclose it in double quotes.
1145
1146 SMARTD_MESSAGE
1147 is set to the one sentence summary warning email message
1148 string from smartd. This message string contains space
1149 characters and is NOT quoted. So to use $SMARTD_MESSAGE in a
1150 bash script you should probably enclose it in double quotes.
1151
1152 SMARTD_FULLMESSAGE
1153 is set to the contents of the entire email warning message
1154 string from smartd. This message string contains space and
1155 return characters and is NOT quoted. So to use
1156 $SMARTD_FULLMESSAGE in a bash script you should probably
1157 enclose it in double quotes.
1158
1159 SMARTD_TFIRST
1160 is a text string giving the time and date at which the first
1161 problem of this type was reported. This text string contains
1162 space characters and no newlines, and is NOT quoted. For
1163 example:
1164 Sun Feb 9 14:58:19 2003 CST
1165
1166 SMARTD_TFIRSTEPOCH
1167 is an integer, which is the unix epoch (number of seconds
1168 since Jan 1, 1970) for SMARTD_TFIRST.
1169
1170 The shell which is used to run PATH is system-dependent. For
1171 vanilla Linux/glibc it´s bash. For other systems, the man page
1172 for popen(3) should say what shell is used.
1173
1174 If the ´-m ADD´ Directive is given with a normal address argu‐
1175 ment, then the executable pointed to by PATH will be run in a
1176 shell with STDIN receiving the body of the email message, and
1177 with the same command-line arguments:
1178 -s "$SMARTD_SUBJECT" $SMARTD_ADDRESS
1179 that would normally be provided to ´mail´. Examples include:
1180 -m user@home -M exec /bin/mail
1181 -m admin@work -M exec /usr/local/bin/mailto
1182 -m root -M exec /Example_1/bash/script/below
1183
1184 Note that on Windows, the syntax of the ´Blat´ mailer is used:
1185 - -q -subject "$SMARTD_SUBJECT" -to "$SMARTD_ADDRESS"
1186
1187 If the ´-m ADD´ Directive is given with the special address
1188 argument <nomailer> then the executable pointed to by PATH is
1189 run in a shell with no STDIN and no command-line arguments, for
1190 example:
1191 -m <nomailer> -M exec /Example_2/bash/script/below
1192 If the executable produces any STDERR/STDOUT output, then smartd
1193 assumes that something is going wrong, and a snippet of that
1194 output will be copied to SYSLOG. The remainder of the output is
1195 then discarded.
1196
1197 Some EXAMPLES of scripts that can be used with the ´-M exec´
1198 Directive are given below. Some sample scripts are also included
1199 in /usr/share/doc/smartmontools/examplescripts/.
1200
1201 -f Check for ´failure´ of any Usage Attributes. If these
1202 Attributes are less than or equal to the threshold, it does NOT
1203 indicate imminent disk failure. It "indicates an advisory con‐
1204 dition where the usage or age of the device has exceeded its
1205 intended design life period." [Please see the smartctl -A com‐
1206 mand-line option.]
1207
1208 -p Report anytime that a Prefail Attribute has changed its value
1209 since the last check, 30 minutes ago. [Please see the smartctl
1210 -A command-line option.]
1211
1212 -u Report anytime that a Usage Attribute has changed its value
1213 since the last check, 30 minutes ago. [Please see the smartctl
1214 -A command-line option.]
1215
1216 -t Equivalent to turning on the two previous flags ´-p´ and ´-u´.
1217 Tracks changes in all device Attributes (both Prefailure and
1218 Usage). [Please see the smartctl -A command-line option.]
1219
1220 -i ID Ignore device Attribute number ID when checking for failure of
1221 Usage Attributes. ID must be a decimal integer in the range
1222 from 1 to 255. This Directive modifies the behavior of the ´-f´
1223 Directive and has no effect without it.
1224
1225 This is useful, for example, if you have a very old disk and
1226 don´t want to keep getting messages about the hours-on-lifetime
1227 Attribute (usually Attribute 9) failing. This Directive may
1228 appear multiple times for a single device, if you want to ignore
1229 multiple Attributes.
1230
1231 -I ID Ignore device Attribute ID when tracking changes in the
1232 Attribute values. ID must be a decimal integer in the range
1233 from 1 to 255. This Directive modifies the behavior of the
1234 ´-p´, ´-u´, and ´-t´ tracking Directives and has no effect with‐
1235 out one of them.
1236
1237 This is useful, for example, if one of the device Attributes is
1238 the disk temperature (usually Attribute 194 or 231). It´s annoy‐
1239 ing to get reports each time the temperature changes. This
1240 Directive may appear multiple times for a single device, if you
1241 want to ignore multiple Attributes.
1242
1243 -r ID[!]
1244 When tracking, report the Raw value of Attribute ID along with
1245 its (normally reported) Normalized value. ID must be a decimal
1246 integer in the range from 1 to 255. This Directive modifies the
1247 behavior of the ´-p´, ´-u´, and ´-t´ tracking Directives and has
1248 no effect without one of them. This Directive may be given mul‐
1249 tiple times.
1250
1251 A common use of this Directive is to track the device Tempera‐
1252 ture (often ID=194 or 231).
1253
1254 If the optional flag ´!´ is appended, a change of the Normalized
1255 value is considered critical. The report will be logged as
1256 LOG_CRIT and a warning email will be sent if ´-m´ is specified.
1257
1258 -R ID[!]
1259 When tracking, report whenever the Raw value of Attribute ID
1260 changes. (Normally smartd only tracks/reports changes of the
1261 Normalized Attribute values.) ID must be a decimal integer in
1262 the range from 1 to 255. This Directive modifies the behavior
1263 of the ´-p´, ´-u´, and ´-t´ tracking Directives and has no
1264 effect without one of them. This Directive may be given multi‐
1265 ple times.
1266
1267 If this Directive is given, it automatically implies the ´-r´
1268 Directive for the same Attribute, so that the Raw value of the
1269 Attribute is reported.
1270
1271 A common use of this Directive is to track the device Tempera‐
1272 ture (often ID=194 or 231). It is also useful for understanding
1273 how different types of system behavior affects the values of
1274 certain Attributes.
1275
1276 If the optional flag ´!´ is appended, a change of the Raw value
1277 is considered critical. The report will be logged as LOG_CRIT
1278 and a warning email will be sent if ´-m´ is specified. An exam‐
1279 ple is ´-R 5!´ to warn when new sectors are reallocated.
1280
1281 -C ID[+]
1282 [ATA only] Report if the current number of pending sectors is
1283 non-zero. Here ID is the id number of the Attribute whose raw
1284 value is the Current Pending Sector count. The allowed range of
1285 ID is 0 to 255 inclusive. To turn off this reporting, use
1286 ID = 0. If the -C ID option is not given, then it defaults to
1287 -C 197 (since Attribute 197 is generally used to monitor pending
1288 sectors). If the name of this Attribute is changed by a ´-v
1289 197,FORMAT,NAME´ directive, the default is changed to -C 0.
1290
1291 If ´+´ is specified, a report is only printed if the number of
1292 sectors has increased between two check cycles. Some disks do
1293 not reset this attribute when a bad sector is reallocated. See
1294 also ´-v 197,increasing´ below.
1295
1296 A pending sector is a disk sector (containing 512 bytes of your
1297 data) which the device would like to mark as ``bad" and reallo‐
1298 cate. Typically this is because your computer tried to read
1299 that sector, and the read failed because the data on it has been
1300 corrupted and has inconsistent Error Checking and Correction
1301 (ECC) codes. This is important to know, because it means that
1302 there is some unreadable data on the disk. The problem of fig‐
1303 uring out what file this data belongs to is operating system and
1304 file system specific. You can typically force the sector to
1305 reallocate by writing to it (translation: make the device sub‐
1306 stitute a spare good sector for the bad one) but at the price of
1307 losing the 512 bytes of data stored there.
1308
1309 -U ID[+]
1310 [ATA only] Report if the number of offline uncorrectable sectors
1311 is non-zero. Here ID is the id number of the Attribute whose
1312 raw value is the Offline Uncorrectable Sector count. The
1313 allowed range of ID is 0 to 255 inclusive. To turn off this
1314 reporting, use ID = 0. If the -U ID option is not given, then
1315 it defaults to -U 198 (since Attribute 198 is generally used to
1316 monitor offline uncorrectable sectors). If the name of this
1317 Attribute is changed by a ´-v 198,FORMAT,NAME´ (except ´-v
1318 198,FORMAT,Offline_Scan_UNC_SectCt´), directive, the default is
1319 changed to -U 0.
1320
1321 If ´+´ is specified, a report is only printed if the number of
1322 sectors has increased since the last check cycle. Some disks do
1323 not reset this attribute when a bad sector is reallocated. See
1324 also ´-v 198,increasing´ below.
1325
1326 An offline uncorrectable sector is a disk sector which was not
1327 readable during an off-line scan or a self-test. This is impor‐
1328 tant to know, because if you have data stored in this disk sec‐
1329 tor, and you need to read it, the read will fail. Please see
1330 the previous ´-C´ option for more details.
1331
1332 -W DIFF[,INFO[,CRIT]]
1333 Report if the current temperature had changed by at least DIFF
1334 degrees since last report, or if new min or max temperature is
1335 detected. Report or Warn if the temperature is greater or equal
1336 than one of INFO or CRIT degrees Celsius. If the limit CRIT is
1337 reached, a message with loglevel ´LOG_CRIT´ will be logged to
1338 syslog and a warning email will be send if '-m' is specified. If
1339 only the limit INFO is reached, a message with loglevel
1340 ´LOG_INFO´ will be logged.
1341
1342 If this directive is used in conjunction with state persistence
1343 (´-s´ option), the min and max temperature values are preserved
1344 across boot cycles. The minimum temperature value is not updated
1345 during the first 30 minutes after startup.
1346
1347 To disable any of the 3 reports, set the corresponding limit to
1348 0. Trailing zero arguments may be omitted. By default, all tem‐
1349 perature reports are disabled (´-W 0´).
1350
1351 To track temperature changes of at least 2 degrees, use:
1352 -W 2
1353 To log informal messages on temperatures of at least 40 degrees,
1354 use:
1355 -W 0,40
1356 For warning messages/mails on temperatures of at least 45
1357 degrees, use:
1358 -W 0,0,45
1359 To combine all of the above reports, use:
1360 -W 2,40,45
1361
1362 For ATA devices, smartd interprets Attribute 194 as Temperature
1363 Celsius by default. This can be changed to Attribute 9 or 220 by
1364 the drive database or by the ´-v´ directive, see below.
1365
1366 -F TYPE
1367 [ATA only] Modifies the behavior of smartd to compensate for
1368 some known and understood device firmware bug. The arguments to
1369 this Directive are exclusive, so that only the final Directive
1370 given is used. The valid values are:
1371
1372 none - Assume that the device firmware obeys the ATA specifica‐
1373 tions. This is the default, unless the device has presets for
1374 ´-F´ in the device database.
1375
1376 samsung - In some Samsung disks (example: model SV4012H Firmware
1377 Version: RM100-08) some of the two- and four-byte quantities in
1378 the SMART data structures are byte-swapped (relative to the ATA
1379 specification). Enabling this option tells smartd to evaluate
1380 these quantities in byte-reversed order. Some signs that your
1381 disk needs this option are (1) no self-test log printed, even
1382 though you have run self-tests; (2) very large numbers of ATA
1383 errors reported in the ATA error log; (3) strange and impossible
1384 values for the ATA error log timestamps.
1385
1386 samsung2 - In some Samsung disks the number of ATA errors
1387 reported is byte swapped. Enabling this option tells smartd to
1388 evaluate this quantity in byte-reversed order.
1389
1390 samsung3 - Some Samsung disks (at least SP2514N with Firmware
1391 VF100-37) report a self-test still in progress with 0% remaining
1392 when the test was already completed. If this directive is speci‐
1393 fied, smartd will not skip the next scheduled self-test (see
1394 Directive ´-s´ above) in this case.
1395
1396 Note that an explicit ´-F´ Directive will over-ride any preset
1397 values for ´-F´ (see the ´-P´ option below).
1398
1399
1400 [Please see the smartctl -F command-line option.]
1401
1402 -v ID,FORMAT[:BYTEORDER][,NAME]
1403 [ATA only] Sets a vendor-specific raw value print FORMAT, an
1404 optional BYTEORDER and an optional NAME for Attribute ID. This
1405 directive may be used multiple times. Please see smartctl -v
1406 command-line option for further details.
1407
1408 The following arguments affect smartd warning output:
1409
1410 197,increasing - Raw Attribute number 197 (Current Pending Sec‐
1411 tor Count) is not reset if uncorrectable sectors are reallo‐
1412 cated. This sets ´-C 197+´ if no other ´-C´ directive is speci‐
1413 fied.
1414
1415 198,increasing - Raw Attribute number 198 (Offline Uncorrectable
1416 Sector Count) is not reset if uncorrectable sector are reallo‐
1417 cated. This sets ´-U 198+´ if no other ´-U´ directive is speci‐
1418 fied.
1419
1420 -P TYPE
1421 Specifies whether smartd should use any preset options that are
1422 available for this drive. The valid arguments to this Directive
1423 are:
1424
1425 use - use any presets that are available for this drive. This
1426 is the default.
1427
1428 ignore - do not use any presets for this drive.
1429
1430 show - show the presets listed for this drive in the database.
1431
1432 showall - show the presets that are available for all drives and
1433 then exit.
1434
1435 [Please see the smartctl -P command-line option.]
1436
1437 -a Equivalent to turning on all of the following Directives: ´-H´
1438 to check the SMART health status, ´-f´ to report failures of
1439 Usage (rather than Prefail) Attributes, ´-t´ to track changes in
1440 both Prefailure and Usage Attributes, ´-l selftest´ to report
1441 increases in the number of Self-Test Log errors, ´-l error´ to
1442 report increases in the number of ATA errors, ´-C 197´ to report
1443 nonzero values of the current pending sector count, and ´-U 198´
1444 to report nonzero values of the offline pending sector count.
1445
1446 Note that -a is the default for ATA devices. If none of these
1447 other Directives is given, then -a is assumed.
1448
1449 # Comment: ignore the remainder of the line.
1450
1451 \ Continuation character: if this is the last non-white or non-
1452 comment character on a line, then the following line is a con‐
1453 tinuation of the current one.
1454
1455 If you are not sure which Directives to use, I suggest experimenting
1456 for a few minutes with smartctl to see what SMART functionality your
1457 disk(s) support(s). If you do not like voluminous syslog messages, a
1458 good choice of smartd configuration file Directives might be:
1459 -H -l selftest -l error -f.
1460 If you want more frequent information, use: -a.
1461
1462
1463 ADDITIONAL DETAILS ABOUT DEVICESCAN
1464 If a non-comment entry in the configuration file is the text
1465 string DEVICESCAN in capital letters, then smartd will ignore
1466 any remaining lines in the configuration file, and will scan for
1467 devices.
1468
1469 [NEW EXPERIMENTAL SMARTD FEATURE] Configuration entries for
1470 devices not found by the platform-specific device scanning may
1471 precede the DEVICESCAN entry.
1472
1473 If DEVICESCAN is not followed by any Directives, then smartd
1474 will scan for both ATA and SCSI devices, and will monitor all
1475 possible SMART properties of any devices that are found.
1476
1477 DEVICESCAN may optionally be followed by any valid Directives,
1478 which will be applied to all devices that are found in the scan.
1479 For example
1480 DEVICESCAN -m root@example.com
1481 will scan for all devices, and then monitor them. It will send
1482 one email warning per device for any problems that are found.
1483 DEVICESCAN -d ata -m root@example.com
1484 will do the same, but restricts the scan to ATA devices only.
1485 DEVICESCAN -H -d ata -m root@example.com
1486 will do the same, but only monitors the SMART health status of
1487 the devices, (rather than the default -a, which monitors all
1488 SMART properties).
1489
1490
1491 EXAMPLES OF SHELL SCRIPTS FOR ´-M exec´
1492 These are two examples of shell scripts that can be used with
1493 the ´-M exec PATH´ Directive described previously. The paths to
1494 these scripts and similar executables is the PATH argument to
1495 the ´-M exec PATH´ Directive.
1496
1497 Example 1: This script is for use with ´-m ADDRESS -M exec
1498 PATH´. It appends the output of smartctl -a to the output of
1499 the smartd email warning message and sends it to ADDRESS.
1500
1501 #! /bin/bash
1502
1503 # Save the email message (STDIN) to a file:
1504 cat > /root/msg
1505
1506 # Append the output of smartctl -a to the message:
1507 /usr/sbin/smartctl -a -d $SMART_DEVICETYPE $SMARTD_DEVICE >> /root/msg
1508
1509 # Now email the message to the user at address ADD:
1510 /bin/mail -s "$SMARTD_SUBJECT" $SMARTD_ADDRESS < /root/msg
1511
1512 Example 2: This script is for use with ´-m <nomailer> -M exec
1513 PATH´. It warns all users about a disk problem, waits 30 sec‐
1514 onds, and then powers down the machine.
1515
1516 #! /bin/bash
1517
1518 # Warn all users of a problem
1519 wall ´Problem detected with disk: ´ "$SMARTD_DEVICESTRING"
1520 wall ´Warning message from smartd is: ´ "$SMARTD_MESSAGE"
1521 wall ´Shutting down machine in 30 seconds... ´
1522
1523 # Wait half a minute
1524 sleep 30
1525
1526 # Power down the machine
1527 /sbin/shutdown -hf now
1528
1529 Some example scripts are distributed with the smartmontools
1530 package, in /usr/share/doc/smartmontools/examplescripts/.
1531
1532 Please note that these scripts typically run as root, so any
1533 files that they read/write should not be writable by ordinary
1534 users or reside in directories like /tmp that are writable by
1535 ordinary users and may expose your system to symlink attacks.
1536
1537 As previously described, if the scripts write to STDOUT or
1538 STDERR, this is interpreted as indicating that there was an
1539 internal error within the script, and a snippet of STDOUT/STDERR
1540 is logged to SYSLOG. The remainder is flushed.
1541
1542
1543
1545 smartd will make log entries at loglevel LOG_INFO if the Normalized
1546 SMART Attribute values have changed, as reported using the ´-t´, ´-p´,
1547 or ´-u´ Directives. For example:
1548 ´Device: /dev/hda, SMART Attribute: 194 Temperature_Celsius changed from 94 to 93´
1549 Note that in this message, the value given is the ´Normalized´ not the
1550 ´Raw´ Attribute value (the disk temperature in this case is about 22
1551 Celsius). The ´-R´ and ´-r´ Directives modify this behavior, so that
1552 the information is printed with the Raw values as well, for example:
1553 ´Device: /dev/hda, SMART Attribute: 194 Temperature_Celsius changed from 94 [Raw 22] to 93 [Raw 23]´
1554 Here the Raw values are the actual disk temperatures in Celsius. The
1555 way in which the Raw values are printed, and the names under which the
1556 Attributes are reported, is governed by the various ´-v Num,Descrip‐
1557 tion´ Directives described previously.
1558
1559 Please see the smartctl manual page for further explanation of the dif‐
1560 ferences between Normalized and Raw Attribute values.
1561
1562 smartd will make log entries at loglevel LOG_CRIT if a SMART Attribute
1563 has failed, for example:
1564 ´Device: /dev/hdc, Failed SMART Attribute: 5 Reallocated_Sector_Ct´
1565 This loglevel is used for reporting enabled by the ´-H´, -f´,
1566 ´-l selftest´, and ´-l error´ Directives. Entries reporting failure of
1567 SMART Prefailure Attributes should not be ignored: they mean that the
1568 disk is failing. Use the smartctl utility to investigate.
1569
1570 Under Solaris with the default /etc/syslog.conf configuration, messages
1571 below loglevel LOG_NOTICE will not be recorded. Hence all smartd mes‐
1572 sages with loglevel LOG_INFO will be lost. If you want to use the
1573 existing daemon facility to log all messages from smartd, you should
1574 change /etc/syslog.conf from:
1575 ...;daemon.notice;... /var/adm/messages
1576 to read:
1577 ...;daemon.info;... /var/adm/messages
1578 Alternatively, you can use a local facility to log messages: please see
1579 the smartd '-l' command-line option described above.
1580
1581 On Cygwin and Windows, the log messages are written to the event log or
1582 to a file. See documentation of the '-l FACILITY' option above for
1583 details.
1584
1585 On Windows, the following built-in commands can be used to control
1586 smartd, if running as a daemon:
1587
1588 ´smartd status´ - check status
1589
1590 ´smartd stop´ - stop smartd
1591
1592 ´smartd reload´ - reread config file
1593
1594 ´smartd restart´ - restart smartd
1595
1596 ´smartd sigusr1´ - check disks now
1597
1598 ´smartd sigusr2´ - toggle debug mode
1599
1600 On WinNT4/2000/XP, smartd can also be run as a Windows service:
1601
1602
1603 The Cygwin Version of smartd can be run as a service via the cygrunsrv
1604 tool. The start-up script provides Cygwin-specific commands to install
1605 and remove the service:
1606 /etc/rc.d/init.d/smartd install [options]
1607 /etc/rc.d/init.d/smartd remove
1608 The service can be started and stopped by the start-up script as usual
1609 (see EXAMPLES above).
1610
1611
1612 The Windows Version of smartd has buildin support for services:
1613
1614 ´smartd install [options]´ installs a service named "smartd" (display
1615 name "SmartD Service") using the command line ´/installpath/smartd.exe
1616 --service [options]´.
1617
1618 ´smartd remove´ can later be used to remove the service entry from reg‐
1619 istry.
1620
1621 Upon startup, the smartd service changes the working directory to its
1622 own installation path. If smartd.conf and blat.exe are stored in this
1623 directory, no ´-c´ option and ´-M exec´ directive is needed.
1624
1625 The debug mode (´-d´, ´-q onecheck´) does not work if smartd is running
1626 as service.
1627
1628 The service can be controlled as usual with Windows commands ´net´ or
1629 ´sc´ (´net start smartd´, ´net stop smartd´).
1630
1631 Pausing the service (´net pause smartd´) sets the interval between disk
1632 checks (´-i N´) to infinite.
1633
1634 Continuing the paused service (´net continue smartd´) resets the inter‐
1635 val and rereads the configuration file immediately (like SIGHUP):
1636
1637 Continuing a still running service (´net continue smartd´ without pre‐
1638 ceding ´net pause smartd´) does not reread configuration but checks
1639 disks immediately (like SIGUSR1).
1640
1641
1643 When smartd makes log entries, these are time-stamped. The time stamps
1644 are in the computer's local time zone, which is generally set using
1645 either the environment variable ´TZ´ or using a time-zone file such as
1646 /etc/localtime. You may wish to change the timezone while smartd is
1647 running (for example, if you carry a laptop to a new time-zone and
1648 don't reboot it). Due to a bug in the tzset(3) function of many unix
1649 standard C libraries, the time-zone stamps of smartd might not change.
1650 For some systems, smartd will work around this problem if the time-zone
1651 is set using /etc/localtime. The work-around fails if the time-zone is
1652 set using the ´TZ´ variable (or a file that it points to).
1653
1654
1655
1657 The return value (exit status) of smartd can have the following values:
1658
1659 0: Daemon startup successful, or smartd was killed by a SIGTERM (or
1660 in debug mode, a SIGQUIT).
1661
1662 1: Commandline did not parse.
1663
1664 2: There was a syntax error in the config file.
1665
1666 3: Forking the daemon failed.
1667
1668 4: Couldn´t create PID file.
1669
1670 5: Config file does not exist (only returned in conjunction with
1671 the ´-c´ option).
1672
1673 6: Config file exists, but cannot be read.
1674
1675 8: smartd ran out of memory during startup.
1676
1677 9: A compile time constant of smartd was too small. This can be
1678 caused by an excessive number of disks, or by lines in
1679 /etc/smartd.conf that are too long. Please report this problem
1680 to smartmontools-support@lists.sourceforge.net.
1681
1682 10 An inconsistency was found in smartd´s internal data structures.
1683 This should never happen. It must be due to either a coding or
1684 compiler bug. Please report such failures to smartmontools-sup‐
1685 port@lists.sourceforge.net.
1686
1687 16: A device explicitly listed in /etc/smartd.conf can´t be moni‐
1688 tored.
1689
1690 17: smartd didn´t find any devices to monitor.
1691
1692 254: When in daemon mode, smartd received a SIGINT or SIGQUIT. (Note
1693 that in debug mode, SIGINT has the same effect as SIGHUP, and
1694 makes smartd reload its configuration file. SIGQUIT has the same
1695 effect as SIGTERM and causes smartd to exit with zero exit sta‐
1696 tus.
1697
1698 132 and above
1699 smartd was killed by a signal that is not explicitly listed
1700 above. The exit status is then 128 plus the signal number. For
1701 example if smartd is killed by SIGKILL (signal 9) then the exit
1702 status is 137.
1703
1704
1706 Bruce Allen smartmontools-support@lists.sourceforge.net
1707 University of Wisconsin - Milwaukee Physics Department
1708
1709
1711 The following have made large contributions to smartmontools:
1712 Casper Dik (Solaris SCSI interface)
1713 Christian Franke (Windows interface, C++ redesign, USB support, ...)
1714 Douglas Gilbert (SCSI subsystem)
1715 Guido Guenther (Autoconf/Automake packaging)
1716 Geoffrey Keating (Darwin ATA interface)
1717 Eduard Martinescu (FreeBSD interface)
1718 Frederic L. W. Meunier (Web site and Mailing list)
1719 Gabriele Pohl (Web site and Wiki, conversion from CVS to SVN)
1720 Keiji Sawada (Solaris ATA interface)
1721 Manfred Schwarb (Drive database)
1722 Sergey Svishchev (NetBSD interface)
1723 David Snyder and Sergey Svishchev (OpenBSD interface)
1724 Phil Williams (User interface and drive database)
1725 Shengfeng Zhou (Linux/FreeBSD HighPoint RocketRAID interface)
1726 Many other individuals have made smaller contributions and corrections.
1727
1728
1730 This code was derived from the smartsuite package, written by Michael
1731 Cornwell, and from the previous UCSC smartsuite package. It extends
1732 these to cover ATA-5 disks. This code was originally developed as a
1733 Senior Thesis by Michael Cornwell at the Concurrent Systems Laboratory
1734 (now part of the Storage Systems Research Center), Jack Baskin School
1735 of Engineering, University of California, Santa Cruz.
1736 http://ssrc.soe.ucsc.edu/ .
1737
1739 Please see the following web site for updates, further documentation,
1740 bug reports and patches: http://smartmontools.sourceforge.net/
1741
1742
1744 smartd.conf(5), smartctl(8), syslogd(8), syslog.conf(5), badblocks(8),
1745 ide-smart(8), regex(7).
1746
1747
1749 An introductory article about smartmontools is Monitoring Hard Disks
1750 with SMART, by Bruce Allen, Linux Journal, January 2004, pages 74-77.
1751 This is http://www.linuxjournal.com/article/6983 online.
1752
1753 If you would like to understand better how SMART works, and what it
1754 does, a good place to start is with Sections 4.8 and 6.54 of the first
1755 volume of the ´AT Attachment with Packet Interface-7´ (ATA/ATAPI-7)
1756 specification Revision 4b. This documents the SMART functionality
1757 which the smartmontools utilities provide access to. This and other
1758 versions of this Specification are available from the T13 web site
1759 http://www.t13.org/ .
1760
1761 The functioning of SMART was originally defined by the SFF-8035i revi‐
1762 sion 2 and the SFF-8055i revision 1.4 specifications. These are publi‐
1763 cations of the Small Form Factors (SFF) Committee.
1764
1765 Links to these and other documents may be found on the Links page of
1766 the smartmontools Wiki at http://sourceforge.net/apps/trac/smartmon‐
1767 tools/wiki/Links .
1768
1769
1771 $Id: smartd.8.in 3186 2010-10-16 13:09:11Z chrfranke $
1772
1773
1774
1775smartmontools-5.40 2010-10-16 SMARTD(8)