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