]>
Commit | Line | Data |
---|---|---|
832b75ed | 1 | .ig |
a86ec89e | 2 | Copyright (C) 2002-10 Bruce Allen |
f9e10201 | 3 | Copyright (C) 2004-17 Christian Franke |
832b75ed | 4 | |
f9e10201 | 5 | $Id: smartd.conf.5.in 4589 2017-11-04 15:30:54Z chrfranke $ |
832b75ed | 6 | |
ee38a438 GI |
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. | |
832b75ed | 11 | |
ee38a438 GI |
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/>. | |
832b75ed GG |
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/ | |
ee38a438 | 19 | |
832b75ed | 20 | .. |
f9e10201 JD |
21 | .\" Macros borrowed from pages generated with Pod::Man |
22 | .de Sp \" Vertical space (when we can't use .PP) | |
23 | .if t .sp 0.4v | |
24 | .if n .sp | |
25 | .. | |
26 | .de Vb \" Begin verbatim text | |
27 | .ft CW | |
28 | .nf | |
29 | .ne \\$1 | |
30 | .. | |
31 | .de Ve \" End verbatim text | |
32 | .ft R | |
33 | .fi | |
34 | .. | |
35 | .\" Use groff extension \(aq (apostrophe quote, ASCII 0x27) if possible | |
36 | .ie \n(.g .ds Aq \(aq | |
37 | .el .ds Aq ' | |
a86ec89e | 38 | .TH SMARTD.CONF 5 "CURRENT_SVN_DATE" "CURRENT_SVN_VERSION" "SMART Monitoring Tools" |
832b75ed GG |
39 | .SH NAME |
40 | \fBsmartd.conf\fP \- SMART Disk Monitoring Daemon Configuration File\fP | |
41 | ||
832b75ed | 42 | .SH DESCRIPTION |
d008864d GI |
43 | .\" %IF NOT OS ALL |
44 | .\"! [This man page is generated for the OS_MAN_FILTER version of smartmontools. | |
45 | .\"! It does not contain info specific to other platforms.] | |
46 | .\"! .PP | |
47 | .\" %ENDIF NOT OS ALL | |
832b75ed | 48 | \fB/usr/local/etc/smartd.conf\fP is the configuration file for the \fBsmartd\fP |
ee38a438 | 49 | daemon. |
f9e10201 | 50 | .PP |
832b75ed | 51 | If the configuration file \fB/usr/local/etc/smartd.conf\fP is present, |
f9e10201 JD |
52 | \fBsmartd\fP reads it at startup. |
53 | If \fBsmartd\fP subsequently receives a \fBHUP\fP signal, | |
832b75ed GG |
54 | it will then re-read the configuration file. If \fBsmartd\fP is |
55 | running in debug mode, then an \fBINT\fP signal will also make it | |
f9e10201 JD |
56 | re-read the configuration file. This signal can be generated by typing |
57 | \fB<CONTROL-C>\fP in the terminal window where \fBsmartd\fP is | |
832b75ed | 58 | running. |
f9e10201 | 59 | .PP |
d008864d | 60 | In the absence of a configuration file |
ee38a438 GI |
61 | \fBsmartd\fP will try to open all available devices |
62 | (see \fBsmartd\fP(8) man page). | |
f9e10201 | 63 | A configuration file with a single line \fB\*(AqDEVICESCAN \-a\*(Aq\fP |
ee38a438 | 64 | would have the same effect. |
f9e10201 | 65 | .PP |
832b75ed GG |
66 | This can be annoying if you have an ATA or SCSI device that hangs or |
67 | misbehaves when receiving SMART commands. Even if this causes no | |
ee38a438 | 68 | problems, you may be annoyed by the string of error log messages about devices |
f9e10201 JD |
69 | that can't be opened. |
70 | .PP | |
832b75ed GG |
71 | One can avoid this problem, and gain more control over the types of |
72 | events monitored by | |
73 | \fBsmartd\fP, | |
74 | by using the configuration file | |
75 | .B /usr/local/etc/smartd.conf. | |
76 | This file contains a list of devices to monitor, with one device per | |
77 | line. An example file is included with the | |
78 | .B smartmontools | |
f9e10201 JD |
79 | distribution. You will find this sample configuration file in |
80 | \fB/usr/local/share/doc/smartmontools/\fP. | |
81 | For security, the configuration file should not be writable by anyone | |
82 | but root. | |
83 | The syntax of the file is as follows: | |
832b75ed GG |
84 | .IP \(bu 4 |
85 | There should be one device listed per line, although you may have | |
86 | lines that are entirely comments or white space. | |
87 | .IP \(bu 4 | |
f9e10201 | 88 | Any text following a hash sign \*(Aq#\*(Aq and up to the end of the line is |
832b75ed GG |
89 | taken to be a comment, and ignored. |
90 | .IP \(bu 4 | |
f9e10201 | 91 | Lines may be continued by using a backslash \*(Aq\e\*(Aq as the last |
832b75ed GG |
92 | non-whitespace or non-comment item on a line. |
93 | .IP \(bu 4 | |
f9e10201 | 94 | Note: a line whose first character is a hash sign \*(Aq#\*(Aq is treated as |
832b75ed GG |
95 | a white-space blank line, \fBnot\fP as a non-existent line, and will |
96 | \fBend\fP a continuation line. | |
d2e702cf | 97 | .PP |
f9e10201 JD |
98 | Here is an example configuration file. It's for illustrative purposes |
99 | only; please don't copy it onto your system without reading to the end | |
832b75ed GG |
100 | of the |
101 | .B DIRECTIVES | |
102 | Section below! | |
f9e10201 JD |
103 | .PP |
104 | .Vb 9 | |
105 | ################################################ | |
106 | # This is an example smartd startup config file | |
107 | # /usr/local/etc/smartd.conf | |
108 | # | |
109 | # On the second disk, start a long self-test every | |
110 | # Sunday between 3 and 4 am. | |
111 | # | |
112 | /dev/sda \-a \-m admin@example.com,root@localhost | |
113 | /dev/sdb \-a \-I 194 \-I 5 \-i 12 \-s L/../../7/03 | |
114 | # | |
115 | # Send a TEST warning email to admin on startup. | |
116 | # | |
117 | /dev/sdc \-m admin@example.com \-M test | |
118 | # | |
119 | # Strange device. It's SCSI. Start a scheduled | |
120 | # long self test between 5 and 6 am Monday/Thursday | |
121 | /dev/weird \-d scsi \-s L/../../(1|4)/05 | |
122 | # | |
123 | # An ATA disk may appear as a SCSI device to the | |
124 | # OS. If a SCSI to ATA Translation (SAT) layer | |
125 | # is between the OS and the device then this can be | |
126 | # flagged with the '\-d sat' option. This situation | |
127 | # may become common with SATA disks in SAS and FC | |
128 | # environments. | |
129 | /dev/sda \-a \-d sat | |
d008864d | 130 | .\" %IF OS Linux |
f9e10201 JD |
131 | # |
132 | # Three disks connected to a MegaRAID controller | |
133 | # Start short self\-tests daily between 1\-2, 2\-3, and | |
134 | # 3\-4 am. | |
135 | /dev/sda \-d megaraid,0 \-a \-s S/../.././01 | |
136 | /dev/sda \-d megaraid,1 \-a \-s S/../.././02 | |
137 | /dev/sda \-d megaraid,2 \-a \-s S/../.././03 | |
138 | /dev/bus/0 \-d megaraid,2 \-a \-s S/../.././03 | |
139 | # | |
140 | # Three disks connected to an AacRaid controller | |
141 | # Start short self\-tests daily between 1\-2, 2\-3, and | |
142 | # 3\-4 am. | |
143 | /dev/sda \-d aacraid,0,0,66 \-a \-s S/../.././01 | |
144 | /dev/sda \-d aacraid,0,0,67 \-a \-s S/../.././02 | |
145 | /dev/sda \-d aacraid,0,0,68 \-a \-s S/../.././03 | |
d008864d | 146 | .\" %ENDIF OS Linux |
f9e10201 JD |
147 | .\" %IF OS FreeBSD Linux |
148 | # | |
149 | # Two SATA (not SAS) disks on a 3ware 9750 controller. | |
150 | # Start long self\-tests Sundays between midnight and | |
151 | # 1 am and 2\-3 am | |
152 | .\" %ENDIF OS FreeBSD Linux | |
ee38a438 | 153 | .\" %IF OS Linux |
f9e10201 JD |
154 | # under Linux |
155 | /dev/twl0 \-d 3ware,0 \-a \-s L/../../7/00 | |
156 | /dev/twl0 \-d 3ware,1 \-a \-s L/../../7/02 | |
ee38a438 GI |
157 | .\" %ENDIF OS Linux |
158 | .\" %IF OS FreeBSD | |
f9e10201 JD |
159 | # under FreeBSD |
160 | /dev/tws0 \-d 3ware,0 \-a \-s L/../../7/00 | |
161 | /dev/tws0 \-d 3ware,1 \-a \-s L/../../7/02 | |
ee38a438 | 162 | .\" %ENDIF OS FreeBSD |
f9e10201 JD |
163 | .\" %IF OS FreeBSD Linux |
164 | # | |
165 | # Three SATA disks on a HighPoint RocketRAID controller. | |
166 | # Start short self\-tests daily between 1\-2, 2\-3, and | |
167 | # 3\-4 am. | |
168 | .\" %ENDIF OS FreeBSD Linux | |
d008864d | 169 | .\" %IF OS Linux |
f9e10201 JD |
170 | # under Linux |
171 | /dev/sde \-d hpt,1/1 \-a \-s S/../.././01 | |
172 | /dev/sde \-d hpt,1/2 \-a \-s S/../.././02 | |
173 | /dev/sde \-d hpt,1/3 \-a \-s S/../.././03 | |
d008864d GI |
174 | .\" %ENDIF OS Linux |
175 | .\" %IF OS FreeBSD | |
f9e10201 JD |
176 | # under FreeBSD |
177 | /dev/hptrr \-d hpt,1/1 \-a \-s S/../.././01 | |
178 | /dev/hptrr \-d hpt,1/2 \-a \-s S/../.././02 | |
179 | /dev/hptrr \-d hpt,1/3 \-a \-s S/../.././03 | |
d008864d | 180 | .\" %ENDIF OS FreeBSD |
f9e10201 JD |
181 | .\" %IF OS FreeBSD Linux |
182 | # | |
183 | # Two SATA disks connected to a HighPoint RocketRAID | |
184 | # via a pmport device. Start long self\-tests Sundays | |
185 | # between midnight and 1 am and 2\-3 am. | |
186 | .\" %ENDIF OS FreeBSD Linux | |
d008864d | 187 | .\" %IF OS Linux |
f9e10201 JD |
188 | # under Linux |
189 | /dev/sde \-d hpt,1/4/1 \-a \-s L/../../7/00 | |
190 | /dev/sde \-d hpt,1/4/2 \-a \-s L/../../7/02 | |
d008864d GI |
191 | .\" %ENDIF OS Linux |
192 | .\" %IF OS FreeBSD | |
f9e10201 JD |
193 | # under FreeBSD |
194 | /dev/hptrr \-d hpt,1/4/1 \-a \-s L/../../7/00 | |
195 | /dev/hptrr \-d hpt,1/4/2 \-a \-s L/../../7/02 | |
d008864d | 196 | .\" %ENDIF OS FreeBSD |
f9e10201 JD |
197 | .\" %IF OS FreeBSD Linux |
198 | # | |
199 | # Three SATA disks connected to an Areca | |
200 | # RAID controller. Start long self\-tests Sundays | |
201 | # between midnight and 3 am. | |
202 | .\" %ENDIF OS FreeBSD Linux | |
d008864d | 203 | .\" %IF OS Linux |
f9e10201 JD |
204 | # under Linux |
205 | /dev/sg2 \-d areca,1 \-a \-s L/../../7/00 | |
206 | /dev/sg2 \-d areca,2 \-a \-s L/../../7/01 | |
207 | /dev/sg2 \-d areca,3 \-a \-s L/../../7/02 | |
d008864d GI |
208 | .\" %ENDIF OS Linux |
209 | .\" %IF OS FreeBSD | |
f9e10201 JD |
210 | # under FreeBSD |
211 | /dev/arcmsr0 \-d areca,1 \-a \-s L/../../7/00 | |
212 | /dev/arcmsr0 \-d areca,2 \-a \-s L/../../7/01 | |
213 | /dev/arcmsr0 \-d areca,3 \-a \-s L/../../7/02 | |
d008864d | 214 | .\" %ENDIF OS FreeBSD |
f9e10201 JD |
215 | .\" %IF OS Linux |
216 | # | |
217 | # Two SATA disks on an Intelliprop controller. | |
218 | # Start short self\-tests daily between 1\-2, 2\-3, and | |
219 | # 3\-4 am. | |
220 | /dev/sde \-d intelliprop,0+sat \-a \-s S/../.././01 | |
221 | /dev/sde \-d intelliprop,1+sat \-a \-s S/../.././02 | |
222 | .\" %ENDIF OS Linux | |
223 | # | |
224 | # The following line enables monitoring of the | |
225 | # ATA Error Log and the Self\-Test Error Log. | |
226 | # It also tracks changes in both Prefailure | |
227 | # and Usage Attributes, apart from Attributes | |
228 | # 9, 194, and 231, and shows continued lines: | |
229 | # | |
230 | /dev/sdd\ \-l\ error\ \e | |
231 | \ \ \ \ \ \-l\ selftest\ \e | |
232 | \ \ \ \ \ \-t\ \e\ \ \ \ \ \ \ \ \ # Attributes not tracked: | |
233 | \ \ \ \ \ \-I\ 194\ \e\ \ \ \ \ # temperature | |
234 | \ \ \ \ \ \-I\ 231\ \e\ \ \ \ \ # also temperature | |
235 | \ \ \ \ \ \-I\ 9\ \ \ \ \ \ \ \ \ # power\-on hours | |
236 | # | |
237 | ################################################ | |
238 | .Ve | |
239 | .Sp | |
832b75ed | 240 | .SH CONFIGURATION FILE DIRECTIVES |
7f0798ef | 241 | If a non-comment entry in the configuration file is the text string |
832b75ed GG |
242 | .B DEVICESCAN |
243 | in capital letters, then | |
244 | \fBsmartd\fP | |
245 | will ignore any remaining lines in the configuration file, and will | |
246 | scan for devices. | |
247 | .B DEVICESCAN | |
248 | may optionally be followed by Directives that will apply to all | |
249 | devices that are found in the scan. Please see below for additional | |
250 | details. | |
f9e10201 | 251 | .PP |
d2e702cf | 252 | If an entry in the configuration file starts with |
d008864d GI |
253 | .B DEFAULT |
254 | instead of a device name, then all directives in this entry are set | |
255 | as defaults for the next device entries. | |
d2e702cf | 256 | .PP |
d008864d | 257 | This configuration: |
d2e702cf | 258 | .PP |
f9e10201 JD |
259 | .Vb 7 |
260 | \ \ DEFAULT \-a \-R5! \-W 2,40,45 \-I 194 \-s L/../../7/00 \-m admin@example.com | |
d008864d GI |
261 | \ \ /dev/sda |
262 | \ \ /dev/sdb | |
263 | \ \ /dev/sdc | |
f9e10201 | 264 | \ \ DEFAULT \-H \-m admin@example.com |
d008864d | 265 | \ \ /dev/sdd |
f9e10201 JD |
266 | \ \ /dev/sde \-d removable |
267 | .Ve | |
d2e702cf | 268 | .PP |
d008864d | 269 | has the same effect as: |
d2e702cf | 270 | .PP |
f9e10201 JD |
271 | .Vb 5 |
272 | \ \ /dev/sda \-a \-R5! \-W 2,40,45 \-I 194 \-s L/../../7/00 \-m admin@example.com | |
273 | \ \ /dev/sdb \-a \-R5! \-W 2,40,45 \-I 194 \-s L/../../7/00 \-m admin@example.com | |
274 | \ \ /dev/sdc \-a \-R5! \-W 2,40,45 \-I 194 \-s L/../../7/00 \-m admin@example.com | |
275 | \ \ /dev/sdd \-H \-m admin@example.com | |
276 | \ \ /dev/sde \-d removable \-H \-m admin@example.com | |
277 | .Ve | |
278 | .PP | |
832b75ed GG |
279 | The following are the Directives that may appear following the device |
280 | name or | |
281 | .B DEVICESCAN | |
d008864d GI |
282 | or |
283 | .B DEFAULT | |
832b75ed GG |
284 | on any line of the |
285 | .B /usr/local/etc/smartd.conf | |
f9e10201 JD |
286 | configuration file. Note that |
287 | .B these are NOT command-line options for | |
832b75ed GG |
288 | \fBsmartd\fP. |
289 | The Directives below may appear in any order, following the device | |
f9e10201 JD |
290 | name. |
291 | .PP | |
832b75ed GG |
292 | .B For an ATA device, |
293 | if no Directives appear, then the device will be monitored | |
f9e10201 JD |
294 | as if the \*(Aq\-a\*(Aq Directive (monitor all SMART properties) had been given. |
295 | .PP | |
832b75ed GG |
296 | .B If a SCSI disk is listed, |
297 | it will be monitored at the maximum implemented level: roughly | |
f9e10201 JD |
298 | equivalent to using the \*(Aq\-H \-l selftest\*(Aq options for an ATA disk. |
299 | So with the exception of \*(Aq\-d\*(Aq, \*(Aq\-m\*(Aq, \*(Aq\-l selftest\*(Aq, | |
300 | \*(Aq\-s\*(Aq, and \*(Aq\-M\*(Aq, the Directives below are ignored for SCSI disks. | |
301 | For SCSI disks, the \*(Aq\-m\*(Aq Directive sends a warning email if the SMART | |
302 | status indicates a disk failure or problem, if the SCSI inquiry about disk | |
832b75ed | 303 | status fails, or if new errors appear in the self-test log. |
f9e10201 JD |
304 | .\" %IF OS FreeBSD Linux |
305 | .PP | |
832b75ed | 306 | .B If a 3ware controller is used |
cfbba5b9 | 307 | then the corresponding SCSI (/dev/sd?) or character device (/dev/twe?, |
f9e10201 JD |
308 | /dev/twa?, /dev/twl? or /dev/tws?) must be listed, along with the |
309 | \*(Aq\-d 3ware,N\*(Aq Directive (see below). | |
310 | The individual ATA disks hosted by the 3ware controller appear to \fBsmartd\fP | |
311 | as normal ATA devices. | |
312 | Hence all the ATA directives can be used for these disks (but see note below). | |
313 | .PP | |
2127e193 | 314 | .B If an Areca controller is used |
f9e10201 JD |
315 | then the corresponding device (SCSI /dev/sg? on Linux or /dev/arcmsr0 on |
316 | FreeBSD) must be listed, along with the \*(Aq\-d areca,N\*(Aq Directive | |
317 | (see below). | |
d008864d GI |
318 | The individual SATA disks hosted by the Areca controller appear to \fBsmartd\fP |
319 | as normal ATA devices. Hence all the ATA directives can be used for | |
2127e193 | 320 | these disks. Areca firmware version 1.46 or later which supports |
bed94269 GI |
321 | smartmontools must be used; Please see the \fBsmartctl\fP(8) man page |
322 | for further details. | |
f9e10201 | 323 | .\" %ENDIF OS FreeBSD Linux |
832b75ed GG |
324 | .TP |
325 | .B \-d TYPE | |
cfbba5b9 GI |
326 | Specifies the type of the device. |
327 | The valid arguments to this directive are: | |
f9e10201 | 328 | .Sp |
cfbba5b9 | 329 | .I auto |
ee38a438 | 330 | \- attempt to guess the device type from the device name or from |
cfbba5b9 GI |
331 | controller type info provided by the operating system or from |
332 | a matching USB ID entry in the drive database. | |
333 | This is the default. | |
f9e10201 | 334 | .Sp |
832b75ed GG |
335 | .I ata |
336 | \- the device type is ATA. This prevents | |
337 | \fBsmartd\fP | |
338 | from issuing SCSI commands to an ATA device. | |
f9e10201 | 339 | .Sp |
d008864d | 340 | .\" %IF NOT OS Darwin |
832b75ed GG |
341 | .I scsi |
342 | \- the device type is SCSI. This prevents | |
343 | \fBsmartd\fP | |
344 | from issuing ATA commands to a SCSI device. | |
f9e10201 | 345 | .Sp |
a86ec89e | 346 | .\" %ENDIF NOT OS Darwin |
f9e10201 | 347 | .\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin |
a86ec89e | 348 | .I nvme[,NSID] |
f9e10201 | 349 | \- [NEW EXPERIMENTAL SMARTCTL FEATURE] |
a86ec89e GI |
350 | the device type is NVM Express (NVMe). |
351 | The optional parameter NSID specifies the namespace id (in hex) passed | |
352 | to the driver. | |
353 | Use 0xffffffff for the broadcast namespace id. | |
354 | The default for NSID is the namespace id addressed by the device name. | |
f9e10201 JD |
355 | .Sp |
356 | .\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin | |
a86ec89e | 357 | .\" %IF NOT OS Darwin |
d008864d | 358 | .I sat[,auto][,N] |
4d59bff9 | 359 | \- the device type is SCSI to ATA Translation (SAT). |
f9e10201 JD |
360 | This is for ATA disks that have a SCSI to ATA Translation Layer (SATL) |
361 | between the disk and the operating system. | |
cfbba5b9 GI |
362 | SAT defines two ATA PASS THROUGH SCSI commands, one 12 bytes long and |
363 | the other 16 bytes long. The default is the 16 byte variant which can be | |
f9e10201 JD |
364 | overridden with either \*(Aq\-d sat,12\*(Aq or \*(Aq\-d sat,16\*(Aq. |
365 | .Sp | |
366 | If \*(Aq\-d sat,auto\*(Aq is specified, device type SAT (for ATA/SATA disks) | |
367 | is only used if the SCSI INQUIRY data reports a SATL (VENDOR: "ATA "). | |
d008864d | 368 | Otherwise device type SCSI (for SCSI/SAS disks) is used. |
f9e10201 | 369 | .Sp |
cfbba5b9 GI |
370 | .I usbcypress |
371 | \- this device type is for ATA disks that are behind a Cypress USB to PATA | |
372 | bridge. This will use the ATACB proprietary scsi pass through command. | |
373 | The default SCSI operation code is 0x24, but although it can be overridden | |
f9e10201 | 374 | with \*(Aq\-d usbcypress,0xN\*(Aq, where N is the scsi operation code, |
cfbba5b9 | 375 | you're running the risk of damage to the device or filesystems on it. |
f9e10201 | 376 | .Sp |
ee38a438 GI |
377 | .I usbjmicron[,p][,x][,PORT] |
378 | \- this device type is for SATA disks that are behind a JMicron USB to | |
f9e10201 JD |
379 | PATA/SATA bridge. |
380 | The 48-bit ATA commands (required e.g.\& for \*(Aq\-l xerror\*(Aq, see below) | |
381 | do not work with all of these bridges and are therefore disabled by default. | |
382 | These commands can be enabled by \*(Aq\-d usbjmicron,x\*(Aq. | |
383 | If two disks are connected to a bridge with two ports, an error message is | |
384 | printed if no PORT is specified. | |
385 | The port can be specified by \*(Aq\-d usbjmicron[,x],PORT\*(Aq where PORT is 0 | |
cfbba5b9 GI |
386 | (master) or 1 (slave). This is not necessary if the device uses a port |
387 | multiplier to connect multiple disks to one port. The disks appear under | |
388 | separate /dev/ice names then. | |
f9e10201 | 389 | CAUTION: Specifying \*(Aq,x\*(Aq for a device which does not support it results |
cfbba5b9 GI |
390 | in I/O errors and may disconnect the drive. The same applies if the specified |
391 | PORT does not exist or is not connected to a disk. | |
f9e10201 | 392 | .Sp |
ee38a438 | 393 | The Prolific PL2507/3507 USB bridges with older firmware support a pass-through |
f9e10201 | 394 | command similar to JMicron and work with \*(Aq\-d usbjmicron,0\*(Aq. |
ee38a438 | 395 | Newer Prolific firmware requires a modified command which can be selected by |
f9e10201 | 396 | \*(Aq\-d usbjmicron,p\*(Aq. |
ee38a438 | 397 | Note that this does not yet support the SMART status command. |
f9e10201 | 398 | .Sp |
a86ec89e | 399 | .I usbprolific |
f9e10201 JD |
400 | \- this device type is for SATA disks that are behind a Prolific |
401 | PL2571/2771/2773/2775 USB to SATA bridge. | |
402 | .Sp | |
cfbba5b9 GI |
403 | .I usbsunplus |
404 | \- this device type is for SATA disks that are behind a SunplusIT USB to SATA | |
405 | bridge. | |
f9e10201 | 406 | .Sp |
d008864d GI |
407 | .\" %ENDIF NOT OS Darwin |
408 | .\" %IF OS Linux | |
832b75ed | 409 | .I marvell |
cfbba5b9 | 410 | \- [Linux only] interact with SATA disks behind Marvell chip-set |
832b75ed | 411 | controllers (using the Marvell rather than libata driver). |
f9e10201 | 412 | .Sp |
2127e193 | 413 | .I megaraid,N |
cfbba5b9 GI |
414 | \- [Linux only] the device consists of one or more SCSI/SAS disks connected |
415 | to a MegaRAID controller. The non-negative integer N (in the range of 0 to | |
416 | 127 inclusive) denotes which disk on the controller is monitored. | |
417 | This interface will also work for Dell PERC controllers. | |
2127e193 GI |
418 | In log files and email messages this disk will be identified as |
419 | megaraid_disk_XXX with XXX in the range from 000 to 127 inclusive. | |
f9e10201 | 420 | It is possible to set RAID device name as /dev/bus/N, where N is a SCSI bus |
ee38a438 | 421 | number. |
cfbba5b9 | 422 | Please see the \fBsmartctl\fP(8) man page for further details. |
f9e10201 | 423 | .Sp |
a86ec89e GI |
424 | .\" %ENDIF OS Linux |
425 | .\" %IF OS Linux Windows Cygwin | |
d2e702cf | 426 | .I aacraid,H,L,ID |
f9e10201 JD |
427 | \- [Linux, Windows and Cygwin only] the device consists of one or more |
428 | SCSI/SAS disks connected to an AacRaid controller. | |
d2e702cf GI |
429 | The non-negative integers H,L,ID (Host number, Lun, ID) denote which disk |
430 | on the controller is monitored. | |
f9e10201 JD |
431 | In log files and email messages this disk will be identified as |
432 | aacraid_disk_HH_LL_ID. | |
d2e702cf | 433 | Please see the \fBsmartctl\fP(8) man page for further details. |
f9e10201 | 434 | .Sp |
a86ec89e | 435 | .\" %ENDIF OS Linux Windows Cygwin |
d008864d | 436 | .\" %IF OS FreeBSD Linux |
832b75ed | 437 | .I 3ware,N |
cfbba5b9 GI |
438 | \- [FreeBSD and Linux only] the device consists of one or more ATA disks |
439 | connected to a 3ware RAID controller. The non-negative integer N | |
440 | (in the range from 0 to 127 inclusive) denotes which disk on the controller | |
441 | is monitored. | |
442 | In log files and email messages this disk will be identified as 3ware_disk_XXX | |
2127e193 | 443 | with XXX in the range from 000 to 127 inclusive. |
f9e10201 | 444 | .Sp |
cfbba5b9 GI |
445 | Note that while you may use \fBany\fP of the 3ware SCSI logical devices /dev/tw* |
446 | to address \fBany\fP of the physical disks (3ware ports), error and log | |
832b75ed | 447 | messages will make the most sense if you always list the 3ware SCSI |
cfbba5b9 GI |
448 | logical device corresponding to the particular physical disks. |
449 | Please see the \fBsmartctl\fP(8) man page for further details. | |
f9e10201 | 450 | .Sp |
d008864d | 451 | .\" %ENDIF OS FreeBSD Linux |
f4e463df | 452 | .\" %IF OS FreeBSD Linux Windows Cygwin |
2127e193 | 453 | .I areca,N |
f9e10201 JD |
454 | \- [FreeBSD, Linux, Windows and Cygwin only] the device consists of one or |
455 | more SATA disks connected to an Areca SATA RAID controller. | |
456 | The positive integer N (in the range from 1 to 24 inclusive) denotes which | |
457 | disk on the controller is monitored. | |
458 | In log files and email messages this disk will be identified as | |
2127e193 | 459 | areca_disk_XX with XX in the range from 01 to 24 inclusive. |
cfbba5b9 | 460 | Please see the \fBsmartctl\fP(8) man page for further details. |
f9e10201 | 461 | .Sp |
f4e463df | 462 | .I areca,N/E |
a86ec89e GI |
463 | \- [FreeBSD, Linux, Windows and Cygwin only] the device consists of one |
464 | or more SATA or SAS disks connected to an Areca SAS RAID controller. | |
f4e463df GI |
465 | The integer N (range 1 to 128) denotes the channel (slot) and E (range |
466 | 1 to 8) denotes the enclosure. | |
ee38a438 | 467 | Important: This requires Areca SAS controller firmware version 1.51 or later. |
f9e10201 | 468 | .Sp |
f4e463df | 469 | .\" %ENDIF OS FreeBSD Linux Windows Cygwin |
d008864d | 470 | .\" %IF OS FreeBSD Linux |
ba59cff1 | 471 | .I cciss,N |
f9e10201 JD |
472 | \- [FreeBSD and Linux only] the device consists of one or more SCSI/SAS or |
473 | SATA disks connected to a cciss RAID controller. | |
474 | The non-negative integer N (in the range from 0 to 15 inclusive) denotes | |
475 | which disk on the controller is monitored. | |
cfbba5b9 | 476 | In log files and email messages this disk will be identified as cciss_disk_XX |
ba59cff1 | 477 | with XX in the range from 00 to 15 inclusive. |
cfbba5b9 | 478 | Please see the \fBsmartctl\fP(8) man page for further details. |
f9e10201 | 479 | .Sp |
4d59bff9 | 480 | .I hpt,L/M/N |
cfbba5b9 GI |
481 | \- [FreeBSD and Linux only] the device consists of one or more ATA disks |
482 | connected to a HighPoint RocketRAID controller. The integer L is the | |
483 | controller id, the integer M is the channel number, and the integer N | |
484 | is the PMPort number if it is available. The allowed values of L are | |
3d17a85c | 485 | from 1 to 4 inclusive, M are from 1 to 128 inclusive and N from 1 to 4 |
cfbba5b9 GI |
486 | if PMPort available. And also these values are limited by the model |
487 | of the HighPoint RocketRAID controller. | |
4d59bff9 GG |
488 | In log files and email messages this disk will be identified as |
489 | hpt_X/X/X and X/X/X is the same as L/M/N, note if no N indicated, N set | |
490 | to the default value 1. | |
cfbba5b9 | 491 | Please see the \fBsmartctl\fP(8) man page for further details. |
f9e10201 | 492 | .Sp |
d008864d | 493 | .\" %ENDIF OS FreeBSD Linux |
f9e10201 JD |
494 | .I intelliprop,N[+TYPE] |
495 | \- [NEW EXPERIMENTAL SMARTD FEATURE] the device consists of multiple ATA | |
496 | disks connected to an Intelliprop controller. | |
497 | The integer N is the port number from 0 to 3 of the ATA drive to be targeted. | |
498 | Please see the \fBsmartctl\fP(8) man page for further details. | |
499 | .Sp | |
ee38a438 | 500 | .I ignore |
a86ec89e | 501 | \- the device specified by this configuration entry should be ignored. |
ee38a438 GI |
502 | This allows to ignore specific devices which are detected by a following |
503 | DEVICESCAN configuration line. | |
504 | It may also be used to temporary disable longer multi-line configuration entries. | |
f9e10201 JD |
505 | This Directive may be used in conjunction with the other \*(Aq\-d\*(Aq |
506 | Directives. | |
507 | .Sp | |
832b75ed GG |
508 | .I removable |
509 | \- the device or its media is removable. This indicates to | |
510 | \fBsmartd\fP | |
511 | that it should continue (instead of exiting, which is the default | |
512 | behavior) if the device does not appear to be present when | |
513 | \fBsmartd\fP is started. This Directive may be used in conjunction | |
f9e10201 JD |
514 | with the other \*(Aq\-d\*(Aq Directives. |
515 | [NEW EXPERIMENTAL SMARTD FEATURE] | |
516 | This directive also suppresses warning emails and repeated log messages | |
517 | if the device is removed after startup. | |
518 | \fBWARNING: Removing a device and connecting a different one to same interface | |
519 | is not supported and may result in bogus warnings until smartd is restarted.\fP | |
832b75ed | 520 | .TP |
2127e193 | 521 | .B \-n POWERMODE[,N][,q] |
f9e10201 | 522 | [ATA only] This \*(Aqnocheck\*(Aq Directive is used to prevent a disk from |
cfbba5b9 | 523 | being spun-up when it is periodically polled by \fBsmartd\fP. |
f9e10201 JD |
524 | .Sp |
525 | ATA disks have five different power states. In order of increasing | |
526 | power consumption they are: \*(AqOFF\*(Aq, \*(AqSLEEP\*(Aq, | |
527 | \*(AqSTANDBY\*(Aq, \*(AqIDLE\*(Aq, and \*(AqACTIVE\*(Aq. | |
528 | Typically in the OFF, SLEEP, and STANDBY modes the disk's platters are not | |
529 | spinning. | |
530 | But usually, in response to SMART commands issued by \fBsmartd\fP, the disk | |
531 | platters are spun up. | |
532 | So if this option is not used, then a disk which is in a low-power mode may | |
ee38a438 | 533 | be spun up and put into a higher-power mode when it is periodically |
832b75ed | 534 | polled by \fBsmartd\fP. |
f9e10201 | 535 | .Sp |
832b75ed GG |
536 | Note that if the disk is in SLEEP mode when \fBsmartd\fP is started, |
537 | then it won't respond to \fBsmartd\fP commands, and so the disk won't | |
f9e10201 | 538 | be registered as a device for \fBsmartd\fP to monitor. If a disk is in |
ee38a438 GI |
539 | any other low-power mode, then the commands issued by \fBsmartd\fP to |
540 | register the disk will probably cause it to spin-up. | |
f9e10201 JD |
541 | .Sp |
542 | The \*(Aq\fB\-n\fP\*(Aq (nocheck) Directive specifies if \fBsmartd\fP's | |
832b75ed | 543 | periodic checks should still be carried out when the device is in a |
ee38a438 | 544 | low-power mode. It may be used to prevent a disk from being spun-up |
832b75ed GG |
545 | by periodic \fBsmartd\fP polling. The allowed values of POWERMODE |
546 | are: | |
f9e10201 | 547 | .Sp |
832b75ed GG |
548 | .I never |
549 | \- \fBsmartd\fP will poll (check) the device regardless of its power | |
f9e10201 | 550 | mode. This may cause a disk which is spun-down to be spun-up when |
832b75ed GG |
551 | \fBsmartd\fP checks it. This is the default behavior if the '\-n' |
552 | Directive is not given. | |
f9e10201 | 553 | .Sp |
832b75ed GG |
554 | .I sleep |
555 | \- check the device unless it is in SLEEP mode. | |
f9e10201 | 556 | .Sp |
832b75ed GG |
557 | .I standby |
558 | \- check the device unless it is in SLEEP or STANDBY mode. In | |
559 | these modes most disks are not spinning, so if you want to prevent | |
560 | a laptop disk from spinning up each time that \fBsmartd\fP polls, | |
561 | this is probably what you want. | |
f9e10201 | 562 | .Sp |
832b75ed GG |
563 | .I idle |
564 | \- check the device unless it is in SLEEP, STANDBY or IDLE mode. | |
565 | In the IDLE state, most disks are still spinning, so this is probably | |
566 | not what you want. | |
f9e10201 | 567 | .Sp |
2127e193 | 568 | Maximum number of skipped checks (in a row) can be specified by |
f9e10201 JD |
569 | appending positive number \*(Aq,N\*(Aq to POWERMODE (like |
570 | \*(Aq\-n standby,15\*(Aq). | |
2127e193 GI |
571 | After N checks are skipped in a row, powermode is ignored and the |
572 | check is performed anyway. | |
f9e10201 | 573 | .Sp |
832b75ed | 574 | When a periodic test is skipped, \fBsmartd\fP normally writes an |
f9e10201 JD |
575 | informal log message. The message can be suppressed by appending |
576 | the option \*(Aq,q\*(Aq to POWERMODE (like \*(Aq\-n standby,q\*(Aq). | |
832b75ed | 577 | This prevents a laptop disk from spinning up due to this message. |
f9e10201 JD |
578 | .Sp |
579 | Both \*(Aq,N\*(Aq and \*(Aq,q\*(Aq can be specified together. | |
832b75ed GG |
580 | .TP |
581 | .B \-T TYPE | |
582 | Specifies how tolerant | |
583 | \fBsmartd\fP | |
584 | should be of SMART command failures. The valid arguments to this | |
585 | Directive are: | |
f9e10201 | 586 | .Sp |
832b75ed GG |
587 | .I normal |
588 | \- do not try to monitor the disk if a mandatory SMART command fails, but | |
589 | continue if an optional SMART command fails. This is the default. | |
f9e10201 | 590 | .Sp |
832b75ed GG |
591 | .I permissive |
592 | \- try to monitor the disk even if it appears to lack SMART | |
593 | capabilities. This may be required for some old disks (prior to | |
ee38a438 GI |
594 | ATA-3 revision 4) that implemented SMART before the SMART standards |
595 | were incorporated into the ATA/ATAPI Specifications. | |
832b75ed GG |
596 | [Please see the \fBsmartctl \-T\fP command-line option.] |
597 | .TP | |
598 | .B \-o VALUE | |
cfbba5b9 | 599 | [ATA only] Enables or disables SMART Automatic Offline Testing when |
832b75ed GG |
600 | \fBsmartd\fP |
601 | starts up and has no further effect. The valid arguments to this | |
602 | Directive are \fIon\fP and \fIoff\fP. | |
f9e10201 | 603 | .Sp |
832b75ed GG |
604 | The delay between tests is vendor-specific, but is typically four |
605 | hours. | |
f9e10201 | 606 | .Sp |
832b75ed GG |
607 | Note that SMART Automatic Offline Testing is \fBnot\fP part of the ATA |
608 | Specification. Please see the | |
609 | .B smartctl \-o | |
610 | command-line option documentation for further information about this | |
611 | feature. | |
612 | .TP | |
613 | .B \-S VALUE | |
614 | Enables or disables Attribute Autosave when \fBsmartd\fP | |
615 | starts up and has no further effect. The valid arguments to this | |
616 | Directive are \fIon\fP and \fIoff\fP. Also affects SCSI devices. | |
617 | [Please see the \fBsmartctl \-S\fP command-line option.] | |
618 | .TP | |
619 | .B \-H | |
a86ec89e GI |
620 | [ATA] Check the health status of the disk with the SMART RETURN |
621 | STATUS command. | |
622 | If this command reports a failing health status, then disk | |
832b75ed | 623 | failure is predicted in less than 24 hours, and a message at loglevel |
f9e10201 | 624 | .B \*(AqLOG_CRIT\*(Aq |
832b75ed GG |
625 | will be logged to syslog. [Please see the |
626 | .B smartctl \-H | |
627 | command-line option.] | |
f9e10201 JD |
628 | .\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin |
629 | .Sp | |
630 | [NVMe] | |
a86ec89e GI |
631 | [NEW EXPERIMENTAL SMARTD FEATURE] |
632 | Checks the "Critical Warning" byte from the SMART/Health Information log. | |
f9e10201 | 633 | If any warning bit is set, a message at loglevel \fB\*(AqLOG_CRIT\*(Aq\fP |
a86ec89e | 634 | will be logged to syslog. |
f9e10201 | 635 | .\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin |
832b75ed GG |
636 | .TP |
637 | .B \-l TYPE | |
e9583e0c | 638 | Reports increases in the number of errors in one of three SMART logs. The |
832b75ed | 639 | valid arguments to this Directive are: |
f9e10201 | 640 | .Sp |
832b75ed | 641 | .I error |
a86ec89e | 642 | \- [ATA] report if the number of ATA errors reported in the Summary SMART |
cfbba5b9 | 643 | error log has increased since the last check. |
f9e10201 JD |
644 | .Sp |
645 | .\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin | |
a86ec89e | 646 | .I error |
f9e10201 | 647 | \- [NVMe] |
a86ec89e GI |
648 | [NEW EXPERIMENTAL SMARTD FEATURE] |
649 | report if the "Number of Error Information Log Entries" from the | |
650 | SMART/Health Information log has increased since the last check. | |
f9e10201 JD |
651 | .Sp |
652 | .\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin | |
e9583e0c | 653 | .I xerror |
a86ec89e | 654 | \- [ATA] report if the number of ATA errors reported in the Extended |
d008864d | 655 | Comprehensive SMART error log has increased since the last check. |
f9e10201 JD |
656 | .Sp |
657 | If both \*(Aq\-l error\*(Aq and \*(Aq\-l xerror\*(Aq are specified, smartd | |
658 | checks the maximum of both values. | |
659 | .Sp | |
e9583e0c | 660 | [Please see the \fBsmartctl \-l xerror\fP command-line option.] |
f9e10201 JD |
661 | .Sp |
662 | .\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin | |
a86ec89e | 663 | .I xerror |
f9e10201 | 664 | \- [NVMe] |
a86ec89e | 665 | [NEW EXPERIMENTAL SMARTD FEATURE] |
f9e10201 JD |
666 | same as \*(Aq\-l error\*(Aq. |
667 | .\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin | |
668 | .Sp | |
832b75ed GG |
669 | .I selftest |
670 | \- report if the number of failed tests reported in the SMART | |
671 | Self-Test Log has increased since the last check, or if the timestamp | |
672 | associated with the most recent failed test has increased. Note that | |
673 | such errors will \fBonly\fP be logged if you run self-tests on the | |
674 | disk (and it fails a test!). Self-Tests can be run automatically by | |
f9e10201 JD |
675 | \fBsmartd\fP: please see the \*(Aq\-s\*(Aq Directive below. |
676 | Self-Tests can also be run manually by using the \*(Aq\-t short\*(Aq | |
677 | and \fB\*(Aq\-t\ long\*(Aq\fP options of \fBsmartctl\fP and the results of | |
678 | the testing can be observed using the \fBsmartctl \*(Aq\-l\ selftest\*(Aq\fP | |
cfbba5b9 | 679 | command-line option. |
832b75ed GG |
680 | [Please see the \fBsmartctl \-l\fP and \fB\-t\fP command-line |
681 | options.] | |
f9e10201 | 682 | .Sp |
cfbba5b9 | 683 | [ATA only] Failed self-tests outdated by a newer successful extended |
ee38a438 | 684 | self-test are ignored. The warning email counter is reset if the |
d008864d | 685 | number of failed self tests dropped to 0. This typically happens when |
ee38a438 | 686 | an extended self-test is run after all bad sectors have been reallocated. |
f9e10201 | 687 | .Sp |
d008864d GI |
688 | .I offlinests[,ns] |
689 | \- [ATA only] report if the Offline Data Collection status has changed | |
690 | since the last check. The report will be logged as LOG_CRIT if the new | |
691 | status indicates an error. With some drives the status often changes, | |
f9e10201 | 692 | therefore \*(Aq\-l offlinests\*(Aq is not enabled by \*(Aq\-a\*(Aq Directive. |
d008864d | 693 | .\" %IF NOT OS Cygwin Windows |
f9e10201 | 694 | .\"! Appending ',ns' (no standby) to this directive is not implemented |
d008864d GI |
695 | .\"! on OS_MAN_FILTER. |
696 | .\" %ENDIF NOT OS Cygwin Windows | |
697 | .\" %IF OS Cygwin Windows | |
f9e10201 JD |
698 | .Sp |
699 | [Windows and Cygwin only] If \*(Aq,ns\*(Aq (no standby) is appended to this | |
d008864d | 700 | directive, smartd disables system auto standby as long as an Offline |
f9e10201 | 701 | Data Collection is in progress. See \*(Aq\-l selfteststs,ns\*(Aq below. |
d008864d | 702 | .\" %ENDIF OS Cygwin Windows |
f9e10201 | 703 | .Sp |
d008864d GI |
704 | .I selfteststs[,ns] |
705 | \- [ATA only] report if the Self-Test execution status has changed | |
706 | since the last check. The report will be logged as LOG_CRIT if the new | |
707 | status indicates an error. | |
708 | .\" %IF NOT OS Cygwin Windows | |
f9e10201 | 709 | .\"! Appending ',ns' (no standby) to this directive is not implemented |
d008864d GI |
710 | .\"! on OS_MAN_FILTER. |
711 | .\" %ENDIF NOT OS Cygwin Windows | |
712 | .\" %IF OS Cygwin Windows | |
f9e10201 JD |
713 | .Sp |
714 | [Windows and Cygwin only] If \*(Aq,ns\*(Aq (no standby) is appended to this | |
d008864d GI |
715 | directive, smartd disables system auto standby as long as a Self-Test |
716 | is in progress. This prevents that a Self-Test is aborted because the | |
717 | OS sets the system to a standby/sleep mode when idle. Smartd check | |
f9e10201 | 718 | interval (\*(Aq\-i\*(Aq option) should be shorter than the configured idle |
d008864d GI |
719 | timeout. Auto standby is not disabled if the system is running on |
720 | battery. | |
721 | .\" %ENDIF OS Cygwin Windows | |
f9e10201 | 722 | .Sp |
cfbba5b9 | 723 | .I scterc,READTIME,WRITETIME |
f4e463df GI |
724 | \- [ATA only] sets the SCT Error Recovery Control settings to the specified |
725 | values (deciseconds) when \fBsmartd\fP starts up and has no further effect. | |
cfbba5b9 GI |
726 | Values of 0 disable the feature, other values less than 65 are probably |
727 | not supported. For RAID configurations, this is typically set to | |
728 | 70,70 deciseconds. | |
729 | [Please see the \fBsmartctl \-l scterc\fP command-line option.] | |
d008864d | 730 | .TP |
ee38a438 GI |
731 | .B \-e NAME[,VALUE] |
732 | Sets non-SMART device settings when \fBsmartd\fP starts up and has no | |
733 | further effect. | |
d008864d GI |
734 | [Please see the \fBsmartctl \-\-set\fP command-line option.] |
735 | Valid arguments are: | |
f9e10201 | 736 | .Sp |
d008864d GI |
737 | .I aam,[N|off] |
738 | \- [ATA only] Sets the Automatic Acoustic Management (AAM) feature. | |
f9e10201 | 739 | .Sp |
d008864d GI |
740 | .I apm,[N|off] |
741 | \- [ATA only] Sets the Advanced Power Management (APM) feature. | |
f9e10201 | 742 | .Sp |
d008864d GI |
743 | .I lookahead,[on|off] |
744 | \- [ATA only] Sets the read look-ahead feature. | |
f9e10201 | 745 | .Sp |
d008864d GI |
746 | .I security-freeze |
747 | \- [ATA only] Sets ATA Security feature to frozen mode. | |
f9e10201 | 748 | .Sp |
d008864d GI |
749 | .I standby,[N|off] |
750 | \- [ATA only] Sets the standby (spindown) timer and places the drive in the | |
751 | IDLE mode. | |
f9e10201 | 752 | .Sp |
d008864d GI |
753 | .I wcache,[on|off] |
754 | \- [ATA only] Sets the volatile write cache feature. | |
f9e10201 JD |
755 | .Sp |
756 | .I dsn,[on|off] | |
757 | \- [ATA only] | |
758 | [NEW EXPERIMENTAL SMARTD FEATURE] | |
759 | Sets the DSN feature. | |
832b75ed GG |
760 | .TP |
761 | .B \-s REGEXP | |
762 | Run Self-Tests or Offline Immediate Tests, at scheduled times. A | |
763 | Self- or Offline Immediate Test will be run at the end of periodic | |
764 | device polling, if all 12 characters of the string \fBT/MM/DD/d/HH\fP | |
f9e10201 | 765 | match the extended regular expression \fBREGEXP\fP. Here: |
832b75ed GG |
766 | .RS 7 |
767 | .IP \fBT\fP 4 | |
768 | is the type of the test. The values that \fBsmartd\fP will try to | |
f9e10201 JD |
769 | match (in turn) are: \*(AqL\*(Aq for a \fBL\fPong Self-Test, \*(AqS\*(Aq for a |
770 | \fBS\fPhort Self-Test, \*(AqC\*(Aq for a \fBC\fPonveyance Self-Test (ATA | |
771 | only), and \*(AqO\*(Aq for an \fBO\fPffline Immediate Test (ATA only). As | |
832b75ed GG |
772 | soon as a match is found, the test will be started and no additional |
773 | matches will be sought for that device and that polling cycle. | |
f9e10201 JD |
774 | .Sp |
775 | To run scheduled Selective Self-Tests, use \*(Aqn\*(Aq for \fBn\fPext span, | |
776 | \*(Aqr\*(Aq to \fBr\fPedo last span, or \*(Aqc\*(Aq to \fBc\fPontinue with | |
777 | next span or redo last span based on status of last test. | |
cfbba5b9 | 778 | The LBA range is based on the first span from the last test. |
2127e193 GI |
779 | See the \fBsmartctl \-t select,[next|redo|cont]\fP options for |
780 | further info. | |
f9e10201 JD |
781 | .Sp |
782 | Some disks (e.g.\& WD) do not preserve the selective self test log across | |
783 | power cycles. If state persistence (\*(Aq\-s\*(Aq option) is enabled, the last | |
f4e463df GI |
784 | test span is preserved by smartd and used if (and only if) the selective |
785 | self test log is empty. | |
832b75ed GG |
786 | .IP \fBMM\fP 4 |
787 | is the month of the year, expressed with two decimal digits. The | |
788 | range is from 01 (January) to 12 (December) inclusive. Do \fBnot\fP | |
789 | use a single decimal digit or the match will always fail! | |
790 | .IP \fBDD\fP 4 | |
f9e10201 | 791 | is the day of the month, expressed with two decimal digits. The |
832b75ed GG |
792 | range is from 01 to 31 inclusive. Do \fBnot\fP |
793 | use a single decimal digit or the match will always fail! | |
794 | .IP \fBd\fP 4 | |
795 | is the day of the week, expressed with one decimal digit. The | |
796 | range is from 1 (Monday) to 7 (Sunday) inclusive. | |
797 | .IP \fBHH\fP 4 | |
798 | is the hour of the day, written with two decimal digits, and given in | |
f9e10201 | 799 | hours after midnight. The range is 00 (midnight to just before 1 am) |
832b75ed GG |
800 | to 23 (11pm to just before midnight) inclusive. Do \fBnot\fP use a |
801 | single decimal digit or the match will always fail! | |
802 | .RE | |
803 | .\" The following two lines are a workaround for a man2html bug. Please leave them. | |
804 | .\" They define a non-existent option; useful because man2html can't correctly reset the margins. | |
805 | .TP | |
806 | .B \& | |
807 | Some examples follow. In reading these, keep in mind that in extended | |
f9e10201 JD |
808 | regular expressions a dot \fB\*(Aq.\*(Aq\fP matches any single character, and |
809 | a parenthetical expression such as \fB\*(Aq(A|B|C)\*(Aq\fP denotes any one | |
810 | of the three possibilities \fBA\fP, \fBB\fP, or \fBC\fP. | |
811 | .Sp | |
812 | To schedule a short Self-Test between 2\(en3 am every morning, use: | |
813 | .br | |
832b75ed | 814 | \fB \-s S/../.././02\fP |
f9e10201 JD |
815 | .br |
816 | To schedule a long Self-Test between 4\(en5 am every Sunday morning, use: | |
817 | .br | |
832b75ed | 818 | \fB \-s L/../../7/04\fP |
f9e10201 JD |
819 | .br |
820 | To schedule a long Self-Test between 10\(en11 pm on the first and | |
832b75ed | 821 | fifteenth day of each month, use: |
f9e10201 | 822 | .br |
832b75ed | 823 | \fB \-s L/../(01|15)/./22\fP |
f9e10201 JD |
824 | .br |
825 | To schedule an Offline Immediate test after every midnight, 6 am, | |
826 | noon, and 6 pm, plus a Short Self-Test daily at 1\(en2 am and a Long | |
827 | Self-Test every Saturday at 3\(en4 am, use: | |
828 | .br | |
832b75ed | 829 | \fB \-s (O/../.././(00|06|12|18)|S/../.././01|L/../../6/03)\fP |
f9e10201 | 830 | .br |
2127e193 GI |
831 | If Long Self-Tests of a large disks take longer than the system uptime, |
832 | a full disk test can be performed by several Selective Self-Tests. | |
f9e10201 | 833 | To setup a full test of a 1 TB disk within 20 days (one 50 GB span |
2127e193 GI |
834 | each day), run this command once: |
835 | .nf | |
f9e10201 | 836 | smartctl \-t select,0\-99999999 /dev/sda |
2127e193 | 837 | .fi |
f9e10201 | 838 | To run the next test spans on Monday\(enFriday between 12\(en13 am, run smartd |
2127e193 | 839 | with this directive: |
f9e10201 JD |
840 | .br |
841 | \fB \-s n/../../[1\-5]/12\fP | |
842 | .Sp | |
832b75ed GG |
843 | Scheduled tests are run immediately following the regularly-scheduled |
844 | device polling, if the current local date, time, and test type, match | |
845 | \fBREGEXP\fP. By default the regularly-scheduled device polling | |
846 | occurs every thirty minutes after starting \fBsmartd\fP. Take caution | |
f9e10201 | 847 | if you use the \*(Aq\-i\*(Aq option to make this polling interval more than |
832b75ed | 848 | sixty minutes: the poll times may fail to coincide with any of the |
2127e193 GI |
849 | testing times that you have specified with \fBREGEXP\fP. In this case |
850 | the test will be run following the next device polling. | |
f9e10201 | 851 | .Sp |
832b75ed GG |
852 | Before running an offline or self-test, \fBsmartd\fP checks to be sure |
853 | that a self-test is not already running. If a self-test \fBis\fP | |
854 | already running, then this running self test will \fBnot\fP be | |
855 | interrupted to begin another test. | |
f9e10201 | 856 | .Sp |
832b75ed GG |
857 | \fBsmartd\fP will not attempt to run \fBany\fP type of test if another |
858 | test was already started or run in the same hour. | |
f9e10201 | 859 | .Sp |
a37e7145 GG |
860 | To avoid performance problems during system boot, \fBsmartd\fP will |
861 | not attempt to run any scheduled tests following the very first | |
f9e10201 JD |
862 | device polling (unless \*(Aq\-q onecheck\*(Aq is specified). |
863 | .Sp | |
832b75ed | 864 | Each time a test is run, \fBsmartd\fP will log an entry to SYSLOG. |
f9e10201 | 865 | You can use these or the \*(Aq\-q showtests\*(Aq command-line option to verify |
832b75ed GG |
866 | that you constructed \fBREGEXP\fP correctly. The matching order |
867 | (\fBL\fP before \fBS\fP before \fBC\fP before \fBO\fP) ensures that | |
868 | if multiple test types are all scheduled for the same hour, the | |
869 | longer test type has precedence. This is usually the desired behavior. | |
f9e10201 | 870 | .Sp |
2127e193 | 871 | If the scheduled tests are used in conjunction with state persistence |
f9e10201 JD |
872 | (\*(Aq\-s\*(Aq option), smartd will also try to match the hours since last |
873 | shutdown (or 90 days at most). If any test would have been started | |
2127e193 GI |
874 | during downtime, the longest (see above) of these tests is run after |
875 | second device polling. | |
f9e10201 JD |
876 | .Sp |
877 | If the \*(Aq\-n\*(Aq directive is used and any test would have been started | |
2127e193 GI |
878 | during disk standby time, the longest of these tests is run when the |
879 | disk is active again. | |
f9e10201 | 880 | .Sp |
832b75ed | 881 | Unix users: please beware that the rules for extended regular |
d2e702cf GI |
882 | expressions [\fBregex\fP(7)] are \fBnot\fP the same as the rules for |
883 | file-name pattern matching by the shell [\fBglob\fP(7)]. \fBsmartd\fP will | |
832b75ed GG |
884 | issue harmless informational warning messages if it detects characters |
885 | in \fBREGEXP\fP that appear to indicate that you have made this | |
886 | mistake. | |
832b75ed GG |
887 | .TP |
888 | .B \-m ADD | |
f9e10201 JD |
889 | Send a warning email to the email address \fBADD\fP if the \*(Aq\-H\*(Aq, |
890 | \*(Aq\-l\*(Aq, \*(Aq\-f\*(Aq, \*(Aq\-C\*(Aq, or \*(Aq\-O\*(Aq Directives | |
891 | detect a failure or a new error, or if a SMART command to the disk fails. | |
892 | This Directive only works in conjunction with these other Directives | |
893 | (or with the equivalent default \*(Aq\-a\*(Aq Directive). | |
894 | .Sp | |
832b75ed | 895 | To prevent your email in-box from getting filled up with warning |
f9e10201 JD |
896 | messages, by default only a single warning and (depending on |
897 | \*(Aq\-s\*(Aq option) daily reminder emails will be sent for each of | |
898 | the enabled alert types. | |
899 | See the \*(Aq\-M\*(Aq Directive below for details. | |
900 | .Sp | |
832b75ed GG |
901 | To send email to more than one user, please use the following "comma |
902 | separated" form for the address: \fBuser1@add1,user2@add2,...,userN@addN\fP | |
903 | (with no spaces). | |
f9e10201 JD |
904 | .Sp |
905 | To test that email is being sent correctly, use the \*(Aq\-M test\*(Aq | |
832b75ed GG |
906 | Directive described below to send one test email message on |
907 | \fBsmartd\fP | |
908 | startup. | |
f9e10201 | 909 | .Sp |
d2e702cf GI |
910 | By default, email is sent using the system \fBmail\fP(1) command. |
911 | In order that \fBsmartd\fP find this command (normally /usr/bin/mail) the | |
912 | executable must be in the path of the shell or environment from which | |
832b75ed GG |
913 | \fBsmartd\fP |
914 | was started. If you wish to specify an explicit path to the mail | |
915 | executable (for example /usr/local/bin/mail) or a custom script to | |
f9e10201 JD |
916 | run, please use the \*(Aq\-M exec\*(Aq Directive below. |
917 | .Sp | |
d008864d | 918 | .\" %IF OS Windows |
f9e10201 JD |
919 | [Windows only] On Windows, the \*(Aq\fBBlat\fP\*(Aq mailer |
920 | (<\fBhttp://blat.sourceforge.net/\fP>) is used by default. | |
832b75ed | 921 | This mailer uses a different command line syntax, see |
f9e10201 JD |
922 | \*(Aq\-M exec\*(Aq below. |
923 | .Sp | |
924 | [NEW EXPERIMENTAL SMARTD FEATURE] | |
925 | If the file EXEDIR/smartd_mailer.conf.ps1 is present and \*(Aq\-M exec\*(Aq | |
926 | is not specified, the script smartd_mailer.ps1 is used instead. | |
927 | This script uses the Send-MailMessage cmdlet to send mail. | |
928 | See EXEDIR/smartd_mailer.conf.sample.ps1 for info about the format of | |
929 | the configuration file. | |
930 | .Sp | |
d008864d | 931 | .\" %ENDIF OS Windows |
832b75ed GG |
932 | Note also that there is a special argument |
933 | .B <nomailer> | |
f9e10201 JD |
934 | which can be given to the \*(Aq\-m\*(Aq Directive in conjunction with the |
935 | \*(Aq\-M exec\*(Aq Directive. | |
936 | Please see below for an explanation of its effect. | |
937 | .Sp | |
832b75ed GG |
938 | If the mailer or the shell running it produces any STDERR/STDOUT |
939 | output, then a snippet of that output will be copied to SYSLOG. The | |
f9e10201 | 940 | remainder of the output is discarded. If problems are encountered in |
832b75ed GG |
941 | sending mail, this should help you to understand and fix them. If |
942 | you have mail problems, we recommend running \fBsmartd\fP in debug | |
f9e10201 JD |
943 | mode with the \*(Aq\-d\*(Aq flag, using the \*(Aq\-M test\*(Aq Directive |
944 | described below. | |
d2e702cf | 945 | .\" %IF ENABLE_SMARTDPLUGINDIR |
ee38a438 | 946 | .\" %IF NOT OS Windows |
f9e10201 JD |
947 | .Sp |
948 | If a word of the comma separated list has the form \*(Aq@plugin\*(Aq, a custom | |
ee38a438 | 949 | script /usr/local/etc/smartd_warning.d/plugin is run and the word is |
f9e10201 JD |
950 | removed from the list before sending mail. The string \*(Aqplugin\*(Aq may |
951 | be any valid name except \*(AqALL\*(Aq. | |
952 | If \*(Aq@ALL\*(Aq is specified, all scripts in /usr/local/etc/smartd_warning.d/* | |
ee38a438 GI |
953 | are run instead. |
954 | This is handled by the script /usr/local/etc/smartd_warning.sh | |
f9e10201 | 955 | (see also \*(Aq\-M exec\*(Aq below). |
ee38a438 | 956 | .\" %ENDIF NOT OS Windows |
d2e702cf | 957 | .\" %ENDIF ENABLE_SMARTDPLUGINDIR |
d008864d | 958 | .\" %IF OS Windows |
f9e10201 | 959 | .Sp |
a86ec89e GI |
960 | [Windows only] If one of the following words are used as the first address |
961 | in the comma separated list, warning messages are sent via WTSSendMessage(). | |
ee38a438 | 962 | This displays message boxes on the desktops of the selected sessions. |
f9e10201 JD |
963 | Address \*(Aq\fBconsole\fP\*(Aq specifies the console session only, |
964 | \*(Aq\fBactive\fP\*(Aq specifies the console session and all active remote | |
965 | sessions, and \*(Aq\fBconnected\fP\*(Aq specifies the console session and | |
ee38a438 GI |
966 | all connected (active or waiting for login) remote sessions. |
967 | This is handled by the script EXEDIR/smartd_warning.cmd which runs | |
f9e10201 | 968 | the tool EXEDIR/wtssendmsg.exe (see also \*(Aq\-M exec\*(Aq below). |
d008864d | 969 | .\" %ENDIF OS Windows |
832b75ed GG |
970 | .TP |
971 | .B \-M TYPE | |
972 | These Directives modify the behavior of the | |
973 | \fBsmartd\fP | |
f9e10201 JD |
974 | email warnings enabled with the \*(Aq\-m\*(Aq email Directive described above. |
975 | These \*(Aq\-M\*(Aq Directives only work in conjunction with the \*(Aq\-m\*(Aq | |
832b75ed | 976 | Directive and can not be used without it. |
f9e10201 | 977 | .Sp |
832b75ed GG |
978 | Multiple \-M Directives may be given. If more than one of the |
979 | following three \-M Directives are given (example: \-M once \-M daily) | |
980 | then the final one (in the example, \-M daily) is used. | |
f9e10201 | 981 | .Sp |
832b75ed GG |
982 | The valid arguments to the \-M Directive are (one of the following |
983 | three): | |
f9e10201 | 984 | .Sp |
832b75ed GG |
985 | .I once |
986 | \- send only one warning email for each type of disk problem detected. This | |
f9e10201 JD |
987 | is the default unless state persistence (\*(Aq\-s\*(Aq option) is enabled. |
988 | .Sp | |
832b75ed GG |
989 | .I daily |
990 | \- send additional warning reminder emails, once per day, for each type | |
cfbba5b9 | 991 | of disk problem detected. This is the default if state persistence |
f9e10201 JD |
992 | (\*(Aq\-s\*(Aq option) is enabled. |
993 | .Sp | |
832b75ed GG |
994 | .I diminishing |
995 | \- send additional warning reminder emails, after a one-day interval, | |
996 | then a two-day interval, then a four-day interval, and so on for each | |
f9e10201 | 997 | type of disk problem detected. Each interval is twice as long as the |
832b75ed | 998 | previous interval. |
f9e10201 | 999 | .Sp |
d008864d GI |
1000 | If a disk problem is no longer detected, the internal email counter is |
1001 | reset. If the problem reappears a new warning email is sent immediately. | |
f9e10201 | 1002 | .Sp |
832b75ed | 1003 | In addition, one may add zero or more of the following Directives: |
f9e10201 | 1004 | .Sp |
832b75ed GG |
1005 | .I test |
1006 | \- send a single test email | |
1007 | immediately upon | |
1008 | \fBsmartd\fP | |
1009 | startup. This allows one to verify that email is delivered correctly. | |
9ebc753d GG |
1010 | Note that if this Directive is used, |
1011 | \fBsmartd\fP | |
f9e10201 JD |
1012 | will also send the normal email warnings that were enabled with the |
1013 | \*(Aq\-m\*(Aq Directive, in addition to the single test email! | |
1014 | .Sp | |
832b75ed GG |
1015 | .I exec PATH |
1016 | \- run the executable PATH instead of the default mail command, when | |
1017 | \fBsmartd\fP | |
1018 | needs to send email. PATH must point to an executable binary file or | |
1019 | script. | |
ee38a438 | 1020 | .\" %IF OS Windows |
f9e10201 | 1021 | .Sp |
ee38a438 GI |
1022 | [Windows only] The PATH may contain space characters. |
1023 | Then it must be included in double quotes. | |
1024 | .\" %ENDIF OS Windows | |
f9e10201 | 1025 | .Sp |
832b75ed GG |
1026 | By setting PATH to point to a customized script, you can make |
1027 | \fBsmartd\fP perform useful tricks when a disk problem is detected | |
1028 | (beeping the console, shutting down the machine, broadcasting warnings | |
f9e10201 | 1029 | to all logged-in users, etc.\&) But please be careful. \fBsmartd\fP |
832b75ed | 1030 | will \fBblock\fP until the executable PATH returns, so if your |
ee38a438 GI |
1031 | executable hangs, then \fBsmartd\fP will also hang. |
1032 | .\" %IF NOT OS Windows | |
1033 | Some sample scripts are included in | |
e9583e0c | 1034 | /usr/local/share/doc/smartmontools/examplescripts/. |
ee38a438 | 1035 | .\" %ENDIF NOT OS Windows |
f9e10201 JD |
1036 | .Sp |
1037 | The exit status of the executable is recorded by \fBsmartd\fP in | |
1038 | SYSLOG. | |
1039 | The executable is not expected to write to STDOUT or STDERR. | |
1040 | If it does, then this is interpreted as indicating that | |
832b75ed GG |
1041 | something is going wrong with your executable, and a fragment of this |
1042 | output is logged to SYSLOG to help you to understand the problem. | |
1043 | Normally, if you wish to leave some record behind, the executable | |
1044 | should send mail or write to a file or device. | |
f9e10201 | 1045 | .Sp |
832b75ed GG |
1046 | Before running the executable, \fBsmartd\fP sets a number of |
1047 | environment variables. These environment variables may be used to | |
f9e10201 | 1048 | control the executable's behavior. The environment variables |
832b75ed GG |
1049 | exported by \fBsmartd\fP are: |
1050 | .RS 7 | |
1051 | .IP \fBSMARTD_MAILER\fP 4 | |
f9e10201 | 1052 | is set to the argument of \-M exec, if present or else to \*(Aqmail\*(Aq |
d2e702cf | 1053 | (examples: /usr/local/bin/mail, mail). |
832b75ed | 1054 | .IP \fBSMARTD_DEVICE\fP 4 |
a86ec89e | 1055 | is set to the device path (example: /dev/sda). |
832b75ed | 1056 | .IP \fBSMARTD_DEVICETYPE\fP 4 |
f9e10201 JD |
1057 | is set to the device type specified by \*(Aq\-d\*(Aq directive or |
1058 | \*(Aqauto\*(Aq if none. | |
832b75ed | 1059 | .IP \fBSMARTD_DEVICESTRING\fP 4 |
f9e10201 JD |
1060 | is set to the device description. |
1061 | It starts with SMARTD_DEVICE and may be followed by an optional controller | |
1062 | identification (example: /dev/sda [SAT]). | |
1063 | The string may contain a space and is NOT quoted. | |
ee38a438 GI |
1064 | .IP \fBSMARTD_DEVICEINFO\fP 4 |
1065 | is set to device identify information. It includes most of the info printed | |
1066 | by \fBsmartctl \-i\fP but uses a brief single line format. | |
1067 | This device info is also logged when \fBsmartd\fP starts up. | |
1068 | The string contains space characters and is NOT quoted. | |
832b75ed GG |
1069 | .IP \fBSMARTD_FAILTYPE\fP 4 |
1070 | gives the reason for the warning or message email. The possible values that | |
1071 | it takes and their meanings are: | |
d2e702cf | 1072 | .br |
832b75ed | 1073 | \fIEmailTest\fP: this is an email test message. |
d2e702cf | 1074 | .br |
832b75ed | 1075 | \fIHealth\fP: the SMART health status indicates imminent failure. |
d2e702cf | 1076 | .br |
832b75ed | 1077 | \fIUsage\fP: a usage Attribute has failed. |
d2e702cf | 1078 | .br |
832b75ed | 1079 | \fISelfTest\fP: the number of self-test failures has increased. |
d2e702cf | 1080 | .br |
832b75ed | 1081 | \fIErrorCount\fP: the number of errors in the ATA error log has increased. |
d2e702cf | 1082 | .br |
832b75ed GG |
1083 | \fICurrentPendingSector\fP: one of more disk sectors could not be |
1084 | read and are marked to be reallocated (replaced with spare sectors). | |
d2e702cf | 1085 | .br |
ee38a438 | 1086 | \fIOfflineUncorrectableSector\fP: during off-line testing, or self-testing, |
832b75ed | 1087 | one or more disk sectors could not be read. |
d2e702cf | 1088 | .br |
e9583e0c | 1089 | \fITemperature\fP: Temperature reached critical limit (see \-W directive). |
d2e702cf | 1090 | .br |
832b75ed | 1091 | \fIFailedHealthCheck\fP: the SMART health status command failed. |
d2e702cf | 1092 | .br |
832b75ed | 1093 | \fIFailedReadSmartData\fP: the command to read SMART Attribute data failed. |
d2e702cf | 1094 | .br |
832b75ed | 1095 | \fIFailedReadSmartErrorLog\fP: the command to read the SMART error log failed. |
d2e702cf | 1096 | .br |
f9e10201 JD |
1097 | \fIFailedReadSmartSelfTestLog\fP: the command to read the SMART self-test log |
1098 | failed. | |
d2e702cf | 1099 | .br |
832b75ed GG |
1100 | \fIFailedOpenDevice\fP: the open() command to the device failed. |
1101 | .IP \fBSMARTD_ADDRESS\fP 4 | |
f9e10201 | 1102 | is determined by the address argument ADD of the \*(Aq\-m\*(Aq Directive. |
832b75ed GG |
1103 | If ADD is \fB<nomailer>\fP, then \fBSMARTD_ADDRESS\fP is not set. |
1104 | Otherwise, it is set to the comma-separated-list of email addresses | |
1105 | given by the argument ADD, with the commas replaced by spaces | |
1106 | (example:admin@example.com root). If more than one email address is | |
1107 | given, then this string will contain space characters and is NOT | |
d2e702cf | 1108 | quoted, so to use it in a shell script you may want to enclose it in |
832b75ed | 1109 | double quotes. |
ee38a438 GI |
1110 | .\" %IF OS Windows |
1111 | .IP \fBSMARTD_ADDRCSV\fP 4 | |
1112 | [Windows only] is set to a comma-separated list of the addresses from | |
1113 | SMARTD_ADDRESS. | |
1114 | .\" %ENDIF OS Windows | |
832b75ed GG |
1115 | .IP \fBSMARTD_MESSAGE\fP 4 |
1116 | is set to the one sentence summary warning email message string from | |
f9e10201 JD |
1117 | \fBsmartd\fP. |
1118 | This message string contains space characters and is NOT quoted. So to | |
d2e702cf | 1119 | use $SMARTD_MESSAGE in a shell script you should probably enclose it in |
832b75ed | 1120 | double quotes. |
ee38a438 | 1121 | .\" %IF NOT OS Windows |
832b75ed GG |
1122 | .IP \fBSMARTD_FULLMESSAGE\fP 4 |
1123 | is set to the contents of the entire email warning message string from | |
f9e10201 JD |
1124 | \fBsmartd\fP. |
1125 | This message string contains space and return characters and is NOT | |
1126 | quoted. | |
1127 | So to use $SMARTD_FULLMESSAGE in a shell script you should probably | |
1128 | enclose it in double quotes. | |
ee38a438 GI |
1129 | .\" %ENDIF NOT OS Windows |
1130 | .\" %IF OS Windows | |
1131 | .IP \fBSMARTD_FULLMSGFILE\fP 4 | |
1132 | [Windows only] is the path to a temporary file containing the full message. | |
1133 | The path may contain space characters and is NOT quoted. | |
1134 | The file is created by the smartd_warning.cmd script and removed when | |
1135 | the mailer or command exits. | |
1136 | .\" %ENDIF OS Windows | |
832b75ed GG |
1137 | .IP \fBSMARTD_TFIRST\fP 4 |
1138 | is a text string giving the time and date at which the first problem | |
f9e10201 JD |
1139 | of this type was reported. This text string contains space characters |
1140 | and no newlines, and is NOT quoted. For example: | |
d2e702cf | 1141 | .br |
832b75ed GG |
1142 | Sun Feb 9 14:58:19 2003 CST |
1143 | .IP \fBSMARTD_TFIRSTEPOCH\fP 4 | |
1144 | is an integer, which is the unix epoch (number of seconds since Jan 1, | |
1145 | 1970) for \fBSMARTD_TFIRST\fP. | |
ee38a438 GI |
1146 | .IP \fBSMARTD_PREVCNT\fP 4 |
1147 | is an integer specifying the number of previous messages sent. | |
f9e10201 | 1148 | It is set to \*(Aq0\*(Aq for the first message. |
ee38a438 GI |
1149 | .IP \fBSMARTD_NEXTDAYS\fP 4 |
1150 | is an integer specifying the number of days until the next message will be sent. | |
f9e10201 JD |
1151 | It it set to empty on \*(Aq\-M once\*(Aq and set to \*(Aq1\*(Aq on |
1152 | \*(Aq\-M daily\*(Aq. | |
832b75ed GG |
1153 | .RE |
1154 | .\" The following two lines are a workaround for a man2html bug. Please leave them. | |
1155 | .\" They define a non-existent option; useful because man2html can't correctly reset the margins. | |
1156 | .TP | |
1157 | .B \& | |
f9e10201 | 1158 | If the \*(Aq\-m ADD\*(Aq Directive is given with a normal address argument, |
832b75ed GG |
1159 | then the executable pointed to by PATH will be run in a shell with |
1160 | STDIN receiving the body of the email message, and with the same | |
1161 | command-line arguments: | |
f9e10201 JD |
1162 | .Vb 1 |
1163 | \ \ \-s "$SMARTD_SUBJECT" $SMARTD_ADDRESS | |
1164 | .Ve | |
1165 | that would normally be provided to \*(Aqmail\*(Aq. Examples include: | |
1166 | .br | |
1167 | .B \-m user@home \-M exec /usr/bin/mail | |
1168 | .br | |
1169 | .B \-m admin@work \-M exec /usr/local/bin/mailto | |
1170 | .br | |
1171 | .B \-m root \-M exec /Example_1/shell/script/below | |
1172 | .Sp | |
d008864d | 1173 | .\" %IF OS Windows |
f9e10201 JD |
1174 | [Windows only] On Windows, the syntax of the \*(Aq\fBBlat\fP\*(Aq mailer is |
1175 | used (except for \*(Aq.ps1\*(Aq scripts): | |
1176 | .Vb 1 | |
1177 | \ \ \- \-q \-subject "%SMARTD_SUBJECT%" \-to %SMARTD_ADDRCSV% | |
1178 | .Ve | |
1179 | .Sp | |
d008864d | 1180 | .\" %ENDIF OS Windows |
f9e10201 | 1181 | If the \*(Aq\-m ADD\*(Aq Directive is given with the special address argument |
832b75ed GG |
1182 | .B <nomailer> |
1183 | then the executable pointed to by PATH is run in a shell with | |
1184 | .B no | |
1185 | STDIN and | |
1186 | .B no | |
1187 | command-line arguments, for example: | |
f9e10201 JD |
1188 | .Vb 1 |
1189 | \ \ \-m <nomailer> \-M exec /Example_2/shell/script/below | |
1190 | .Ve | |
1191 | .Sp | |
1192 | .\" %IF OS Windows | |
1193 | [Windows only] | |
1194 | [NEW EXPERIMENTAL SMARTD FEATURE] | |
1195 | If a PATH with extension \*(Aq.ps1\*(Aq is specified with \*(Aq\-M exec\*(Aq, | |
1196 | the script is run as follows with no STDIN, regardless of \*(Aq\-m ADD\*(Aq | |
1197 | setting: | |
1198 | .Vb 2 | |
1199 | \ \ PowerShell -NoProfile -ExecutionPolicy Bypass ^ | |
1200 | \ \ \ \ \ \ \ \ \ \ \ \ \ -Command ^& \*(Aq%SMARTD_MAILER%\*(Aq | |
1201 | .Ve | |
1202 | .Sp | |
1203 | .\" %ENDIF OS Windows | |
832b75ed GG |
1204 | If the executable produces any STDERR/STDOUT output, then \fBsmartd\fP |
1205 | assumes that something is going wrong, and a snippet of that output | |
1206 | will be copied to SYSLOG. The remainder of the output is then | |
1207 | discarded. | |
f9e10201 JD |
1208 | .Sp |
1209 | Some EXAMPLES of scripts that can be used with the \*(Aq\-M exec\*(Aq | |
ee38a438 GI |
1210 | Directive are given below. |
1211 | .\" %IF NOT OS Windows | |
1212 | Some sample scripts are also included in | |
e9583e0c | 1213 | /usr/local/share/doc/smartmontools/examplescripts/. |
ee38a438 | 1214 | .\" %ENDIF NOT OS Windows |
f9e10201 | 1215 | .Sp |
a86ec89e | 1216 | The executable is run by the script |
ee38a438 GI |
1217 | .\" %IF NOT OS Windows |
1218 | /usr/local/etc/smartd_warning.sh. | |
1219 | .\" %ENDIF NOT OS Windows | |
1220 | .\" %IF OS ALL | |
1221 | (Windows: EXEDIR/smartd_warning.cmd) | |
1222 | .\" %ENDIF OS ALL | |
1223 | .\" %IF OS Windows | |
1224 | .\"! EXEDIR/smartd_warning.cmd. | |
1225 | .\" %ENDIF OS Windows | |
1226 | This script formats subject and full message based on SMARTD_MESSAGE and other | |
1227 | environment variables set by \fBsmartd\fP. | |
1228 | The environment variables | |
1229 | .\" %IF NOT OS Windows | |
1230 | SMARTD_SUBJECT and SMARTD_FULLMESSAGE | |
1231 | .\" %ENDIF NOT OS Windows | |
1232 | .\" %IF OS ALL | |
1233 | (Windows: SMARTD_SUBJECT, SMARTD_FULLMSGFILE and SMARTD_ADDRCSV) | |
1234 | .\" %ENDIF OS ALL | |
1235 | .\" %IF OS Windows | |
1236 | .\"! SMARTD_SUBJECT, SMARTD_FULLMSGFILE and SMARTD_ADDRCSV | |
1237 | .\" %ENDIF OS Windows | |
1238 | are set by the script before running the executable. | |
832b75ed GG |
1239 | .TP |
1240 | .B \-f | |
f9e10201 | 1241 | [ATA only] Check for \*(Aqfailure\*(Aq of any Usage Attributes. If these |
cfbba5b9 GI |
1242 | Attributes are less than or equal to the threshold, it does NOT indicate |
1243 | imminent disk failure. It "indicates an advisory condition where the usage | |
1244 | or age of the device has exceeded its intended design life period." | |
832b75ed GG |
1245 | [Please see the \fBsmartctl \-A\fP command-line option.] |
1246 | .TP | |
1247 | .B \-p | |
cfbba5b9 | 1248 | [ATA only] Report anytime that a Prefail Attribute has changed |
f9e10201 | 1249 | its value since the last check. [Please see the |
832b75ed GG |
1250 | .B smartctl \-A |
1251 | command-line option.] | |
1252 | .TP | |
1253 | .B \-u | |
cfbba5b9 | 1254 | [ATA only] Report anytime that a Usage Attribute has changed its value |
f9e10201 | 1255 | since the last check. [Please see the |
832b75ed GG |
1256 | .B smartctl \-A |
1257 | command-line option.] | |
1258 | .TP | |
1259 | .B \-t | |
f9e10201 JD |
1260 | [ATA only] Equivalent to turning on the two previous flags \*(Aq\-p\*(Aq |
1261 | and \*(Aq\-u\*(Aq. | |
832b75ed | 1262 | Tracks changes in \fIall\fP device Attributes (both Prefailure and |
f9e10201 | 1263 | Usage). [Please see the \fBsmartctl\fP \-A command-line option.] |
832b75ed GG |
1264 | .TP |
1265 | .B \-i ID | |
cfbba5b9 GI |
1266 | [ATA only] Ignore device Attribute number \fBID\fP when checking for failure |
1267 | of Usage Attributes. \fBID\fP must be a decimal integer in the range | |
f9e10201 | 1268 | from 1 to 255. This Directive modifies the behavior of the \*(Aq\-f\*(Aq |
832b75ed | 1269 | Directive and has no effect without it. |
f9e10201 JD |
1270 | .Sp |
1271 | This is useful, for example, if you have a very old disk and don't | |
832b75ed GG |
1272 | want to keep getting messages about the hours-on-lifetime Attribute |
1273 | (usually Attribute 9) failing. This Directive may appear multiple | |
1274 | times for a single device, if you want to ignore multiple Attributes. | |
1275 | .TP | |
1276 | .B \-I ID | |
cfbba5b9 | 1277 | [ATA only] Ignore device Attribute \fBID\fP when tracking changes in the |
832b75ed | 1278 | Attribute values. \fBID\fP must be a decimal integer in the range |
f9e10201 JD |
1279 | from 1 to 255. This Directive modifies the behavior of the \*(Aq\-p\*(Aq, |
1280 | \*(Aq\-u\*(Aq, and \*(Aq\-t\*(Aq tracking Directives and has no effect | |
1281 | without one of them. | |
1282 | .Sp | |
832b75ed | 1283 | This is useful, for example, if one of the device Attributes is the disk |
f9e10201 | 1284 | temperature (usually Attribute 194 or 231). It's annoying to get reports |
832b75ed GG |
1285 | each time the temperature changes. This Directive may appear multiple |
1286 | times for a single device, if you want to ignore multiple Attributes. | |
1287 | .TP | |
2127e193 | 1288 | .B \-r ID[!] |
cfbba5b9 GI |
1289 | [ATA only] When tracking, report the \fIRaw\fP value of Attribute \fBID\fP |
1290 | along with its (normally reported) \fINormalized\fP value. \fBID\fP must | |
1291 | be a decimal integer in the range from 1 to 255. This Directive modifies | |
f9e10201 JD |
1292 | the behavior of the \*(Aq\-p\*(Aq, \*(Aq\-u\*(Aq, and \*(Aq\-t\*(Aq tracking |
1293 | Directives and has no effect without one of them. | |
1294 | This Directive may be given multiple times. | |
1295 | .Sp | |
832b75ed GG |
1296 | A common use of this Directive is to track the device Temperature |
1297 | (often ID=194 or 231). | |
f9e10201 JD |
1298 | .Sp |
1299 | If the optional flag \*(Aq!\*(Aq is appended, a change of the Normalized | |
2127e193 | 1300 | value is considered critical. The report will be logged as LOG_CRIT |
f9e10201 | 1301 | and a warning email will be sent if \*(Aq\-m\*(Aq is specified. |
832b75ed | 1302 | .TP |
2127e193 | 1303 | .B \-R ID[!] |
cfbba5b9 | 1304 | [ATA only] When tracking, report whenever the \fIRaw\fP value of Attribute |
832b75ed GG |
1305 | \fBID\fP changes. (Normally \fBsmartd\fP only tracks/reports changes |
1306 | of the \fINormalized\fP Attribute values.) \fBID\fP must be a decimal | |
1307 | integer in the range from 1 to 255. This Directive modifies the | |
f9e10201 JD |
1308 | behavior of the \*(Aq\-p\*(Aq, \*(Aq\-u\*(Aq, and \*(Aq\-t\*(Aq tracking |
1309 | Directives and has no effect without one of them. | |
1310 | This Directive may be given multiple times. | |
1311 | .Sp | |
1312 | If this Directive is given, it automatically implies the \*(Aq\-r\*(Aq | |
832b75ed GG |
1313 | Directive for the same Attribute, so that the Raw value of the |
1314 | Attribute is reported. | |
f9e10201 | 1315 | .Sp |
832b75ed GG |
1316 | A common use of this Directive is to track the device Temperature |
1317 | (often ID=194 or 231). It is also useful for understanding how | |
1318 | different types of system behavior affects the values of certain | |
1319 | Attributes. | |
f9e10201 JD |
1320 | .Sp |
1321 | If the optional flag \*(Aq!\*(Aq is appended, a change of the Raw | |
2127e193 | 1322 | value is considered critical. The report will be logged as |
f9e10201 JD |
1323 | LOG_CRIT and a warning email will be sent if \*(Aq\-m\*(Aq is specified. |
1324 | An example is \*(Aq\-R 5!\*(Aq to warn when new sectors are reallocated. | |
832b75ed | 1325 | .TP |
2127e193 | 1326 | .B \-C ID[+] |
832b75ed GG |
1327 | [ATA only] Report if the current number of pending sectors is |
1328 | non-zero. Here \fBID\fP is the id number of the Attribute whose raw | |
1329 | value is the Current Pending Sector count. The allowed range of | |
1330 | \fBID\fP is 0 to 255 inclusive. To turn off this reporting, use | |
1331 | ID\ =\ 0. If the \fB\-C ID\fP option is not given, then it defaults to | |
1332 | \fB\-C 197\fP (since Attribute 197 is generally used to monitor | |
e9583e0c | 1333 | pending sectors). If the name of this Attribute is changed by a |
f9e10201 | 1334 | \*(Aq\-v 197,FORMAT,NAME\*(Aq directive, the default is changed to |
e9583e0c | 1335 | \fB\-C 0\fP. |
f9e10201 JD |
1336 | .Sp |
1337 | If \*(Aq+\*(Aq is specified, a report is only printed if the number of sectors | |
1338 | has increased between two check cycles. Some disks do not reset this | |
2127e193 | 1339 | attribute when a bad sector is reallocated. |
f9e10201 JD |
1340 | See also \*(Aq\-v 197,increasing\*(Aq below. |
1341 | .Sp | |
d008864d GI |
1342 | The warning email counter is reset if the number of pending sectors |
1343 | dropped to 0. This typically happens when all pending sectors have | |
1344 | been reallocated or could be read again. | |
f9e10201 | 1345 | .Sp |
832b75ed | 1346 | A pending sector is a disk sector (containing 512 bytes of your data) |
f9e10201 | 1347 | which the device would like to mark as "bad" and reallocate. |
832b75ed GG |
1348 | Typically this is because your computer tried to read that sector, and |
1349 | the read failed because the data on it has been corrupted and has | |
1350 | inconsistent Error Checking and Correction (ECC) codes. This is | |
1351 | important to know, because it means that there is some unreadable data | |
1352 | on the disk. The problem of figuring out what file this data belongs | |
1353 | to is operating system and file system specific. You can typically | |
1354 | force the sector to reallocate by writing to it (translation: make the | |
1355 | device substitute a spare good sector for the bad one) but at the | |
1356 | price of losing the 512 bytes of data stored there. | |
832b75ed | 1357 | .TP |
2127e193 | 1358 | .B \-U ID[+] |
832b75ed GG |
1359 | [ATA only] Report if the number of offline uncorrectable sectors is |
1360 | non-zero. Here \fBID\fP is the id number of the Attribute whose raw | |
1361 | value is the Offline Uncorrectable Sector count. The allowed range of | |
1362 | \fBID\fP is 0 to 255 inclusive. To turn off this reporting, use | |
1363 | ID\ =\ 0. If the \fB\-U ID\fP option is not given, then it defaults to | |
1364 | \fB\-U 198\fP (since Attribute 198 is generally used to monitor | |
e9583e0c | 1365 | offline uncorrectable sectors). If the name of this Attribute is changed |
f9e10201 JD |
1366 | by a \*(Aq\-v 198,FORMAT,NAME\*(Aq (except |
1367 | \*(Aq\-v 198,FORMAT,Offline_Scan_UNC_SectCt\*(Aq), directive, the default | |
1368 | is changed to \fB\-U 0\fP. | |
1369 | .Sp | |
1370 | If \*(Aq+\*(Aq is specified, a report is only printed if the number of sectors | |
1371 | has increased since the last check cycle. Some disks do not reset this | |
2127e193 | 1372 | attribute when a bad sector is reallocated. |
f9e10201 JD |
1373 | See also \*(Aq\-v 198,increasing\*(Aq below. |
1374 | .Sp | |
d008864d GI |
1375 | The warning email counter is reset if the number of offline uncorrectable |
1376 | sectors dropped to 0. This typically happens when all offline uncorrectable | |
1377 | sectors have been reallocated or could be read again. | |
f9e10201 | 1378 | .Sp |
832b75ed | 1379 | An offline uncorrectable sector is a disk sector which was not |
ee38a438 | 1380 | readable during an off-line scan or a self-test. This is important |
832b75ed | 1381 | to know, because if you have data stored in this disk sector, and you |
f9e10201 | 1382 | need to read it, the read will fail. Please see the previous \*(Aq\-C\*(Aq |
832b75ed | 1383 | option for more details. |
4d59bff9 GG |
1384 | .TP |
1385 | .B \-W DIFF[,INFO[,CRIT]] | |
1386 | Report if the current temperature had changed by at least \fBDIFF\fP | |
2127e193 GI |
1387 | degrees since last report, or if new min or max temperature is detected. |
1388 | Report or Warn if the temperature is greater or equal than one of | |
1389 | \fBINFO\fP or \fBCRIT\fP degrees Celsius. | |
1390 | If the limit \fBCRIT\fP is reached, a message with loglevel | |
f9e10201 JD |
1391 | \fB\*(AqLOG_CRIT\*(Aq\fP will be logged to syslog and a warning email |
1392 | will be send if \*(Aq\-m\*(Aq is specified. If only the limit \fBINFO\fP is | |
1393 | reached, a message with loglevel \fB\*(AqLOG_INFO\*(Aq\fP will be logged. | |
1394 | .Sp | |
d008864d GI |
1395 | The warning email counter is reset if the temperature dropped below |
1396 | \fBINFO\fP or \fBCRIT\fP-5 if \fBINFO\fP is not specified. | |
f9e10201 | 1397 | .Sp |
2127e193 | 1398 | If this directive is used in conjunction with state persistence |
f9e10201 JD |
1399 | (\*(Aq\-s\*(Aq option), the min and max temperature values are preserved |
1400 | across boot cycles. The minimum temperature value is not updated | |
2127e193 | 1401 | during the first 30 minutes after startup. |
f9e10201 | 1402 | .Sp |
4d59bff9 | 1403 | To disable any of the 3 reports, set the corresponding limit to 0. |
f9e10201 JD |
1404 | Trailing zero arguments may be omitted. By default, all temperature |
1405 | reports are disabled (\*(Aq\-W 0\*(Aq). | |
1406 | .Sp | |
4d59bff9 | 1407 | To track temperature changes of at least 2 degrees, use: |
f9e10201 | 1408 | .br |
f4e463df | 1409 | .B \-W 2 |
f9e10201 | 1410 | .br |
4d59bff9 | 1411 | To log informal messages on temperatures of at least 40 degrees, use: |
f9e10201 | 1412 | .br |
f4e463df | 1413 | .B \-W 0,40 |
f9e10201 | 1414 | .br |
4d59bff9 | 1415 | For warning messages/mails on temperatures of at least 45 degrees, use: |
f9e10201 | 1416 | .br |
f4e463df | 1417 | .B \-W 0,0,45 |
f9e10201 | 1418 | .br |
4d59bff9 | 1419 | To combine all of the above reports, use: |
f9e10201 | 1420 | .br |
f4e463df | 1421 | .B \-W 2,40,45 |
f9e10201 | 1422 | .Sp |
ee38a438 | 1423 | For ATA devices, smartd interprets Attribute 194 or 190 as Temperature Celsius |
f9e10201 JD |
1424 | by default. This can be changed to Attribute 9 or 220 by the drive |
1425 | database or by the \*(Aq\-v 9,temp\*(Aq or \*(Aq\-v 220,temp\*(Aq directive. | |
1426 | .\" %IF OS Darwin FreeBSD Linux NetBSD Windows Cygwin | |
1427 | .Sp | |
a86ec89e GI |
1428 | [NEW EXPERIMENTAL SMARTD FEATURE] |
1429 | For NVMe devices, smartd checks the maximum of the Composite Temperature value | |
1430 | and all Temperature Sensor values reported by SMART/Health Information log. | |
f9e10201 | 1431 | .\" %ENDIF OS Darwin FreeBSD Linux NetBSD Windows Cygwin |
832b75ed GG |
1432 | .TP |
1433 | .B \-F TYPE | |
ee38a438 GI |
1434 | [ATA only] Modifies the behavior of \fBsmartd\fP to compensate for some |
1435 | known and understood device firmware bug. This directive may be used | |
1436 | multiple times. The valid arguments are: | |
f9e10201 | 1437 | .Sp |
832b75ed | 1438 | .I none |
e9583e0c | 1439 | \- Assume that the device firmware obeys the ATA specifications. This |
f9e10201 | 1440 | is the default, unless the device has presets for \*(Aq\-F\*(Aq in the |
d2e702cf | 1441 | drive database. Using this directive will override any preset values. |
f9e10201 | 1442 | .Sp |
ee38a438 GI |
1443 | .I nologdir |
1444 | \- Suppresses read attempts of SMART or GP Log Directory. | |
1445 | Support for all standard logs is assumed without an actual check. | |
1446 | Some Intel SSDs may freeze if log address 0 is read. | |
f9e10201 | 1447 | .Sp |
832b75ed GG |
1448 | .I samsung |
1449 | \- In some Samsung disks (example: model SV4012H Firmware Version: | |
ee38a438 GI |
1450 | RM100-08) some of the two- and four-byte quantities in the SMART data |
1451 | structures are byte-swapped (relative to the ATA specification). | |
832b75ed | 1452 | Enabling this option tells \fBsmartd\fP to evaluate these quantities |
ee38a438 GI |
1453 | in byte-reversed order. Some signs that your disk needs this option |
1454 | are (1) no self-test log printed, even though you have run self-tests; | |
832b75ed GG |
1455 | (2) very large numbers of ATA errors reported in the ATA error log; |
1456 | (3) strange and impossible values for the ATA error log timestamps. | |
f9e10201 | 1457 | .Sp |
832b75ed | 1458 | .I samsung2 |
e9583e0c GI |
1459 | \- In some Samsung disks the number of ATA errors reported is byte swapped. |
1460 | Enabling this option tells \fBsmartd\fP to evaluate this quantity in | |
ee38a438 | 1461 | byte-reversed order. |
f9e10201 | 1462 | .Sp |
a37e7145 | 1463 | .I samsung3 |
ee38a438 GI |
1464 | \- Some Samsung disks (at least SP2514N with Firmware VF100-37) report |
1465 | a self-test still in progress with 0% remaining when the test was already | |
f9e10201 JD |
1466 | completed. If this directive is specified, \fBsmartd\fP will not skip the |
1467 | next scheduled self-test (see Directive \*(Aq\-s\*(Aq above) in this case. | |
1468 | .Sp | |
ee38a438 GI |
1469 | .I xerrorlba |
1470 | \- This only affects \fBsmartctl\fP. | |
f9e10201 | 1471 | .Sp |
832b75ed | 1472 | [Please see the \fBsmartctl \-F\fP command-line option.] |
832b75ed | 1473 | .TP |
a23d5117 | 1474 | .B \-v ID,FORMAT[:BYTEORDER][,NAME] |
ee38a438 | 1475 | [ATA only] Sets a vendor-specific raw value print FORMAT, an optional |
a23d5117 | 1476 | BYTEORDER and an optional NAME for Attribute ID. |
bed94269 | 1477 | This directive may be used multiple times. |
f9e10201 JD |
1478 | Please see \fBsmartctl \-v\fP command-line option for further details. |
1479 | .Sp | |
bed94269 | 1480 | The following arguments affect smartd warning output: |
f9e10201 | 1481 | .Sp |
2127e193 GI |
1482 | .I 197,increasing |
1483 | \- Raw Attribute number 197 (Current Pending Sector Count) is not | |
f9e10201 JD |
1484 | reset if uncorrectable sectors are reallocated. This sets \*(Aq\-C 197+\*(Aq |
1485 | if no other \*(Aq\-C\*(Aq directive is specified. | |
1486 | .Sp | |
2127e193 GI |
1487 | .I 198,increasing |
1488 | \- Raw Attribute number 198 (Offline Uncorrectable Sector Count) is not | |
f9e10201 JD |
1489 | reset if uncorrectable sectors are reallocated. This sets \*(Aq\-U 198+\*(Aq |
1490 | if no other \*(Aq\-U\*(Aq directive is specified. | |
832b75ed GG |
1491 | .TP |
1492 | .B \-P TYPE | |
cfbba5b9 GI |
1493 | [ATA only] Specifies whether \fBsmartd\fP should use any preset options |
1494 | that are available for this drive. | |
1495 | The valid arguments to this Directive are: | |
f9e10201 | 1496 | .Sp |
832b75ed GG |
1497 | .I use |
1498 | \- use any presets that are available for this drive. This is the default. | |
f9e10201 | 1499 | .Sp |
832b75ed GG |
1500 | .I ignore |
1501 | \- do not use any presets for this drive. | |
f9e10201 | 1502 | .Sp |
832b75ed GG |
1503 | .I show |
1504 | \- show the presets listed for this drive in the database. | |
f9e10201 | 1505 | .Sp |
832b75ed GG |
1506 | .I showall |
1507 | \- show the presets that are available for all drives and then exit. | |
f9e10201 | 1508 | .Sp |
832b75ed GG |
1509 | [Please see the |
1510 | .B smartctl \-P | |
1511 | command-line option.] | |
832b75ed GG |
1512 | .TP |
1513 | .B \-a | |
f9e10201 JD |
1514 | Equivalent to turning on all of the following Directives: |
1515 | .B \*(Aq\-H\*(Aq | |
832b75ed | 1516 | to check the SMART health status, |
f9e10201 | 1517 | .B \*(Aq\-f\*(Aq |
832b75ed | 1518 | to report failures of Usage (rather than Prefail) Attributes, |
f9e10201 | 1519 | .B \*(Aq\-t\*(Aq |
832b75ed | 1520 | to track changes in both Prefailure and Usage Attributes, |
f9e10201 | 1521 | .B \*(Aq\-l\ error\*(Aq |
832b75ed | 1522 | to report increases in the number of ATA errors, |
f9e10201 | 1523 | .B \*(Aq\-l\ selftest\*(Aq |
d008864d | 1524 | to report increases in the number of Self-Test Log errors, |
f9e10201 | 1525 | .B \*(Aq\-l\ selfteststs\*(Aq |
d008864d | 1526 | to report changes of Self-Test execution status, |
f9e10201 | 1527 | .B \*(Aq\-C 197\*(Aq |
832b75ed | 1528 | to report nonzero values of the current pending sector count, and |
f9e10201 | 1529 | .B \*(Aq\-U 198\*(Aq |
832b75ed | 1530 | to report nonzero values of the offline pending sector count. |
f9e10201 | 1531 | .Sp |
832b75ed GG |
1532 | Note that \-a is the default for ATA devices. If none of these other |
1533 | Directives is given, then \-a is assumed. | |
832b75ed GG |
1534 | .TP |
1535 | .B # | |
1536 | Comment: ignore the remainder of the line. | |
1537 | .TP | |
1538 | .B \e | |
1539 | Continuation character: if this is the last non-white or non-comment | |
1540 | character on a line, then the following line is a continuation of the current | |
1541 | one. | |
1542 | .PP | |
1543 | If you are not sure which Directives to use, I suggest experimenting | |
1544 | for a few minutes with | |
1545 | .B smartctl | |
1546 | to see what SMART functionality your disk(s) support(s). If you do | |
1547 | not like voluminous syslog messages, a good choice of | |
1548 | \fBsmartd\fP | |
1549 | configuration file Directives might be: | |
f9e10201 JD |
1550 | .br |
1551 | \fB\-H \-l selftest \-l error \-f\fP. | |
1552 | .br | |
1553 | If you want more frequent information, use: \fB\-a\fP. | |
1554 | .Sp | |
832b75ed GG |
1555 | .TP |
1556 | .B ADDITIONAL DETAILS ABOUT DEVICESCAN | |
7f0798ef | 1557 | If a non-comment entry in the configuration file is the text |
832b75ed GG |
1558 | string \fBDEVICESCAN\fP in capital letters, then \fBsmartd\fP will |
1559 | ignore any remaining lines in the configuration file, and will scan | |
ee38a438 | 1560 | for devices (see also \fBsmartd\fP(8) man page). |
f9e10201 | 1561 | .Sp |
832b75ed GG |
1562 | If \fBDEVICESCAN\fP is not followed by any Directives, then smartd |
1563 | will scan for both ATA and SCSI devices, and will monitor all possible | |
1564 | SMART properties of any devices that are found. | |
f9e10201 | 1565 | .Sp |
832b75ed GG |
1566 | \fBDEVICESCAN\fP may optionally be followed by any valid Directives, |
1567 | which will be applied to all devices that are found in the scan. For | |
1568 | example | |
f9e10201 JD |
1569 | .br |
1570 | .B DEVICESCAN \-m root@example.com | |
1571 | .br | |
832b75ed GG |
1572 | will scan for all devices, and then monitor them. It will send one |
1573 | email warning per device for any problems that are found. | |
f9e10201 JD |
1574 | .br |
1575 | .B DEVICESCAN \-d ata \-m root@example.com | |
1576 | .br | |
1577 | will do the same, but restricts the scan to ATA devices only. | |
1578 | .br | |
1579 | .B DEVICESCAN \-H \-d ata \-m root@example.com | |
1580 | .br | |
832b75ed GG |
1581 | will do the same, but only monitors the SMART health status of the |
1582 | devices, (rather than the default \-a, which monitors all SMART | |
1583 | properties). | |
a86ec89e | 1584 | .br |
ee38a438 | 1585 | [NEW EXPERIMENTAL SMARTD FEATURE] |
f9e10201 | 1586 | Multiple \*(Aq\-d TYPE\*(Aq options may be specified with DEVICESCAN |
a86ec89e | 1587 | to combine the scan results of more than one TYPE. |
f9e10201 JD |
1588 | .Sp |
1589 | Configuration entries for specific devices may precede the \fBDEVICESCAN\fP | |
1590 | entry. | |
ee38a438 | 1591 | For example |
f9e10201 JD |
1592 | .br |
1593 | .B DEFAULT \-m root@example.com | |
1594 | .br | |
1595 | .B /dev/sda \-s S/../.././02 | |
1596 | .br | |
1597 | .B /dev/sdc \-d ignore | |
1598 | .br | |
1599 | .B DEVICESCAN \-s L/../.././02 | |
1600 | .br | |
1601 | will scan for all devices except /dev/sda and /dev/sdc, monitor them, and | |
1602 | run a long test between 2\(en3 am every morning. | |
1603 | Device /dev/sda will also be monitored, but only a short test will be run. | |
1604 | Device /dev/sdc will be ignored. | |
ee38a438 | 1605 | Warning emails will be sent for all monitored devices. |
f9e10201 JD |
1606 | .Sp |
1607 | A device is ignored by DEVICESCAN if a configuration line with the same | |
1608 | device name exists. | |
1609 | .br | |
1610 | [NEW EXPERIMENTAL SMARTD FEATURE] | |
1611 | A device name is also ignored if another device with same identify | |
1612 | information (vendor, model, firmware version, serial number, WWN) already | |
1613 | exists. | |
1614 | .Sp | |
832b75ed | 1615 | .TP |
f9e10201 JD |
1616 | .B EXAMPLES OF SHELL SCRIPTS FOR \*(Aq\-M exec\*(Aq |
1617 | These are two examples of shell scripts that can be used with the \*(Aq\-M | |
1618 | exec PATH\*(Aq Directive described previously. The paths to these scripts | |
1619 | and similar executables is the PATH argument to the \*(Aq\-M exec PATH\*(Aq | |
832b75ed | 1620 | Directive. |
f9e10201 JD |
1621 | .Sp |
1622 | Example 1: This script is for use with \*(Aq\-m ADDRESS \-M exec PATH\*(Aq. | |
1623 | It appends the output of | |
1624 | .B smartctl \-a | |
832b75ed | 1625 | to the output of the smartd email warning message and sends it to ADDRESS. |
f9e10201 JD |
1626 | .Sp |
1627 | .Vb 4 | |
d2e702cf | 1628 | #! /bin/sh |
832b75ed GG |
1629 | |
1630 | # Save the email message (STDIN) to a file: | |
1631 | cat > /root/msg | |
1632 | ||
f9e10201 JD |
1633 | # Append the output of smartctl \-a to the message: |
1634 | /usr/local/sbin/smartctl \-a \-d $SMART_DEVICETYPE \e | |
1635 | $SMARTD_DEVICE >> /root/msg | |
832b75ed | 1636 | |
f9e10201 JD |
1637 | # Now email the message to the user at address ADD: |
1638 | /usr/bin/mail \-s "$SMARTD_SUBJECT" $SMARTD_ADDRESS \e | |
1639 | < /root/msg | |
1640 | .Ve | |
1641 | .Sp | |
1642 | Example 2: This script is for use with \*(Aq\-m <nomailer> \-M exec | |
1643 | PATH\*(Aq. It warns all users about a disk problem, waits 30 seconds, and | |
832b75ed | 1644 | then powers down the machine. |
f9e10201 JD |
1645 | .Sp |
1646 | .Vb 4 | |
d2e702cf | 1647 | #! /bin/sh |
832b75ed GG |
1648 | |
1649 | # Warn all users of a problem | |
d2e702cf GI |
1650 | wall <<EOF |
1651 | Problem detected with disk: $SMARTD_DEVICESTRING | |
1652 | Warning message from smartd is: $SMARTD_MESSAGE | |
1653 | Shutting down machine in 30 seconds... | |
1654 | EOF | |
1655 | ||
832b75ed GG |
1656 | # Wait half a minute |
1657 | sleep 30 | |
d2e702cf | 1658 | |
832b75ed | 1659 | # Power down the machine |
f9e10201 JD |
1660 | /sbin/shutdown \-hf now |
1661 | .Ve | |
1662 | .Sp | |
832b75ed | 1663 | Some example scripts are distributed with the smartmontools package, |
e9583e0c | 1664 | in /usr/local/share/doc/smartmontools/examplescripts/. |
f9e10201 | 1665 | .Sp |
832b75ed GG |
1666 | Please note that these scripts typically run as root, so any files |
1667 | that they read/write should not be writable by ordinary users or | |
1668 | reside in directories like /tmp that are writable by ordinary users | |
1669 | and may expose your system to symlink attacks. | |
f9e10201 | 1670 | .Sp |
832b75ed GG |
1671 | As previously described, if the scripts write to STDOUT or STDERR, |
1672 | this is interpreted as indicating that there was an internal error | |
1673 | within the script, and a snippet of STDOUT/STDERR is logged to SYSLOG. | |
1674 | The remainder is flushed. | |
f9e10201 | 1675 | .Sp |
d2e702cf GI |
1676 | .\" %IF NOT OS Windows |
1677 | .SH FILES | |
1678 | .TP | |
1679 | .B /usr/local/etc/smartd.conf | |
1680 | full path of this file. | |
f9e10201 | 1681 | .Sp |
d2e702cf GI |
1682 | .\" %ENDIF NOT OS Windows |
1683 | .SH SEE ALSO | |
1684 | \fBsmartd\fP(8), \fBsmartctl\fP(8), | |
1685 | \fBmail\fP(1), \fBregex\fP(7). | |
f9e10201 | 1686 | .Sp |
a86ec89e GI |
1687 | .SH PACKAGE VERSION |
1688 | CURRENT_SVN_VERSION CURRENT_SVN_DATE CURRENT_SVN_REV | |
1689 | .br | |
f9e10201 | 1690 | $Id: smartd.conf.5.in 4589 2017-11-04 15:30:54Z chrfranke $ |