]> git.proxmox.com Git - mirror_smartmontools-debian.git/blob - smartd.8.in
88375e26d821713e6d817f39ac7bc7658ece7943
[mirror_smartmontools-debian.git] / smartd.8.in
1 .ig
2 Copyright (C) 2002-10 Bruce Allen
3 <<<<<<< HEAD
4 Copyright (C) 2004-16 Christian Franke
5
6 $Id: smartd.8.in 4299 2016-04-16 19:45:57Z chrfranke $
7 =======
8 Copyright (C) 2004-15 Christian Franke
9
10 $Id: smartd.8.in 4102 2015-06-01 19:25:47Z chrfranke $
11 >>>>>>> 3d8ad6fa4529eb02ae1391a1e937bf57aad3fb74
12
13 This program is free software; you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation; either version 2, or (at your option)
16 any later version.
17
18 You should have received a copy of the GNU General Public License
19 (for example COPYING); If not, see <http://www.gnu.org/licenses/>.
20
21 This code was originally developed as a Senior Thesis by Michael Cornwell
22 at the Concurrent Systems Laboratory (now part of the Storage Systems
23 Research Center), Jack Baskin School of Engineering, University of
24 California, Santa Cruz. http://ssrc.soe.ucsc.edu/
25
26 ..
27 .TH SMARTD 8 "CURRENT_SVN_DATE" "CURRENT_SVN_VERSION" "SMART Monitoring Tools"
28 .SH NAME
29 \fBsmartd\fP \- SMART Disk Monitoring Daemon
30
31 .SH SYNOPSIS
32 .B smartd [options]
33
34 .SH DESCRIPTION
35 .\" %IF NOT OS ALL
36 .\"! [This man page is generated for the OS_MAN_FILTER version of smartmontools.
37 .\"! It does not contain info specific to other platforms.]
38 .\"! .PP
39 .\" %ENDIF NOT OS ALL
40 \fBsmartd\fP is a daemon that monitors the Self-Monitoring, Analysis and
41 Reporting Technology (SMART) system built into most ATA/SATA and SCSI/SAS
42 hard drives and solid-state drives.
43 The purpose of SMART is to monitor the reliability of the hard drive
44 and predict drive failures, and to carry out different types of drive
45 self-tests.
46 This version of \fBsmartd\fP is compatible with
47 ACS-3, ACS-2, ATA8-ACS, ATA/ATAPI-7 and earlier standards
48 (see \fBREFERENCES\fP below).
49
50 \fBsmartd\fP will attempt to enable SMART monitoring on ATA devices
51 (equivalent to \fBsmartctl -s on\fP) and polls these and SCSI devices
52 every 30 minutes (configurable), logging SMART errors and changes of
53 SMART Attributes via the SYSLOG interface. The default location for
54 these SYSLOG notifications and warnings is system-dependent
55 (typically \fB/var/log/messages\fP or \fB/var/log/syslog\fP).
56 To change this default location, please see the \fB\'-l\'\fP
57 command-line option described below.
58
59 In addition to logging to a file, \fBsmartd\fP can also be configured
60 to send email warnings if problems are detected. Depending upon the
61 type of problem, you may want to run self-tests on the disk, back up
62 the disk, replace the disk, or use a manufacturer\'s utility to force
63 reallocation of bad or unreadable disk sectors. If disk problems are
64 detected, please see the \fBsmartctl\fP manual page and the
65 \fBsmartmontools\fP web page/FAQ for further guidance.
66
67 If you send a \fBUSR1\fP signal to \fBsmartd\fP it will immediately
68 check the status of the disks, and then return to polling the disks
69 every 30 minutes. See the \fB\'\-i\'\fP option below for additional
70 details.
71
72 \fBsmartd\fP can be configured at start-up using the configuration
73 file \fB/usr/local/etc/smartd.conf\fP (Windows: \fBEXEDIR/smartd.conf\fP).
74 If the configuration file is subsequently modified, \fBsmartd\fP
75 can be told to re-read the configuration file by sending it a
76 \fBHUP\fP signal, for example with the command:
77 .br
78 \fBkillall -HUP smartd\fP.
79 .br
80 .\" %IF OS Windows
81 (Windows: See NOTES below.)
82 .\" %ENDIF OS Windows
83
84 On startup, if \fBsmartd\fP finds a syntax error in the configuration
85 file, it will print an error message and then exit. However if
86 \fBsmartd\fP is already running, then is told with a \fBHUP\fP signal
87 to re-read the configuration file, and then find a syntax error in
88 this file, it will print an error message and then continue, ignoring
89 the contents of the (faulty) configuration file, as if the \fBHUP\fP
90 signal had never been received.
91
92 When \fBsmartd\fP is running in debug mode, the \fBINT\fP signal
93 (normally generated from a shell with CONTROL-C) is treated in the
94 same way as a \fBHUP\fP signal: it makes \fBsmartd\fP reload its
95 configuration file. To exit \fBsmartd\fP use CONTROL-\e
96 .\" %IF OS Windows
97 (Windows: CONTROL-Break).
98 .\" %ENDIF OS Windows
99
100 On startup, in the absence of the configuration file
101 \fB/usr/local/etc/smartd.conf\fP, the \fBsmartd\fP daemon first scans for all
102 devices that support SMART. The scanning is done as follows:
103 .\" %IF OS Linux
104 .IP \fBLINUX:\fP 9
105 Examine all entries \fB"/dev/hd[a-t]"\fP for IDE/ATA
106 devices, and \fB"/dev/sd[a-z]"\fP, \fB"/dev/sd[a-c][a-z]"\fP
107 for ATA/SATA or SCSI/SAS devices.
108 Disks behind RAID controllers are not included.
109
110 [NEW EXPERIMENTAL SMARTD FEATURE]
111 If directive \'\-d nvme\'
112 .\" %IF ENABLE_NVME_DEVICESCAN
113 or no \'\-d\' directive
114 .\" %ENDIF ENABLE_NVME_DEVICESCAN
115 is specified, examine all entries \fB"/dev/nvme[0-99]"\fP for NVMe devices.
116 .\" %ENDIF OS Linux
117 .\" %IF OS FreeBSD
118 .IP \fBFREEBSD:\fP 9
119 Authoritative list of disk devices is obtained from SCSI (CAM) and ATA subsystems.
120 Disks behind RAID controllers are not included.
121 .\" %ENDIF OS FreeBSD
122 .\" %IF OS NetBSD OpenBSD
123 .IP \fBNETBSD/OPENBSD:\fP 9
124 Authoritative list of disk devices is obtained from sysctl
125 \'hw.disknames\'.
126 .\" %ENDIF OS NetBSD OpenBSD
127 .\" %IF OS Solaris
128 .IP \fBSOLARIS:\fP 9
129 Examine all entries \fB"/dev/rdsk/*s0"\fP for IDE/ATA and SCSI disk
130 devices, and entries \fB"/dev/rmt/*"\fP for SCSI tape devices.
131 .\" %ENDIF OS Solaris
132 .\" %IF OS Darwin
133 .IP \fBDARWIN:\fP 9
134 The IOService plane is scanned for ATA block storage devices.
135 .\" %ENDIF OS Darwin
136 .\" %IF OS Windows Cygwin
137 .IP \fBWINDOWS\fP: 9
138 Examine all entries \fB"/dev/sd[a\-z]"\fP, \fB"/dev/sd[a\-c][a\-z]"\fP
139 and \fB"/dev/sdd[a\-x]"\fP ("\\\\.\\PhysicalDrive[0\-127]") for
140 IDE/(S)ATA and SCSI disk devices.
141
142 If a 3ware 9000 controller is installed, examine all entries
143 \fB"/dev/sdX,N"\fP for the first logical drive (\'unit\'
144 \fB"/dev/sdX"\fP) and all physical disks (\'ports\' \fB",N"\fP)
145 detected behind this controller. Same for a second controller if present.
146
147 If directive \'\-d csmi\' or no \'\-d\' directive is specified,
148 examine all entries \fB"/dev/csmi[0\-9],N"\fP for drives behind an Intel
149 ICHxR controller with RST driver.
150
151 Disks behind Areca RAID controllers are not included.
152
153 [NEW EXPERIMENTAL SMARTD FEATURE]
154 If directive \'\-d nvme\'
155 .\" %IF ENABLE_NVME_DEVICESCAN
156 or no \'\-d\' directive
157 .\" %ENDIF ENABLE_NVME_DEVICESCAN
158 is specified, examine all entries \fB"/dev/nvme[0-9]"\fP for NVMe devices.
159 .\" %ENDIF OS Windows Cygwin
160 .PP
161 \fBsmartd\fP then monitors
162 for \fIall\fP possible SMART errors (corresponding to the \fB\'\-a\'\fP
163 Directive in the configuration file; see the \fBsmartd.conf\fP(5) man page).
164
165 .SH OPTIONS
166 .TP
167 .B \-A PREFIX, \-\-attributelog=PREFIX
168 Writes \fBsmartd\fP attribute information (normalized and raw
169 attribute values) to files \'PREFIX\'\'MODEL\-SERIAL.ata.csv\' or \'PREFIX\'\'VENDOR\-MODEL\-SERIAL.scsi.csv\'. At each
170 check cycle attributes are logged as a line of semicolon separated triplets
171 of the form "attribute-ID;attribute-norm-value;attribute-raw-value;".
172 For SCSI devices error counters and temperature recorded in the form "counter-name;counter-value;"
173 Each line is led by a date string of the form "yyyy-mm-dd HH:MM:SS" (in UTC).
174
175 .\" %IF ENABLE_ATTRIBUTELOG
176 If this option is not specified, attribute information is written to files
177 \'/usr/local/var/lib/smartmontools/attrlog.MODEL\-SERIAL.ata.csv\'.
178 To disable attribute log files, specify this option with an empty string
179 argument: \'-A ""\'.
180 .\" %ENDIF ENABLE_ATTRIBUTELOG
181 MODEL and SERIAL are build from drive identify information, invalid
182 characters are replaced by underline.
183
184 If the PREFIX has the form \'/path/dir/\' (e.g. \'/var/lib/smartd/\'), then
185 files \'MODEL\-SERIAL.ata.csv\' are created in directory \'/path/dir\'.
186 If the PREFIX has the form \'/path/name\' (e.g. \'/var/lib/misc/attrlog\-\'),
187 then files 'nameMODEL\-SERIAL.ata.csv' are created in directory '/path/'.
188 The path must be absolute, except if debug mode is enabled.
189 .TP
190 .B \-B [+]FILE, \-\-drivedb=[+]FILE
191 [ATA only] Read the drive database from FILE. The new database replaces
192 the built in database by default. If \'+\' is specified, then the new entries
193 prepend the built in entries.
194 Please see the \fBsmartctl\fP(8) man page for further details.
195 .TP
196 .B \-c FILE, \-\-configfile=FILE
197 Read \fBsmartd\fP configuration Directives from FILE, instead of from
198 the default location \fB/usr/local/etc/smartd.conf\fP (Windows: \fBEXEDIR/smartd.conf\fP).
199 If FILE does \fBnot\fP exist, then \fBsmartd\fP will print an error
200 message and exit with nonzero status. Thus, \'\-c /usr/local/etc/smartd.conf\'
201 can be used to verify the existence of the default configuration file.
202
203 By using \'\-\' for FILE, the configuration is read from standard
204 input. This is useful for commands like:
205 .nf
206 .B echo /dev/sdb \-m user@home \-M test | smartd \-c \- \-q onecheck
207 .fi
208 to perform quick and simple checks without a configuration file.
209 .\" %IF ENABLE_CAPABILITIES
210 .TP
211 .B \-C, \-\-capabilities
212 [Linux only] Use libcap-ng to drop unneeded Linux process \fBcapabilities\fP(7).
213 The following capabilities are kept: CAP_SYS_ADMIN, CAP_SYS_RAWIO, CAP_MKNOD.
214
215 Warning: Mail notification does not work when used.
216 .\" %ENDIF ENABLE_CAPABILITIES
217 .TP
218 .B \-d, \-\-debug
219 Runs \fBsmartd\fP in "debug" mode. In this mode, it displays status
220 information to STDOUT rather than logging it to SYSLOG and does not
221 \fBfork\fP(2) into the background and detach from the controlling
222 terminal. In this mode, \fBsmartd\fP also prints more verbose
223 information about what it is doing than when operating in "daemon"
224 mode. In this mode, the \fBINT\fP signal (normally generated from a
225 terminal with CONTROL-C) makes \fBsmartd\fP reload its configuration
226 file. Please use CONTROL-\e to exit
227 .\" %IF OS Windows
228 (Windows: CONTROL-Break).
229
230 [Windows only] The "debug" mode can be toggled by the command
231 \fBsmartd sigusr2\fP. A new console for debug output is opened when
232 debug mode is enabled.
233 .\" %ENDIF OS Windows
234 .TP
235 .B \-D, \-\-showdirectives
236 Prints a list (to STDOUT) of all the possible Directives which may
237 appear in the configuration file /usr/local/etc/smartd.conf, and then exits.
238 These Directives are described in the \fBsmartd.conf\fP(5) man page.
239 They may appear in the configuration file following the device name.
240 .TP
241 .B \-h, \-\-help, \-\-usage
242 Prints usage message to STDOUT and exits.
243 .TP
244 .B \-i N, \-\-interval=N
245 Sets the interval between disk checks to \fIN\fP seconds, where
246 \fIN\fP is a decimal integer. The minimum allowed value is ten and
247 the maximum is the largest positive integer that can be represented on
248 your system (often 2^31-1). The default is 1800 seconds.
249
250 Note that the superuser can make \fBsmartd\fP check the status of the
251 disks at any time by sending it the \fBSIGUSR1\fP signal, for example
252 with the command:
253 .nf
254 .B kill -SIGUSR1 <pid>
255 .fi
256 where \fB<pid>\fP is the process id number of \fBsmartd\fP. One may
257 also use:
258 .nf
259 .B killall -USR1 smartd
260 .fi
261 for the same purpose.
262 .br
263 .\" %IF OS Windows
264 (Windows: See NOTES below.)
265 .\" %ENDIF OS Windows
266 .TP
267 .B \-l FACILITY, \-\-logfacility=FACILITY
268 Uses syslog facility FACILITY to log the messages from \fBsmartd\fP.
269 Here FACILITY is one of \fIlocal0\fP, \fIlocal1\fP, ..., \fIlocal7\fP,
270 or \fIdaemon\fP [default]. If this command-line option is not used,
271 then by default messages from \fBsmartd\fP are logged to the facility
272 \fIdaemon\fP.
273
274 If you would like to have \fBsmartd\fP messages logged somewhere other
275 than the default location, include (for example) \'\-l local3\' in its
276 start up argument list.
277 Tell the syslog daemon to log all messages from facility \fBlocal3\fP
278 to (for example) \'/var/log/smartd.log\'.
279
280 For more detailed information, please refer to the man pages for
281 the local syslog daemon, typically \fBsyslogd\fP(8), \fBsyslog-ng\fP(8)
282 or \fBrsyslogd\fP(8).
283 .\" %IF OS Cygwin
284
285 Cygwin: If no \fBsyslogd\fP is running, the \'\-l\' option has no effect.
286 In this case, all \fBsyslog\fP messages are written to Windows event log.
287 .\" %ENDIF OS Cygwin
288 .\" %IF OS Windows
289
290 Windows: Some \fBsyslog\fP functionality is implemented
291 internally in \fBsmartd\fP as follows: If no \'\-l\' option
292 (or \'\-l daemon\') is specified, messages are written to Windows
293 event log or to file \fB./smartd.log\fP if event log is not available
294 (access denied). By specifying other values of FACILITY,
295 log output is redirected as follows:
296 \'\-l local0\' to file \fB./smartd.log\fP,
297 \'\-l local1\' to standard output (redirect with \'>\' to any file),
298 \'\-l local2\' to standard error,
299 \'\-l local[3-7]\': to file \fB./smartd[1-5].log\fP.
300 .\" %ENDIF OS Windows
301 .TP
302 .B \-n, \-\-no\-fork
303 Do not fork into background; this is useful when executed from modern
304 init methods like initng, minit, supervise or systemd.
305 .\" %IF OS Cygwin
306
307 On Cygwin, this allows running \fBsmartd\fP as service via cygrunsrv,
308 see NOTES below.
309 .\" %ENDIF OS Cygwin
310 .\" %IF OS Windows
311
312 On Windows, this option is not available, use \'\-\-service\' instead.
313 .\" %ENDIF OS Windows
314 .TP
315 .B \-p NAME, \-\-pidfile=NAME
316 Writes pidfile \fINAME\fP containing the \fBsmartd\fP Process ID
317 number (PID). To avoid symlink attacks make sure the directory to
318 which pidfile is written is only writable for root. Without this
319 option, or if the \-\-debug option is given, no PID file is written on
320 startup. If \fBsmartd\fP is killed with a maskable signal then the
321 pidfile is removed.
322 .TP
323 .B \-q WHEN, \-\-quit=WHEN
324 Specifies when, if ever, \fBsmartd\fP should exit. The valid
325 arguments are to this option are:
326
327 .I nodev
328 \- Exit if there are no devices to monitor, or if any errors are found
329 at startup in the configuration file. This is the default.
330
331 .I errors
332 \- Exit if there are no devices to monitor, or if any errors are found
333 in the configuration file /usr/local/etc/smartd.conf at startup or whenever it
334 is reloaded.
335
336 .I nodevstartup
337 \- Exit if there are no devices to monitor at startup. But continue
338 to run if no devices are found whenever the configuration file is
339 reloaded.
340
341 .I never
342 \- Only exit if a fatal error occurs (no remaining system memory,
343 invalid command line arguments). In this mode, even if there are no
344 devices to monitor, or if the configuration file
345 \fB/usr/local/etc/smartd.conf\fP has errors, \fBsmartd\fP will continue to run,
346 waiting to load a configuration file listing valid devices.
347
348 .I onecheck
349 \- Start \fBsmartd\fP in debug mode, then register devices, then check
350 device\'s SMART status once, and then exit with zero exit status if all
351 of these steps worked correctly.
352
353 This last option is intended for \'distribution-writers\' who want to
354 create automated scripts to determine whether or not to automatically
355 start up \fBsmartd\fP after installing smartmontools. After starting
356 \fBsmartd\fP with this command-line option, the distribution\'s install
357 scripts should wait a reasonable length of time (say ten seconds). If
358 \fBsmartd\fP has not exited with zero status by that time, the script
359 should send \fBsmartd\fP a SIGTERM or SIGKILL and assume that
360 \fBsmartd\fP will not operate correctly on the host. Conversely, if
361 \fBsmartd\fP exits with zero status, then it is safe to run
362 \fBsmartd\fP in normal daemon mode. If \fBsmartd\fP is unable to
363 monitor any devices or encounters other problems then it will return
364 with non-zero exit status.
365
366 .I showtests
367 \- Start \fBsmartd\fP in debug mode, then register devices, then write
368 a list of future scheduled self tests to stdout, and then exit with zero
369 exit status if all of these steps worked correctly.
370 Device's SMART status is not checked.
371
372 This option is intended to test whether the '\-s REGEX' directives in
373 smartd.conf will have the desired effect. The output lists the next test
374 schedules, limited to 5 tests per type and device. This is followed by a
375 summary of all tests of each device within the next 90 days.
376 .TP
377 .B \-r TYPE, \-\-report=TYPE
378 Intended primarily to help
379 .B smartmontools
380 developers understand the behavior of
381 .B smartmontools
382 on non-conforming or poorly-conforming hardware. This option reports
383 details of
384 \fBsmartd\fP
385 transactions with the device. The option can be used multiple times.
386 When used just once, it shows a record of the ioctl() transactions
387 with the device. When used more than once, the detail of these ioctl()
388 transactions are reported in greater detail. The valid arguments to
389 this option are:
390
391 .I ioctl
392 \- report all ioctl() transactions.
393
394 .I ataioctl
395 \- report only ioctl() transactions with ATA devices.
396
397 .I scsiioctl
398 \- report only ioctl() transactions with SCSI devices.
399
400 .\" %IF OS FreeBSD Linux Windows Cygwin
401 .I nvmeioctl
402 \- [FreeBSD, Linux, Windows and Cygwin only]
403 [NEW EXPERIMENTAL SMARTD FEATURE]
404 report only ioctl() transactions with NVMe devices.
405
406 .\" %ENDIF OS FreeBSD Linux Windows Cygwin
407 Any argument may include a positive integer to specify the level of
408 detail that should be reported. The argument should be followed by a
409 comma then the integer with no spaces. For example, \fIataioctl,2\fP
410 The default level is 1, so \'\-r ataioctl,1\' and \'\-r ataioctl\' are
411 equivalent.
412 .TP
413 .B \-s PREFIX, \-\-savestates=PREFIX
414 Reads/writes \fBsmartd\fP state information from/to files
415 \'PREFIX\'\'MODEL\-SERIAL.ata.state\' or \'PREFIX\'\'VENDOR\-MODEL\-SERIAL.scsi.state\'.
416 This preserves SMART attributes, drive min and max temperatures (\-W directive),
417 info about last sent warning email
418 (\-m directive), and the time of next check of the self-test REGEXP
419 (\-s directive) across boot cycles.
420
421 .\" %IF ENABLE_SAVESTATES
422 If this option is not specified, state information is maintained in files
423 \'/usr/local/var/lib/smartmontools/smartd.MODEL\-SERIAL.ata.state\' for ATA devices and
424 \'/usr/local/var/lib/smartmontools/smartd.VENDOR\-MODEL\-SERIAL.scsi.state\' for SCSI devices.
425 To disable state files, specify this option with an empty string
426 argument: \'\-s ""\'.
427 .\" %ENDIF ENABLE_SAVESTATES
428 MODEL and SERIAL are build from drive identify information, invalid
429 characters are replaced by underline.
430
431 If the PREFIX has the form \'/path/dir/\' (e.g. \'/var/lib/smartd/\'), then
432 files \'MODEL\-SERIAL.ata.state\' are created in directory \'/path/dir\'.
433 If the PREFIX has the form \'/path/name\' (e.g. \'/var/lib/misc/smartd\-\'),
434 then files 'nameMODEL\-SERIAL.ata.state' are created in directory '/path/'.
435 The path must be absolute, except if debug mode is enabled.
436
437 The state information files are read on smartd startup. The files are
438 always (re)written after reading the configuration file, before rereading
439 the configuration file (SIGHUP), before smartd shutdown, and after a check
440 forced by SIGUSR1. After a normal check cycle, a file is only rewritten if
441 an important change (which usually results in a SYSLOG output) occurred.
442 .TP
443 .B \-w PATH, \-\-warnexec=PATH
444 Run the executable PATH instead of the default script when smartd
445 needs to send warning messages. PATH must point to an executable binary
446 file or script.
447 The default script is
448 .\" %IF NOT OS Windows
449 \fB/usr/local/etc/smartd_warning.sh\fP.
450 .\" %ENDIF NOT OS Windows
451 .\" %IF OS ALL
452 (Windows: EXEDIR/smartd_warning.cmd)
453 .\" %ENDIF OS ALL
454 .\" %IF OS Windows
455 .\"! \fBEXEDIR/smartd_warning.cmd\fP.
456 .\" %ENDIF OS Windows
457 .\" %IF OS Windows
458 .TP
459 .B \-\-service
460 [Windows only] Enables \fBsmartd\fP to run as a Windows service.
461 The option must be specified in the service command line as the first
462 argument. It should not be used from console.
463 See NOTES below for details.
464 .\" %ENDIF OS Windows
465 .TP
466 .B \-V, \-\-version, \-\-license, \-\-copyright
467 Prints version, copyright, license, home page and SVN revision
468 information for your copy of \fBsmartd\fP to STDOUT and then exits.
469 Please include this information if you are reporting bugs or problems.
470
471 .SH EXAMPLES
472 .B smartd
473 .br
474 Runs the daemon in forked mode. This is the normal way to run
475 \fBsmartd\fP.
476 Entries are logged to SYSLOG.
477
478 .B smartd -d -i 30
479 .br
480 Run in foreground (debug) mode, checking the disk status
481 every 30 seconds.
482
483 .B smartd -q onecheck
484 .br
485 Registers devices, and checks the status of the devices exactly
486 once. The exit status (the shell
487 .B $?
488 variable) will be zero if all went well, and nonzero if no devices
489 were detected or some other problem was encountered.
490
491 .\" %IF ENABLE_INITSCRIPT
492 Note that \fBsmartmontools\fP provides a start-up script in
493 \fB/usr/local/etc/rc.d/init.d/smartd\fP which is responsible for starting and
494 stopping the daemon via the normal init interface. Using this script,
495 you can start \fBsmartd\fP by giving the command:
496 .nf
497 .B /usr/local/etc/rc.d/init.d/smartd start
498 .fi
499 and stop it by using the command:
500 .nf
501 .B /usr/local/etc/rc.d/init.d/smartd stop
502 .fi
503
504 .\" %ENDIF ENABLE_INITSCRIPT
505 .SH CONFIGURATION
506 The syntax of the \fBsmartd.conf\fP(5) file is discussed separately.
507
508 .SH NOTES
509 \fBsmartd\fP
510 will make log entries at loglevel
511 .B LOG_INFO
512 if the Normalized SMART Attribute values have changed, as reported using the
513 .B \'\-t\', \'\-p\',
514 or
515 .B \'\-u\'
516 Directives. For example:
517 .nf
518 .B \'Device: /dev/sda, SMART Attribute: 194 Temperature_Celsius changed from 94 to 93\'
519 .fi
520 Note that in this message, the value given is the \'Normalized\' not the \'Raw\'
521 Attribute value (the disk temperature in this case is about 22
522 Celsius). The
523 .B \'-R\'
524 and
525 .B \'-r\'
526 Directives modify this behavior, so that the information is printed
527 with the Raw values as well, for example:
528 .nf
529 .B \'Device: /dev/sda, SMART Attribute: 194 Temperature_Celsius changed from 94 [Raw 22] to 93 [Raw 23]\'
530 .fi
531 Here the Raw values are the actual disk temperatures in Celsius. The
532 way in which the Raw values are printed, and the names under which the
533 Attributes are reported, is governed by the various
534 .B \'-v Num,Description\'
535 Directives described previously.
536
537 Please see the
538 .B smartctl
539 manual page for further explanation of the differences between
540 Normalized and Raw Attribute values.
541
542 \fBsmartd\fP
543 will make log entries at loglevel
544 .B LOG_CRIT
545 if a SMART Attribute has failed, for example:
546 .nf
547 .B \'Device: /dev/sdc, Failed SMART Attribute: 5 Reallocated_Sector_Ct\'
548 .fi
549 This loglevel is used for reporting enabled by the
550 .B \'\-H\', \-f\', \'\-l\ selftest\',
551 and
552 .B \'\-l\ error\'
553 Directives. Entries reporting failure of SMART Prefailure Attributes
554 should not be ignored: they mean that the disk is failing. Use the
555 .B smartctl
556 utility to investigate.
557
558 .\" %IF OS Solaris
559 Under Solaris with the default \fB/etc/syslog.conf\fP configuration,
560 messages below loglevel \fBLOG_NOTICE\fP will \fBnot\fP be recorded.
561 Hence all \fBsmartd\fP messages with loglevel \fBLOG_INFO\fP will be
562 lost. If you want to use the existing daemon facility to log all
563 messages from \fBsmartd\fP, you should change \fB/etc/syslog.conf\fP
564 from:
565 .nf
566 ...;daemon.notice;... /var/adm/messages
567 .fi
568 to read:
569 .nf
570 ...;daemon.info;... /var/adm/messages
571 .fi
572 Alternatively, you can use a local facility to log messages: please
573 see the \fBsmartd\fP '\-l' command-line option described above.
574
575 .\" %ENDIF OS Solaris
576 .\" %IF OS Cygwin
577 The Cygwin Version of \fBsmartd\fP can be run as a service via the
578 cygrunsrv tool.
579 .\" %IF ENABLE_INITSCRIPT
580 The start-up script provides Cygwin-specific commands to install and
581 remove the service:
582 .nf
583 .B /usr/local/etc/rc.d/init.d/smartd install [options]
584 .B /usr/local/etc/rc.d/init.d/smartd remove
585 .fi
586 The service can be started and stopped by the start-up script as usual
587 (see \fBEXAMPLES\fP above).
588 .\" %ENDIF ENABLE_INITSCRIPT
589
590 .\" %ENDIF OS Cygwin
591 .\" %IF OS Windows
592 On Windows, the log messages are written to the event log or to a file.
593 See documentation of the '\-l FACILITY' option above for details.
594
595 On Windows, the following built-in commands can be used to control
596 \fBsmartd\fP, if running as a daemon:
597
598 \'\fBsmartd status\fP\' \- check status
599
600 \'\fBsmartd stop\fP\' \- stop smartd
601
602 \'\fBsmartd reload\fP\' \- reread config file
603
604 \'\fBsmartd restart\fP\' \- restart smartd
605
606 \'\fBsmartd sigusr1\fP\' \- check disks now
607
608 \'\fBsmartd sigusr2\fP\' \- toggle debug mode
609
610 The Windows Version of \fBsmartd\fP has buildin support for services:
611
612 \'\fBsmartd install [options]\fP\' installs a service
613 named "smartd" (display name "SmartD Service") using the command line
614 \'/INSTALLPATH/smartd.exe \-\-service [options]\'.
615 This also installs smartd.exe as a event message file for the Windows
616 event viewer.
617
618 \'\fBsmartd remove\fP\' can later be used to remove the service and
619 event message entries from the registry.
620
621 Upon startup, the smartd service changes the working directory
622 to its own installation path. If smartd.conf and blat.exe are stored
623 in this directory, no \'-c\' option and \'-M exec\' directive is needed.
624
625 The debug mode (\'\-d\', \'\-q onecheck\') does not work if smartd is
626 running as service.
627
628 The service can be controlled as usual with Windows commands \'net\'
629 or \'sc\' (\'\fBnet start smartd\fP\', \'\fBnet stop smartd\fP\').
630
631 Pausing the service (\'\fBnet pause smartd\fP\') sets the interval between
632 disk checks (\'\-i N\') to infinite.
633
634 Continuing the paused service (\'\fBnet continue smartd\fP\') resets the
635 interval and rereads the configuration file immediately (like \fBSIGHUP\fP):
636
637 Continuing a still running service (\'\fBnet continue smartd\fP\' without
638 preceding \'\fBnet pause smartd\fP\') does not reread configuration but
639 checks disks immediately (like \fBSIGUSR1\fP).
640
641 .\" %ENDIF OS Windows
642 .SH LOG TIMESTAMP TIMEZONE
643 When \fBsmartd\fP makes log entries, these are time-stamped. The time
644 stamps are in the computer's local time zone, which is generally set
645 using either the environment variable \'\fBTZ\fP\' or using a
646 time-zone file such as \fB/etc/localtime\fP. You may wish to change
647 the timezone while \fBsmartd\fP is running (for example, if you carry
648 a laptop to a new time-zone and don't reboot it). Due to a bug in the
649 \fBtzset\fP(3) function of many unix standard C libraries, the
650 time-zone stamps of \fBsmartd\fP might not change. For some systems,
651 \fBsmartd\fP will work around this problem \fIif\fP the time-zone is
652 set using \fB/etc/localtime\fP. The work-around \fIfails\fP if the
653 time-zone is set using the \'\fBTZ\fP\' variable (or a file that it
654 points to).
655
656 .SH EXIT STATUS
657 The exit status (return value) of \fBsmartd\fP can have the following values:
658 .TP
659 .B 0:
660 Daemon startup successful, or \fBsmartd\fP was killed by a SIGTERM (or in debug mode, a SIGQUIT).
661 .TP
662 .B 1:
663 Commandline did not parse.
664 .TP
665 .B 2:
666 There was a syntax error in the config file.
667 .TP
668 .B 3:
669 Forking the daemon failed.
670 .TP
671 .B 4:
672 Couldn\'t create PID file.
673 .TP
674 .B 5:
675 Config file does not exist (only returned in conjunction with the \'\-c\' option).
676 .TP
677 .B 6:
678 Config file exists, but cannot be read.
679 .TP
680 .B 8:
681 \fBsmartd\fP
682 ran out of memory during startup.
683 .TP
684 .B 10:
685 An inconsistency was found in \fBsmartd\fP\'s internal data
686 structures. This should never happen. It must be due to either a
687 coding or compiler bug. \fIPlease\fP report such failures to
688 smartmontools developers, see REPORTING BUGS below.
689 .TP
690 .B 16:
691 A device explicitly listed in
692 .B /usr/local/etc/smartd.conf
693 can\'t be monitored.
694 .TP
695 .B 17:
696 \fBsmartd\fP
697 didn\'t find any devices to monitor.
698 .TP
699 .B 254:
700 When in daemon mode,
701 \fBsmartd\fP
702 received a SIGINT or SIGQUIT. (Note that in debug mode, SIGINT has
703 the same effect as SIGHUP, and makes \fBsmartd\fP reload its
704 configuration file. SIGQUIT has the same effect as SIGTERM and causes
705 \fBsmartd\fP to exit with zero exit status.
706 .TP
707 .B 132 and above
708 \fBsmartd\fP
709 was killed by a signal that is not explicitly listed above. The exit
710 status is then 128 plus the signal number. For example if
711 \fBsmartd\fP
712 is killed by SIGKILL (signal 9) then the exit status is 137.
713
714 .\" %IF NOT OS Windows
715 .SH FILES
716 .TP
717 .B /usr/local/sbin/smartd
718 full path of this executable.
719 .TP
720 .B /usr/local/etc/smartd.conf
721 configuration file (see \fBsmartd.conf\fP(5) man page).
722 .TP
723 .B /usr/local/etc/smartd_warning.sh
724 script run on warnings (see \'\-M exec\' directive on
725 \fBsmartd.conf\fP(5) man page).
726 .\" %IF ENABLE_SMARTDPLUGINDIR
727 .TP
728 .B /usr/local/etc/smartd_warning.d/
729 plugin directory for smartd warning script (see \'\-m\' directive on
730 \fBsmartd.conf\fP(5) man page).
731 .\" %ENDIF ENABLE_SMARTDPLUGINDIR
732 .\" %IF ENABLE_DRIVEDB
733 .TP
734 .B /usr/local/share/smartmontools/drivedb.h
735 drive database (see \'\-B\' option).
736 .\" %ENDIF ENABLE_DRIVEDB
737 .TP
738 .B /usr/local/etc/smart_drivedb.h
739 optional local drive database (see \'\-B\' option).
740
741 .\" %ENDIF NOT OS Windows
742 .SH AUTHORS
743 \fBBruce Allen\fP (project initiator),
744 <<<<<<< HEAD
745 .br
746 \fBChristian Franke\fP (project manager, Windows port and all sort of things),
747 .br
748 \fBDouglas Gilbert\fP (SCSI subsystem),
749 .br
750 \fBVolker Kuhlmann\fP (moderator of support and database mailing list),
751 .br
752 \fBGabriele Pohl\fP (wiki & development team support),
753 .br
754 =======
755 .br
756 \fBChristian Franke\fP (project manager, Windows port and all sort of things),
757 .br
758 \fBDouglas Gilbert\fP (SCSI subsystem),
759 .br
760 \fBVolker Kuhlmann\fP (moderator of support and database mailing list),
761 .br
762 \fBGabriele Pohl\fP (wiki & development team support),
763 .br
764 >>>>>>> 3d8ad6fa4529eb02ae1391a1e937bf57aad3fb74
765 \fBAlex Samorukov\fP (FreeBSD port and more, new Trac wiki).
766
767 Many other individuals have made contributions and corrections,
768 see AUTHORS, ChangeLog and repository files.
769
770 The first smartmontools code was derived from the smartsuite package,
771 written by Michael Cornwell and Andre Hedrick.
772
773 .SH REPORTING BUGS
774 To submit a bug report, create a ticket in smartmontools wiki:
775 .br
776 <\fBhttp://www.smartmontools.org/\fP>.
777 .br
778 Alternatively send the info to the smartmontools support mailing list:
779 .br
780 <\fBhttps://lists.sourceforge.net/lists/listinfo/smartmontools-support\fB>.
781
782 .SH SEE ALSO
783 \fBsmartd.conf\fP(5), \fBsmartctl\fP(8).
784 .\" %IF ENABLE_UPDATE_SMART_DRIVEDB
785 .br
786 \fBupdate-smart-drivedb\fP(8).
787 .\" %ENDIF ENABLE_UPDATE_SMART_DRIVEDB
788
789 .SH REFERENCES
790 Please see the following web site for more info:
791 \fBhttp://www.smartmontools.org/\fP
792
793 An introductory article about smartmontools is \fIMonitoring Hard
794 Disks with SMART\fP, by Bruce Allen, Linux Journal, January 2004,
795 pages 74-77. This is \fBhttp://www.linuxjournal.com/article/6983\fP
796 online.
797
798 If you would like to understand better how SMART works, and what it
799 does, a good place to start is with Sections 4.8 and 6.54 of the first
800 volume of the \'AT Attachment with Packet Interface-7\' (ATA/ATAPI-7)
801 specification Revision 4b. This documents the SMART functionality which the
802 \fBsmartmontools\fP utilities provide access to.
803
804 The functioning of SMART was originally defined by the SFF-8035i
805 revision 2 and the SFF-8055i revision 1.4 specifications. These are
806 publications of the Small Form Factors (SFF) Committee.
807
808 Links to these and other documents may be found on the Links page of the
809 \fBsmartmontools\fP Wiki at \fBhttp://www.smartmontools.org/wiki/Links\fP .
810
811 .SH PACKAGE VERSION
812 CURRENT_SVN_VERSION CURRENT_SVN_DATE CURRENT_SVN_REV
813 .br
814 <<<<<<< HEAD
815 $Id: smartd.8.in 4299 2016-04-16 19:45:57Z chrfranke $
816 =======
817 $Id: smartd.8.in 4102 2015-06-01 19:25:47Z chrfranke $
818 >>>>>>> 3d8ad6fa4529eb02ae1391a1e937bf57aad3fb74