2 Copyright (C) 2002-10 Bruce Allen
3 Copyright (C) 2004-17 Christian Franke
5 $Id: smartd.8.in 4576 2017-10-29 16:41:44Z chrfranke $
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 You should have received a copy of the GNU General Public License
13 (for example COPYING); If not, see <http://www.gnu.org/licenses/>.
15 This code was originally developed as a Senior Thesis by Michael Cornwell
16 at the Concurrent Systems Laboratory (now part of the Storage Systems
17 Research Center), Jack Baskin School of Engineering, University of
18 California, Santa Cruz. http://ssrc.soe.ucsc.edu/
21 .\" Macros borrowed from pages generated with Pod::Man
22 .de Sp \" Vertical space (when we can't use .PP)
26 .de Vb \" Begin verbatim text
31 .de Ve \" End verbatim text
35 .\" Use groff extension \(aq (apostrophe quote, ASCII 0x27) if possible
38 .TH SMARTD 8 "CURRENT_SVN_DATE" "CURRENT_SVN_VERSION" "SMART Monitoring Tools"
40 \fBsmartd\fP \- SMART Disk Monitoring Daemon
47 .\"! [This man page is generated for the OS_MAN_FILTER version of smartmontools.
48 .\"! It does not contain info specific to other platforms.]
51 \fBsmartd\fP is a daemon that monitors the Self-Monitoring, Analysis and
52 Reporting Technology (SMART) system built into most ATA/SATA and SCSI/SAS
53 hard drives and solid-state drives.
54 The purpose of SMART is to monitor the reliability of the hard drive
55 and predict drive failures, and to carry out different types of drive
57 This version of \fBsmartd\fP is compatible with
58 ACS-3, ACS-2, ATA8-ACS, ATA/ATAPI-7 and earlier standards
59 (see \fBREFERENCES\fP below).
61 \fBsmartd\fP will attempt to enable SMART monitoring on ATA devices
62 (equivalent to \fBsmartctl \-s on\fP) and polls these and SCSI devices
63 every 30 minutes (configurable), logging SMART errors and changes of
64 SMART Attributes via the SYSLOG interface. The default location for
65 these SYSLOG notifications and warnings is system-dependent
66 (typically \fB/var/log/messages\fP or \fB/var/log/syslog\fP).
67 To change this default location, please see the \*(Aq\-l\*(Aq
68 command-line option described below.
70 In addition to logging to a file, \fBsmartd\fP can also be configured
71 to send email warnings if problems are detected. Depending upon the
72 type of problem, you may want to run self-tests on the disk, back up
73 the disk, replace the disk, or use a manufacturer's utility to force
74 reallocation of bad or unreadable disk sectors. If disk problems are
75 detected, please see the \fBsmartctl\fP manual page and the
76 \fBsmartmontools\fP web page/FAQ for further guidance.
78 If you send a \fBUSR1\fP signal to \fBsmartd\fP it will immediately
79 check the status of the disks, and then return to polling the disks
81 See the \*(Aq\-i\*(Aq option below for additional details.
83 \fBsmartd\fP can be configured at start-up using the configuration
84 file \fB/usr/local/etc/smartd.conf\fP (Windows: \fBEXEDIR/smartd.conf\fP).
85 If the configuration file is subsequently modified, \fBsmartd\fP
86 can be told to re-read the configuration file by sending it a
87 \fBHUP\fP signal, for example with the command:
89 \fBkillall \-HUP smartd\fP.
92 (Windows: See NOTES below.)
95 On startup, if \fBsmartd\fP finds a syntax error in the configuration
96 file, it will print an error message and then exit. However if
97 \fBsmartd\fP is already running, then is told with a \fBHUP\fP signal
98 to re-read the configuration file, and then find a syntax error in
99 this file, it will print an error message and then continue, ignoring
100 the contents of the (faulty) configuration file, as if the \fBHUP\fP
101 signal had never been received.
103 When \fBsmartd\fP is running in debug mode, the \fBINT\fP signal
104 (normally generated from a shell with CONTROL-C) is treated in the
105 same way as a \fBHUP\fP signal: it makes \fBsmartd\fP reload its
107 To exit \fBsmartd\fP use CONTROL-\e.
109 (Windows: CONTROL-Break).
110 .\" %ENDIF OS Windows
112 On startup, in the absence of the configuration file
113 \fB/usr/local/etc/smartd.conf\fP, the \fBsmartd\fP daemon first scans for all
114 devices that support SMART. The scanning is done as follows:
117 Examine all entries \fB"/dev/hd[a\-t]"\fP for IDE/ATA
118 devices, and \fB"/dev/sd[a\-z]"\fP, \fB"/dev/sd[a\-c][a\-z]"\fP
119 for ATA/SATA or SCSI/SAS devices.
120 Disks behind RAID controllers are not included.
122 [NEW EXPERIMENTAL SMARTD FEATURE]
123 If directive \*(Aq\-d nvme\*(Aq
124 .\" %IF ENABLE_NVME_DEVICESCAN
125 or no \*(Aq\-d\*(Aq directive
126 .\" %ENDIF ENABLE_NVME_DEVICESCAN
127 is specified, examine all entries \fB"/dev/nvme[0\-99]"\fP for NVMe devices.
131 Authoritative list of disk devices is obtained from SCSI (CAM) and ATA
133 Disks behind RAID controllers are not included.
134 .\" %ENDIF OS FreeBSD
135 .\" %IF OS NetBSD OpenBSD
136 .IP \fBNETBSD/OPENBSD:\fP 9
137 Authoritative list of disk devices is obtained from sysctl
138 \*(Aqhw.disknames\*(Aq.
139 .\" %ENDIF OS NetBSD OpenBSD
142 Examine all entries \fB"/dev/rdsk/*s0"\fP for IDE/ATA and SCSI disk
143 devices, and entries \fB"/dev/rmt/*"\fP for SCSI tape devices.
144 .\" %ENDIF OS Solaris
147 The IOService plane is scanned for ATA block storage devices.
149 .\" %IF OS Windows Cygwin
151 Examine all entries \fB"/dev/sd[a\-z]"\fP, \fB"/dev/sd[a\-c][a\-z]"\fP
152 and \fB"/dev/sdd[a\-x]"\fP ("\\\\.\\PhysicalDrive[0\-127]") for
153 IDE/(S)ATA and SCSI disk devices.
155 If a 3ware 9000 controller is installed, examine all entries
156 \fB"/dev/sdX,N"\fP for the first logical drive (\*(Aqunit\*(Aq
157 \fB"/dev/sdX"\fP) and all physical disks (\*(Aqports\*(Aq \fB",N"\fP)
158 detected behind this controller.
159 Same for a second controller if present.
161 If directive \*(Aq\-d csmi\*(Aq or no \*(Aq\-d\*(Aq directive is specified,
162 examine all entries \fB"/dev/csmi[0\-9],N"\fP for drives behind an Intel
163 ICHxR controller with RST driver.
165 Disks behind Areca RAID controllers are not included.
167 [NEW EXPERIMENTAL SMARTD FEATURE]
168 If directive \*(Aq\-d nvme\*(Aq
169 .\" %IF ENABLE_NVME_DEVICESCAN
170 or no \*(Aq\-d\*(Aq directive
171 .\" %ENDIF ENABLE_NVME_DEVICESCAN
172 is specified, examine all entries \fB"/dev/sd[...]"\fP (see above)
173 and all entries \fB"/dev/nvme[0\-9]"\fP for NVMe devices.
174 .\" %ENDIF OS Windows Cygwin
176 \fBsmartd\fP then monitors
177 for \fIall\fP possible SMART errors (corresponding to the \*(Aq\-a\*(Aq
178 Directive in the configuration file; see the \fBsmartd.conf\fP(5) man page).
182 .B \-A PREFIX, \-\-attributelog=PREFIX
183 Writes \fBsmartd\fP attribute information (normalized and raw
184 attribute values) to files \*(AqPREFIX\*(Aq\*(AqMODEL\-SERIAL.ata.csv\*(Aq
185 or \*(AqPREFIX\*(Aq\*(AqVENDOR\-MODEL\-SERIAL.scsi.csv\*(Aq.
186 At each check cycle attributes are logged as a line of semicolon separated
187 triplets of the form "attribute-ID;attribute-norm-value;attribute-raw-value;".
188 For SCSI devices error counters and temperature recorded in the form
189 "counter-name;counter-value;".
190 Each line is led by a date string of the form "yyyy-mm-dd HH:MM:SS" (in UTC).
192 .\" %IF ENABLE_ATTRIBUTELOG
193 If this option is not specified, attribute information is written to files
194 \*(Aq/usr/local/var/lib/smartmontools/attrlog.MODEL\-SERIAL.ata.csv\*(Aq.
195 To disable attribute log files, specify this option with an empty string
196 argument: \*(Aq\-A ""\*(Aq.
197 .\" %ENDIF ENABLE_ATTRIBUTELOG
198 MODEL and SERIAL are build from drive identify information, invalid
199 characters are replaced by underline.
201 If the PREFIX has the form \*(Aq/path/dir/\*(Aq (e.g.\&
202 \*(Aq/var/lib/smartd/\*(Aq), then files \*(AqMODEL\-SERIAL.ata.csv\*(Aq are
203 created in directory \*(Aq/path/dir\*(Aq.
204 If the PREFIX has the form \*(Aq/path/name\*(Aq (e.g.\&
205 \*(Aq/var/lib/misc/attrlog\-\*(Aq),
206 then files \*(AqnameMODEL\-SERIAL.ata.csv\*(Aq are created in directory
208 The path must be absolute, except if debug mode is enabled.
210 .B \-B [+]FILE, \-\-drivedb=[+]FILE
211 [ATA only] Read the drive database from FILE. The new database replaces
212 the built in database by default. If \*(Aq+\*(Aq is specified, then the new
213 entries prepend the built in entries.
214 Please see the \fBsmartctl\fP(8) man page for further details.
216 .B \-c FILE, \-\-configfile=FILE
217 Read \fBsmartd\fP configuration Directives from FILE, instead of from
218 the default location \fB/usr/local/etc/smartd.conf\fP
219 (Windows: \fBEXEDIR/smartd.conf\fP).
220 If FILE does \fBnot\fP exist, then \fBsmartd\fP will print an error
221 message and exit with nonzero status.
222 Thus, \*(Aq\-c /usr/local/etc/smartd.conf\*(Aq can be used to verify the
223 existence of the default configuration file.
225 By using \*(Aq\-\*(Aq for FILE, the configuration is read from standard input.
226 This is useful for commands like:
228 .B echo /dev/sdb \-m user@home \-M test | smartd \-c \- \-q onecheck
230 to perform quick and simple checks without a configuration file.
231 .\" %IF ENABLE_CAPABILITIES
233 .B \-C, \-\-capabilities
234 [Linux only] Use libcap-ng to drop unneeded Linux process \fBcapabilities\fP(7).
235 The following capabilities are kept: CAP_SYS_ADMIN, CAP_SYS_RAWIO, CAP_MKNOD.
237 Warning: Mail notification does not work when used.
238 .\" %ENDIF ENABLE_CAPABILITIES
241 Runs \fBsmartd\fP in "debug" mode. In this mode, it displays status
242 information to STDOUT rather than logging it to SYSLOG and does not
243 \fBfork\fP(2) into the background and detach from the controlling
244 terminal. In this mode, \fBsmartd\fP also prints more verbose
245 information about what it is doing than when operating in "daemon"
246 mode. In this mode, the \fBINT\fP signal (normally generated from a
247 terminal with CONTROL-C) makes \fBsmartd\fP reload its configuration
248 file. Please use CONTROL-\e to exit
250 (Windows: CONTROL-Break).
252 [Windows only] The "debug" mode can be toggled by the command
253 \fBsmartd sigusr2\fP.
254 A new console for debug output is opened when debug mode is enabled.
255 .\" %ENDIF OS Windows
257 .B \-D, \-\-showdirectives
258 Prints a list (to STDOUT) of all the possible Directives which may
259 appear in the configuration file /usr/local/etc/smartd.conf, and then exits.
260 These Directives are described in the \fBsmartd.conf\fP(5) man page.
261 They may appear in the configuration file following the device name.
263 .B \-h, \-\-help, \-\-usage
264 Prints usage message to STDOUT and exits.
266 .B \-i N, \-\-interval=N
267 Sets the interval between disk checks to \fIN\fP seconds, where
268 \fIN\fP is a decimal integer. The minimum allowed value is ten and
269 the maximum is the largest positive integer that can be represented on
270 your system (often 2^31\-1). The default is 1800 seconds.
272 Note that the superuser can make \fBsmartd\fP check the status of the
273 disks at any time by sending it the \fBSIGUSR1\fP signal, for example
276 .B kill \-SIGUSR1 <pid>
278 where \fB<pid>\fP is the process id number of \fBsmartd\fP. One may
281 .B killall \-USR1 smartd
283 for the same purpose.
286 (Windows: See NOTES below.)
287 .\" %ENDIF OS Windows
289 .B \-l FACILITY, \-\-logfacility=FACILITY
290 Uses syslog facility FACILITY to log the messages from \fBsmartd\fP.
291 Here FACILITY is one of \fIlocal0\fP, \fIlocal1\fP, ..., \fIlocal7\fP,
292 or \fIdaemon\fP [default]. If this command-line option is not used,
293 then by default messages from \fBsmartd\fP are logged to the facility
296 If you would like to have \fBsmartd\fP messages logged somewhere other
297 than the default location, include (for example) \*(Aq\-l local3\*(Aq in its
298 start up argument list.
299 Tell the syslog daemon to log all messages from facility \fBlocal3\fP
300 to (for example) \*(Aq/var/log/smartd.log\*(Aq.
302 For more detailed information, please refer to the man pages for
303 the local syslog daemon, typically \fBsyslogd\fP(8), \fBsyslog-ng\fP(8)
304 or \fBrsyslogd\fP(8).
307 Cygwin: If no \fBsyslogd\fP is running, the \*(Aq\-l\*(Aq option has no effect.
308 In this case, all \fBsyslog\fP messages are written to Windows event log.
312 Windows: Some \fBsyslog\fP functionality is implemented
313 internally in \fBsmartd\fP as follows: If no \*(Aq\-l\*(Aq option
314 (or \*(Aq\-l daemon\*(Aq) is specified, messages are written to Windows
315 event log or to file \fB./smartd.log\fP if event log is not available
317 By specifying other values of FACILITY, log output is redirected as follows:
318 \*(Aq\-l local0\*(Aq to file \fB./smartd.log\fP,
319 \*(Aq\-l local1\*(Aq to standard output (redirect with \*(Aq>\*(Aq to any file),
320 \*(Aq\-l local2\*(Aq to standard error,
321 \*(Aq\-l local[3\-7]\*(Aq: to file \fB./smartd[1\-5].log\fP.
322 .\" %ENDIF OS Windows
325 Do not fork into background; this is useful when executed from modern
326 init methods like initng, minit, supervise or systemd.
329 On Cygwin, this allows running \fBsmartd\fP as service via cygrunsrv,
334 On Windows, this option is not available, use \*(Aq\-\-service\*(Aq instead.
335 .\" %ENDIF OS Windows
337 .B \-p NAME, \-\-pidfile=NAME
338 Writes pidfile \fINAME\fP containing the \fBsmartd\fP Process ID
339 number (PID). To avoid symlink attacks make sure the directory to
340 which pidfile is written is only writable for root. Without this
341 option, or if the \-\-debug option is given, no PID file is written on
342 startup. If \fBsmartd\fP is killed with a maskable signal then the
345 .B \-q WHEN, \-\-quit=WHEN
346 Specifies when, if ever, \fBsmartd\fP should exit. The valid
347 arguments are to this option are:
350 \- Exit if there are no devices to monitor, or if any errors are found
351 at startup in the configuration file. This is the default.
354 \- Exit if there are no devices to monitor, or if any errors are found
355 in the configuration file /usr/local/etc/smartd.conf at startup or whenever it
359 \- Exit if there are no devices to monitor at startup. But continue
360 to run if no devices are found whenever the configuration file is
364 \- Only exit if a fatal error occurs (no remaining system memory,
365 invalid command line arguments). In this mode, even if there are no
366 devices to monitor, or if the configuration file
367 \fB/usr/local/etc/smartd.conf\fP has errors, \fBsmartd\fP will continue to run,
368 waiting to load a configuration file listing valid devices.
371 \- Start \fBsmartd\fP in debug mode, then register devices, then check
372 device's SMART status once, and then exit with zero exit status if all
373 of these steps worked correctly.
375 This last option is intended for \*(Aqdistribution-writers\*(Aq who want to
376 create automated scripts to determine whether or not to automatically
377 start up \fBsmartd\fP after installing smartmontools. After starting
378 \fBsmartd\fP with this command-line option, the distribution's install
379 scripts should wait a reasonable length of time (say ten seconds). If
380 \fBsmartd\fP has not exited with zero status by that time, the script
381 should send \fBsmartd\fP a SIGTERM or SIGKILL and assume that
382 \fBsmartd\fP will not operate correctly on the host. Conversely, if
383 \fBsmartd\fP exits with zero status, then it is safe to run
384 \fBsmartd\fP in normal daemon mode. If \fBsmartd\fP is unable to
385 monitor any devices or encounters other problems then it will return
386 with non-zero exit status.
389 \- Start \fBsmartd\fP in debug mode, then register devices, then write
390 a list of future scheduled self tests to stdout, and then exit with zero
391 exit status if all of these steps worked correctly.
392 Device's SMART status is not checked.
394 This option is intended to test whether the \*(Aq\-s REGEX\*(Aq directives in
395 smartd.conf will have the desired effect. The output lists the next test
396 schedules, limited to 5 tests per type and device. This is followed by a
397 summary of all tests of each device within the next 90 days.
399 .B \-r TYPE, \-\-report=TYPE
400 Intended primarily to help
402 developers understand the behavior of
404 on non-conforming or poorly-conforming hardware. This option reports
407 transactions with the device. The option can be used multiple times.
408 When used just once, it shows a record of the ioctl() transactions
409 with the device. When used more than once, the detail of these ioctl()
410 transactions are reported in greater detail. The valid arguments to
414 \- report all ioctl() transactions.
417 \- report only ioctl() transactions with ATA devices.
420 \- report only ioctl() transactions with SCSI devices.
422 .\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
424 \- [NEW EXPERIMENTAL SMARTD FEATURE]
425 report only ioctl() transactions with NVMe devices.
427 .\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin
428 Any argument may include a positive integer to specify the level of
429 detail that should be reported. The argument should be followed by a
430 comma then the integer with no spaces. For example, \fIataioctl,2\fP
431 The default level is 1, so \*(Aq\-r ataioctl,1\*(Aq and
432 \*(Aq\-r ataioctl\*(Aq are equivalent.
434 .B \-s PREFIX, \-\-savestates=PREFIX
435 Reads/writes \fBsmartd\fP state information from/to files
436 \*(AqPREFIX\*(Aq\*(AqMODEL\-SERIAL.ata.state\*(Aq or
437 \*(AqPREFIX\*(Aq\*(AqVENDOR\-MODEL\-SERIAL.scsi.state\*(Aq.
438 This preserves SMART attributes, drive min and max temperatures (\-W directive),
439 info about last sent warning email
440 (\-m directive), and the time of next check of the self-test REGEXP
441 (\-s directive) across boot cycles.
443 .\" %IF ENABLE_SAVESTATES
444 If this option is not specified, state information is maintained in files
445 \*(Aq/usr/local/var/lib/smartmontools/smartd.MODEL\-SERIAL.ata.state\*(Aq
447 \*(Aq/usr/local/var/lib/smartmontools/smartd.VENDOR\-MODEL\-SERIAL.scsi.state\*(Aq
449 To disable state files, specify this option with an empty string
450 argument: \*(Aq\-s ""\*(Aq.
451 .\" %ENDIF ENABLE_SAVESTATES
452 MODEL and SERIAL are build from drive identify information, invalid
453 characters are replaced by underline.
455 If the PREFIX has the form \*(Aq/path/dir/\*(Aq (e.g.\&
456 \*(Aq/var/lib/smartd/\*(Aq), then files \*(AqMODEL\-SERIAL.ata.state\*(Aq are
457 created in directory \*(Aq/path/dir\*(Aq.
458 If the PREFIX has the form \*(Aq/path/name\*(Aq (e.g.\&
459 \*(Aq/var/lib/misc/smartd\-\*(Aq),
460 then files \*(AqnameMODEL\-SERIAL.ata.state\*(Aq are created in directory
462 The path must be absolute, except if debug mode is enabled.
464 The state information files are read on smartd startup. The files are
465 always (re)written after reading the configuration file, before rereading
466 the configuration file (SIGHUP), before smartd shutdown, and after a check
467 forced by SIGUSR1. After a normal check cycle, a file is only rewritten if
468 an important change (which usually results in a SYSLOG output) occurred.
470 .B \-w PATH, \-\-warnexec=PATH
471 Run the executable PATH instead of the default script when smartd
472 needs to send warning messages. PATH must point to an executable binary
474 The default script is
475 .\" %IF NOT OS Windows
476 \fB/usr/local/etc/smartd_warning.sh\fP.
477 .\" %ENDIF NOT OS Windows
479 (Windows: EXEDIR/smartd_warning.cmd)
482 .\"! \fBEXEDIR/smartd_warning.cmd\fP.
483 .\" %ENDIF OS Windows
487 [Windows only] Enables \fBsmartd\fP to run as a Windows service.
488 The option must be specified in the service command line as the first
490 It should not be used from console.
491 See NOTES below for details.
492 .\" %ENDIF OS Windows
494 .B \-V, \-\-version, \-\-license, \-\-copyright
495 Prints version, copyright, license, home page and SVN revision
496 information for your copy of \fBsmartd\fP to STDOUT and then exits.
501 Runs the daemon in forked mode. This is the normal way to run
503 Entries are logged to SYSLOG.
507 Run in foreground (debug) mode, checking the disk status
510 .B smartd \-q onecheck
512 Registers devices, and checks the status of the devices exactly
514 The exit status (the shell
516 variable) will be zero if all went well, and nonzero if no devices
517 were detected or some other problem was encountered.
518 .\" %IF ENABLE_INITSCRIPT
520 Note that \fBsmartmontools\fP provides a start-up script in
521 \fB/usr/local/etc/rc.d/init.d/smartd\fP which is responsible for starting and
522 stopping the daemon via the normal init interface. Using this script,
523 you can start \fBsmartd\fP by giving the command:
525 .B /usr/local/etc/rc.d/init.d/smartd start
527 and stop it by using the command:
529 .B /usr/local/etc/rc.d/init.d/smartd stop
530 .\" %ENDIF ENABLE_INITSCRIPT
533 The syntax of the \fBsmartd.conf\fP(5) file is discussed separately.
537 will make log entries at loglevel
539 if the Normalized SMART Attribute values have changed, as reported using the
540 .B \*(Aq\-t\*(Aq, \*(Aq\-p\*(Aq,
546 .B \*(AqDevice: /dev/sda, SMART Attribute: 194 Temperature_Celsius changed from 94 to 93\*(Aq
548 Note that in this message, the value given is the \*(AqNormalized\*(Aq not the
549 \*(AqRaw\*(Aq Attribute value (the disk temperature in this case is about 22
554 Directives modify this behavior, so that the information is printed
555 with the Raw values as well, for example:
557 .B \*(AqDevice: /dev/sda, SMART Attribute: 194 Temperature_Celsius changed from 94 [Raw 22] to 93 [Raw 23]\*(Aq
559 Here the Raw values are the actual disk temperatures in Celsius. The
560 way in which the Raw values are printed, and the names under which the
561 Attributes are reported, is governed by the various
562 .B \*(Aq\-v Num,Description\*(Aq
563 Directives described previously.
567 manual page for further explanation of the differences between
568 Normalized and Raw Attribute values.
571 will make log entries at loglevel
573 if a SMART Attribute has failed, for example:
575 .B \*(AqDevice: /dev/sdc, Failed SMART Attribute: 5 Reallocated_Sector_Ct\*(Aq
577 This loglevel is used for reporting enabled by the
578 .B \*(Aq\-H\*(Aq, \-f\*(Aq, \*(Aq\-l\ selftest\*(Aq,
580 .B \*(Aq\-l\ error\*(Aq
581 Directives. Entries reporting failure of SMART Prefailure Attributes
582 should not be ignored: they mean that the disk is failing. Use the
584 utility to investigate.
587 Under Solaris with the default \fB/etc/syslog.conf\fP configuration,
588 messages below loglevel \fBLOG_NOTICE\fP will \fBnot\fP be recorded.
589 Hence all \fBsmartd\fP messages with loglevel \fBLOG_INFO\fP will be
590 lost. If you want to use the existing daemon facility to log all
591 messages from \fBsmartd\fP, you should change \fB/etc/syslog.conf\fP
594 ...;daemon.notice;... /var/adm/messages
598 ...;daemon.info;... /var/adm/messages
600 Alternatively, you can use a local facility to log messages: please
601 see the \fBsmartd\fP \*(Aq\-l\*(Aq command-line option described above.
602 .\" %ENDIF OS Solaris
605 The Cygwin Version of \fBsmartd\fP can be run as a service via the
607 .\" %IF ENABLE_INITSCRIPT
608 The start-up script provides Cygwin-specific commands to install and
611 .B /usr/local/etc/rc.d/init.d/smartd install [options]
613 .B /usr/local/etc/rc.d/init.d/smartd remove
615 The service can be started and stopped by the start-up script as usual
616 (see \fBEXAMPLES\fP above).
617 .\" %ENDIF ENABLE_INITSCRIPT
621 On Windows, the log messages are written to the event log or to a file.
622 See documentation of the \*(Aq\-l FACILITY\*(Aq option above for details.
624 On Windows, the following built-in commands can be used to control
625 \fBsmartd\fP, if running as a daemon:
627 \*(Aq\fBsmartd status\fP\*(Aq \- check status
629 \*(Aq\fBsmartd stop\fP\*(Aq \- stop smartd
631 \*(Aq\fBsmartd reload\fP\*(Aq \- reread config file
633 \*(Aq\fBsmartd restart\fP\*(Aq \- restart smartd
635 \*(Aq\fBsmartd sigusr1\fP\*(Aq \- check disks now
637 \*(Aq\fBsmartd sigusr2\fP\*(Aq \- toggle debug mode
639 The Windows Version of \fBsmartd\fP has buildin support for services:
641 \*(Aq\fBsmartd install [options]\fP\*(Aq installs a service
642 named "smartd" (display name "SmartD Service") using the command line
643 \*(Aq/INSTALLPATH/smartd.exe \-\-service [options]\*(Aq.
644 This also installs smartd.exe as a event message file for the Windows
647 \*(Aq\fBsmartd remove\fP\*(Aq can later be used to remove the service and
648 event message entries from the registry.
650 Upon startup, the smartd service changes the working directory
651 to its own installation path. If smartd.conf and blat.exe are stored
652 in this directory, no \*(Aq\-c\*(Aq option and \*(Aq\-M exec\*(Aq directive
655 The debug mode (\*(Aq\-d\*(Aq, \*(Aq\-q onecheck\*(Aq) does not work if
656 smartd is running as service.
658 The service can be controlled as usual with Windows commands \*(Aqnet\*(Aq
659 or \*(Aqsc\*(Aq (\*(Aq\fBnet start smartd\fP\*(Aq,
660 \*(Aq\fBnet stop smartd\fP\*(Aq).
662 Pausing the service (\*(Aq\fBnet pause smartd\fP\*(Aq) sets the interval
663 between disk checks (\*(Aq\-i N\*(Aq) to infinite.
665 Continuing the paused service (\*(Aq\fBnet continue smartd\fP\*(Aq) resets the
666 interval and rereads the configuration file immediately (like \fBSIGHUP\fP).
667 The \*(AqPARAMCHANGE\*(Aq service control command (\*(Aq\fBsc control smartd
668 paramchange\fP\*(Aq) has the same effect regardless of paused state.
670 Continuing a still running service (\*(Aq\fBnet continue smartd\fP\*(Aq without
671 preceding \*(Aq\fBnet pause smartd\fP\*(Aq) does not reread configuration but
672 checks disks immediately (like \fBSIGUSR1\fP).
673 .\" %ENDIF OS Windows
675 .SH LOG TIMESTAMP TIMEZONE
676 When \fBsmartd\fP makes log entries, these are time-stamped. The time
677 stamps are in the computer's local time zone, which is generally set
678 using either the environment variable \*(Aq\fBTZ\fP\*(Aq or using a
679 time-zone file such as \fB/etc/localtime\fP. You may wish to change
680 the timezone while \fBsmartd\fP is running (for example, if you carry
681 a laptop to a new time-zone and don't reboot it). Due to a bug in the
682 \fBtzset\fP(3) function of many unix standard C libraries, the
683 time-zone stamps of \fBsmartd\fP might not change. For some systems,
684 \fBsmartd\fP will work around this problem \fIif\fP the time-zone is
685 set using \fB/etc/localtime\fP. The work-around \fIfails\fP if the
686 time-zone is set using the \*(Aq\fBTZ\fP\*(Aq variable (or a file that it
690 The exit status (return value) of \fBsmartd\fP can have the following values:
693 Daemon startup successful, or \fBsmartd\fP was killed by a SIGTERM
694 (or in debug mode, a SIGQUIT).
697 Commandline did not parse.
700 There was a syntax error in the config file.
703 Forking the daemon failed.
706 Couldn't create PID file.
709 Config file does not exist (only returned in conjunction with the \*(Aq\-c\*(Aq
713 Config file exists, but cannot be read.
717 ran out of memory during startup.
720 An inconsistency was found in \fBsmartd\fP's internal data
721 structures. This should never happen. It must be due to either a
722 coding or compiler bug. \fIPlease\fP report such failures to
723 smartmontools developers, see REPORTING BUGS below.
726 A device explicitly listed in
727 .B /usr/local/etc/smartd.conf
732 didn't find any devices to monitor.
737 received a SIGINT or SIGQUIT. (Note that in debug mode, SIGINT has
738 the same effect as SIGHUP, and makes \fBsmartd\fP reload its
739 configuration file. SIGQUIT has the same effect as SIGTERM and causes
740 \fBsmartd\fP to exit with zero exit status.
744 was killed by a signal that is not explicitly listed above. The exit
745 status is then 128 plus the signal number. For example if
747 is killed by SIGKILL (signal 9) then the exit status is 137.
749 .\" %IF NOT OS Windows
752 .B /usr/local/sbin/smartd
753 full path of this executable.
755 .B /usr/local/etc/smartd.conf
756 configuration file (see \fBsmartd.conf\fP(5) man page).
758 .B /usr/local/etc/smartd_warning.sh
759 script run on warnings (see \*(Aq\-w\*(Aq option above and \*(Aq\-M exec\*(Aq
760 directive on \fBsmartd.conf\fP(5) man page).
761 .\" %IF ENABLE_SMARTDPLUGINDIR
763 .B /usr/local/etc/smartd_warning.d/
764 plugin directory for smartd warning script (see \*(Aq\-m\*(Aq directive on
765 \fBsmartd.conf\fP(5) man page).
766 .\" %ENDIF ENABLE_SMARTDPLUGINDIR
767 .\" %IF ENABLE_DRIVEDB
769 .B /usr/local/share/smartmontools/drivedb.h
770 drive database (see \*(Aq\-B\*(Aq option).
771 .\" %ENDIF ENABLE_DRIVEDB
773 .B /usr/local/etc/smart_drivedb.h
774 optional local drive database (see \*(Aq\-B\*(Aq option).
776 .\" %ENDIF NOT OS Windows
778 \fBBruce Allen\fP (project initiator),
780 \fBChristian Franke\fP (project manager, Windows port and all sort of things),
782 \fBDouglas Gilbert\fP (SCSI subsystem),
784 \fBVolker Kuhlmann\fP (moderator of support and database mailing list),
786 \fBGabriele Pohl\fP (wiki & development team support),
788 \fBAlex Samorukov\fP (FreeBSD port and more, new Trac wiki).
790 Many other individuals have made contributions and corrections,
791 see AUTHORS, ChangeLog and repository files.
793 The first smartmontools code was derived from the smartsuite package,
794 written by Michael Cornwell and Andre Hedrick.
797 To submit a bug report, create a ticket in smartmontools wiki:
799 <\fBhttps://www.smartmontools.org/\fP>.
801 Alternatively send the info to the smartmontools support mailing list:
803 <\fBhttps://listi.jpberlin.de/mailman/listinfo/smartmontools-support\fB>.
806 \fBsmartd.conf\fP(5), \fBsmartctl\fP(8).
807 .\" %IF ENABLE_UPDATE_SMART_DRIVEDB
809 \fBupdate-smart-drivedb\fP(8).
810 .\" %ENDIF ENABLE_UPDATE_SMART_DRIVEDB
813 Please see the following web site for more info:
814 <\fBhttps://www.smartmontools.org/\fP>
816 An introductory article about smartmontools is \fIMonitoring Hard
817 Disks with SMART\fP, by Bruce Allen, Linux Journal, January 2004,
819 See <\fBhttps://www.linuxjournal.com/article/6983\fP>.
821 If you would like to understand better how SMART works, and what it
822 does, a good place to start is with Sections 4.8 and 6.54 of the first
823 volume of the \*(AqAT Attachment with Packet Interface-7\*(Aq (ATA/ATAPI-7)
824 specification Revision 4b. This documents the SMART functionality which the
825 \fBsmartmontools\fP utilities provide access to.
827 The functioning of SMART was originally defined by the SFF-8035i
828 revision 2 and the SFF-8055i revision 1.4 specifications. These are
829 publications of the Small Form Factors (SFF) Committee.
831 Links to these and other documents may be found on the Links page of the
832 \fBsmartmontools\fP Wiki at <\fBhttps://www.smartmontools.org/wiki/Links\fP>.
835 CURRENT_SVN_VERSION CURRENT_SVN_DATE CURRENT_SVN_REV
837 $Id: smartd.8.in 4576 2017-10-29 16:41:44Z chrfranke $