Author: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date: Wed, 3 Feb 2016 00:22:52 +0000
Cc: 669053@bugs.debian.org
Bug-Debian: http://bugs.debian.org/669053
Description: Various manpage improvements.
Enable and fix warnings from 'man' and 'groff'.
Change `` to ".
Split lines longer than about 80 characters into two or more
lines. References:
1) man-pages(7) from package \"man-pages\" or
\"www.kernel.org/doc/man-pages\" section 7 or
\"man7.org/linux/man-pages/man7/man-pages.7.html\":
New sentences should be started on new lines.
This makes it easier to see the effect of patches,
which often operate at the level of individual sentences.
Remove space at end of lines.
The space between sentences in "roff" is two spaces.
Better is to begin each sentence on a new line to avoid different
writers' conventions.
Change \' (acute) to \(aq, if used as a quote.
Change \' (acute) to ', if used as an apostrophe.
Change - to \(en (en-dash) for a numeric range.
Protect a full stop (.) with \&, if
a) it can be transported to the first column, when the line is
reformatted (split).
b) it is the last part of an abbreviation that does not end a
sentence.
Add a (no-break, "\ ") space between a number and an unit as these
are not one entity
Change a hyphen-minus to a minus (\-), if in front of a name for an option
Remove space in the first column, if not intended.
diff --git a/smartd.conf.5.in b/smartd.conf.5.in
index 21b031f..df2b6c4 100644
a
|
b
|
You should have received a copy of the GNU General Public License
|
15 | 15 | This code was originally developed as a Senior Thesis by Michael Cornwell |
16 | 16 | at the Concurrent Systems Laboratory (now part of the Storage Systems |
17 | 17 | Research Center), Jack Baskin School of Engineering, University of |
18 | | California, Santa Cruz. http://ssrc.soe.ucsc.edu/ |
| 18 | California, Santa Cruz. http://ssrc.soe.ucsc.edu/ |
19 | 19 | |
20 | 20 | .. |
21 | 21 | .TH SMARTD.CONF 5 "CURRENT_SVN_DATE" "CURRENT_SVN_VERSION" "SMART Monitoring Tools" |
… |
… |
daemon.
|
33 | 33 | |
34 | 34 | If the configuration file \fB/usr/local/etc/smartd.conf\fP is present, |
35 | 35 | \fBsmartd\fP reads it at startup, before \fBfork\fP(2)ing into the |
36 | | background. If \fBsmartd\fP subsequently receives a \fBHUP\fP signal, |
| 36 | background. If \fBsmartd\fP subsequently receives a \fBHUP\fP signal, |
37 | 37 | it will then re-read the configuration file. If \fBsmartd\fP is |
38 | 38 | running in debug mode, then an \fBINT\fP signal will also make it |
39 | | re-read the configuration file. This signal can be generated by typing |
40 | | \fB\<CONTROL-C\>\fP in the terminal window where \fBsmartd\fP is |
| 39 | re-read the configuration file. This signal can be generated by typing |
| 40 | \fB<CONTROL-C>\fP in the terminal window where \fBsmartd\fP is |
41 | 41 | running. |
42 | 42 | |
43 | 43 | In the absence of a configuration file |
44 | 44 | \fBsmartd\fP will try to open all available devices |
45 | 45 | (see \fBsmartd\fP(8) man page). |
46 | | A configuration file with a single line \fB\'DEVICESCAN \-a'\fP |
| 46 | A configuration file with a single line \fB\(aqDEVICESCAN \-a\(aq\fP |
47 | 47 | would have the same effect. |
48 | 48 | |
49 | 49 | This can be annoying if you have an ATA or SCSI device that hangs or |
50 | 50 | misbehaves when receiving SMART commands. Even if this causes no |
51 | 51 | problems, you may be annoyed by the string of error log messages about devices |
52 | | that can\'t be opened. |
| 52 | that can't be opened. |
53 | 53 | |
54 | 54 | One can avoid this problem, and gain more control over the types of |
55 | 55 | events monitored by |
… |
… |
by using the configuration file
|
59 | 59 | This file contains a list of devices to monitor, with one device per |
60 | 60 | line. An example file is included with the |
61 | 61 | .B smartmontools |
62 | | distribution. You will find this sample configuration file in |
63 | | \fB/usr/local/share/doc/smartmontools/\fP. For security, the configuration file |
64 | | should not be writable by anyone but root. The syntax of the file is as |
| 62 | distribution. You will find this sample configuration file in |
| 63 | \fB/usr/local/share/doc/smartmontools/\fP. For security, the configuration file |
| 64 | should not be writable by anyone but root. The syntax of the file is as |
65 | 65 | follows: |
66 | 66 | .IP \(bu 4 |
67 | 67 | There should be one device listed per line, although you may have |
68 | 68 | lines that are entirely comments or white space. |
69 | 69 | .IP \(bu 4 |
70 | | Any text following a hash sign \'#\' and up to the end of the line is |
| 70 | Any text following a hash sign \(aq#\(aq and up to the end of the line is |
71 | 71 | taken to be a comment, and ignored. |
72 | 72 | .IP \(bu 4 |
73 | | Lines may be continued by using a backslash \'\e\' as the last |
| 73 | Lines may be continued by using a backslash \(aq\e\(aq as the last |
74 | 74 | non-whitespace or non-comment item on a line. |
75 | 75 | .IP \(bu 4 |
76 | | Note: a line whose first character is a hash sign \'#\' is treated as |
| 76 | Note: a line whose first character is a hash sign \(aq#\(aq is treated as |
77 | 77 | a white-space blank line, \fBnot\fP as a non-existent line, and will |
78 | 78 | \fBend\fP a continuation line. |
79 | 79 | .PP |
80 | 80 | |
81 | | Here is an example configuration file. It\'s for illustrative purposes |
82 | | only; please don\'t copy it onto your system without reading to the end |
| 81 | Here is an example configuration file. It's for illustrative purposes |
| 82 | only; please don't copy it onto your system without reading to the end |
83 | 83 | of the |
84 | 84 | .B DIRECTIVES |
85 | 85 | Section below! |
… |
… |
Section below!
|
92 | 92 | .B # On the second disk, start a long self-test every |
93 | 93 | .B # Sunday between 3 and 4 am. |
94 | 94 | .B # |
95 | | .B \ \ /dev/sda -a -m admin@example.com,root@localhost |
96 | | .B \ \ /dev/sdb -a -I 194 -I 5 -i 12 -s L/../../7/03 |
| 95 | .B \ \ /dev/sda \-a \-m admin@example.com,root@localhost |
| 96 | .B \ \ /dev/sdb \-a \-I 194 \-I 5 \-i 12 \-s L/../../7/03 |
97 | 97 | .B # |
98 | 98 | .B # Send a TEST warning email to admin on startup. |
99 | 99 | .B # |
100 | | .B \ \ /dev/sdc -m admin@example.com -M test |
| 100 | .B \ \ /dev/sdc \-m admin@example.com \-M test |
101 | 101 | .B # |
102 | | .B # Strange device. It\'s SCSI. Start a scheduled |
| 102 | .B # Strange device. It's SCSI. Start a scheduled |
103 | 103 | .B # long self test between 5 and 6 am Monday/Thursday |
104 | | .B \ \ /dev/weird -d scsi -s L/../../(1|4)/05 |
| 104 | .B \ \ /dev/weird \-d scsi \-s L/../../(1|4)/05 |
105 | 105 | .B # |
106 | 106 | .B # An ATA disk may appear as a SCSI device to the |
107 | | .B # OS. If a SCSI to ATA Translation (SAT) layer |
| 107 | .B # OS. If a SCSI to ATA Translation (SAT) layer |
108 | 108 | .B # is between the OS and the device then this can be |
109 | | .B # flagged with the '-d sat' option. This situation |
| 109 | .B # flagged with the '-d sat' option. This situation |
110 | 110 | .B # may become common with SATA disks in SAS and FC |
111 | 111 | .B # environments. |
112 | | .B \ \ /dev/sda -a -d sat |
| 112 | .B \ \ /dev/sda \-a \-d sat |
113 | 113 | .B # |
114 | 114 | .\" %IF OS Linux |
115 | 115 | .B # Three disks connected to a MegaRAID controller |
116 | | .B # Start short self-tests daily between 1-2, 2-3, and |
117 | | .B # 3-4 am. |
118 | | .B \ \ /dev/sda -d megaraid,0 -a -s S/../.././01 |
119 | | .B \ \ /dev/sda -d megaraid,1 -a -s S/../.././02 |
120 | | .B \ \ /dev/sda -d megaraid,2 -a -s S/../.././03 |
121 | | .B \ \ /dev/bus/0 -d megaraid,2 -a -s S/../.././03 |
| 116 | .B # Start short self-tests daily between 1\(en2, 2\(en3, and |
| 117 | .B # 3\(en4 am. |
| 118 | .B \ \ /dev/sda \-d megaraid,0 \-a \-s S/../.././01 |
| 119 | .B \ \ /dev/sda \-d megaraid,1 \-a \-s S/../.././02 |
| 120 | .B \ \ /dev/sda \-d megaraid,2 \-a \-s S/../.././03 |
| 121 | .B \ \ /dev/bus/0 \-d megaraid,2 \-a \-s S/../.././03 |
122 | 122 | .B # |
123 | 123 | .B # Three disks connected to an AacRaid controller |
124 | | .B # Start short self-tests daily between 1-2, 2-3, and |
125 | | .B # 3-4 am. |
126 | | .B \ \ /dev/sda -d aacraid,0,0,66 -a -s S/../.././01 |
127 | | .B \ \ /dev/sda -d aacraid,0,0,67 -a -s S/../.././02 |
128 | | .B \ \ /dev/sda -d aacraid,0,0,68 -a -s S/../.././03 |
| 124 | .B # Start short self-tests daily between 1\(en2, 2\(en3, and |
| 125 | .B # 3\(en4 am. |
| 126 | .B \ \ /dev/sda \-d aacraid,0,0,66 \-a \-s S/../.././01 |
| 127 | .B \ \ /dev/sda \-d aacraid,0,0,67 \-a \-s S/../.././02 |
| 128 | .B \ \ /dev/sda \-d aacraid,0,0,68 \-a \-s S/../.././03 |
129 | 129 | .B # |
130 | 130 | .\" %ENDIF OS Linux |
131 | 131 | .B # Four ATA disks on a 3ware 6/7/8000 controller. |
132 | | .B # Start short self-tests daily between midnight and 1am, |
133 | | .B # 1-2, 2-3, and 3-4 am. Starting with the Linux 2.6 |
| 132 | .B # Start short self-tests daily between midnight and 1 am, |
| 133 | .B # 1\(en2, 2\(en3, and 3\(en4 am. Starting with the Linux 2.6 |
134 | 134 | .B # kernel series, /dev/sdX is deprecated in favor of |
135 | 135 | .B # /dev/tweN. For example replace /dev/sdc by /dev/twe0 |
136 | 136 | .B # and /dev/sdd by /dev/twe1. |
137 | | .B \ \ /dev/sdc -d 3ware,0 -a -s S/../.././00 |
138 | | .B \ \ /dev/sdc -d 3ware,1 -a -s S/../.././01 |
139 | | .B \ \ /dev/sdd -d 3ware,2 -a -s S/../.././02 |
140 | | .B \ \ /dev/sdd -d 3ware,3 -a -s S/../.././03 |
| 137 | .B \ \ /dev/sdc \-d 3ware,0 \-a \-s S/../.././00 |
| 138 | .B \ \ /dev/sdc \-d 3ware,1 \-a \-s S/../.././01 |
| 139 | .B \ \ /dev/sdd \-d 3ware,2 \-a \-s S/../.././02 |
| 140 | .B \ \ /dev/sdd \-d 3ware,3 \-a \-s S/../.././03 |
141 | 141 | .B # |
142 | 142 | .B # Two ATA disks on a 3ware 9000 controller. |
143 | 143 | .B # Start long self-tests Sundays between midnight and |
144 | | .B # 1am and 2-3 am |
145 | | .B \ \ /dev/twa0 -d 3ware,0 -a -s L/../../7/00 |
146 | | .B \ \ /dev/twa0 -d 3ware,1 -a -s L/../../7/02 |
| 144 | .B # 1 am and 2\(en3 am |
| 145 | .B \ \ /dev/twa0 \-d 3ware,0 \-a \-s L/../../7/00 |
| 146 | .B \ \ /dev/twa0 \-d 3ware,1 \-a \-s L/../../7/02 |
147 | 147 | .B # |
148 | 148 | .B # Two SATA (not SAS) disks on a 3ware 9750 controller. |
149 | 149 | .B # Start long self-tests Sundays between midnight and |
150 | | .B # 1am and 2-3 am |
| 150 | .B # 1 am and 2\(en3 am |
151 | 151 | .\" %IF OS Linux |
152 | | .B \ \ /dev/twl0 -d 3ware,0 -a -s L/../../7/00 |
153 | | .B \ \ /dev/twl0 -d 3ware,1 -a -s L/../../7/02 |
| 152 | .B \ \ /dev/twl0 \-d 3ware,0 \-a \-s L/../../7/00 |
| 153 | .B \ \ /dev/twl0 \-d 3ware,1 \-a \-s L/../../7/02 |
154 | 154 | .\" %ENDIF OS Linux |
155 | 155 | .\" %IF OS FreeBSD |
156 | | .B \ \ /dev/tws0 -d 3ware,0 -a -s L/../../7/00 |
157 | | .B \ \ /dev/tws0 -d 3ware,1 -a -s L/../../7/02 |
| 156 | .B \ \ /dev/tws0 \-d 3ware,0 \-a \-s L/../../7/00 |
| 157 | .B \ \ /dev/tws0 \-d 3ware,1 \-a \-s L/../../7/02 |
158 | 158 | .\" %ENDIF OS FreeBSD |
159 | 159 | .B # |
160 | 160 | .B # Three SATA disks on a HighPoint RocketRAID controller. |
161 | | .B # Start short self-tests daily between 1-2, 2-3, and |
162 | | .B # 3-4 am. |
| 161 | .B # Start short self-tests daily between 1\(en2, 2\(en3, and |
| 162 | .B # 3\(en4 am. |
163 | 163 | .\" %IF OS Linux |
164 | 164 | .B # under Linux |
165 | | .B \ \ /dev/sde -d hpt,1/1 -a -s S/../.././01 |
166 | | .B \ \ /dev/sde -d hpt,1/2 -a -s S/../.././02 |
167 | | .B \ \ /dev/sde -d hpt,1/3 -a -s S/../.././03 |
| 165 | .B \ \ /dev/sde \-d hpt,1/1 \-a \-s S/../.././01 |
| 166 | .B \ \ /dev/sde \-d hpt,1/2 \-a \-s S/../.././02 |
| 167 | .B \ \ /dev/sde \-d hpt,1/3 \-a \-s S/../.././03 |
168 | 168 | .\" %ENDIF OS Linux |
169 | 169 | .\" %IF OS FreeBSD |
170 | 170 | .B # under FreeBSD |
171 | | .B /dev/hptrr -d hpt,1/1 -a -s S/../.././01 |
172 | | .B /dev/hptrr -d hpt,1/2 -a -s S/../.././02 |
173 | | .B /dev/hptrr -d hpt,1/3 -a -s S/../.././03 |
| 171 | .B /dev/hptrr \-d hpt,1/1 \-a \-s S/../.././01 |
| 172 | .B /dev/hptrr \-d hpt,1/2 \-a \-s S/../.././02 |
| 173 | .B /dev/hptrr \-d hpt,1/3 \-a \-s S/../.././03 |
174 | 174 | .\" %ENDIF OS FreeBSD |
175 | 175 | .B # |
176 | | .B # Two SATA disks connected to a HighPoint RocketRAID |
| 176 | .B # Two SATA disks connected to a HighPoint RocketRAID |
177 | 177 | .B # via a pmport device. Start long self-tests Sundays |
178 | | .B # between midnight and 1am and 2-3 am. |
| 178 | .B # between midnight and 1 am and 2\(en3 am. |
179 | 179 | .\" %IF OS Linux |
180 | 180 | .B # under Linux |
181 | | .B \ \ /dev/sde -d hpt,1/4/1 -a -s L/../../7/00 |
182 | | .B \ \ /dev/sde -d hpt,1/4/2 -a -s L/../../7/02 |
| 181 | .B \ \ /dev/sde \-d hpt,1/4/1 \-a \-s L/../../7/00 |
| 182 | .B \ \ /dev/sde \-d hpt,1/4/2 \-a \-s L/../../7/02 |
183 | 183 | .\" %ENDIF OS Linux |
184 | 184 | .\" %IF OS FreeBSD |
185 | 185 | .B # under FreeBSD |
186 | | .B \ \ /dev/hptrr -d hpt,1/4/1 -a -s L/../../7/00 |
187 | | .B \ \ /dev/hptrr -d hpt,1/4/2 -a -s L/../../7/02 |
| 186 | .B \ \ /dev/hptrr \-d hpt,1/4/1 \-a \-s L/../../7/00 |
| 187 | .B \ \ /dev/hptrr \-d hpt,1/4/2 \-a \-s L/../../7/02 |
188 | 188 | .B # |
189 | 189 | .\" %ENDIF OS FreeBSD |
190 | 190 | .B # Three SATA disks connected to an Areca |
191 | | .B # RAID controller. Start long self-tests Sundays |
| 191 | .B # RAID controller. o51Start long self-tests Sundays |
192 | 192 | .B # between midnight and 3 am. |
193 | 193 | .\" %IF OS Linux |
194 | | .B \ \ /dev/sg2 -d areca,1 -a -s L/../../7/00 |
195 | | .B \ \ /dev/sg2 -d areca,2 -a -s L/../../7/01 |
196 | | .B \ \ /dev/sg2 -d areca,3 -a -s L/../../7/02 |
| 194 | .B \ \ /dev/sg2 \-d areca,1 \-a \-s L/../../7/00 |
| 195 | .B \ \ /dev/sg2 \-d areca,2 \-a \-s L/../../7/01 |
| 196 | .B \ \ /dev/sg2 \-d areca,3 \-a \-s L/../../7/02 |
197 | 197 | .\" %ENDIF OS Linux |
198 | 198 | .\" %IF OS FreeBSD |
199 | | .B \ \ /dev/arcmsr0 -d areca,1 -a -s L/../../7/00 |
200 | | .B \ \ /dev/arcmsr0 -d areca,2 -a -s L/../../7/01 |
201 | | .B \ \ /dev/arcmsr0 -d areca,3 -a -s L/../../7/02 |
| 199 | .B \ \ /dev/arcmsr0 \-d areca,1 \-a \-s L/../../7/00 |
| 200 | .B \ \ /dev/arcmsr0 \-d areca,2 \-a \-s L/../../7/01 |
| 201 | .B \ \ /dev/arcmsr0 \-d areca,3 \-a \-s L/../../7/02 |
202 | 202 | .\" %ENDIF OS FreeBSD |
203 | 203 | .B # |
204 | | .B # The following line enables monitoring of the |
205 | | .B # ATA Error Log and the Self-Test Error Log. |
| 204 | .B # The following line enables monitoring of the |
| 205 | .B # ATA Error Log and the Self-Test Error Log. |
206 | 206 | .B # It also tracks changes in both Prefailure |
207 | 207 | .B # and Usage Attributes, apart from Attributes |
208 | 208 | .B # 9, 194, and 231, and shows continued lines: |
209 | 209 | .B # |
210 | | .B \ \ /dev/sdd\ -l\ error\ \e |
211 | | .B \ \ \ \ \ \ \ \ \ \ \ -l\ selftest\ \e |
212 | | .B \ \ \ \ \ \ \ \ \ \ \ -t\ \e\ \ \ \ \ \ # Attributes not tracked: |
213 | | .B \ \ \ \ \ \ \ \ \ \ \ -I\ 194\ \e\ \ # temperature |
214 | | .B \ \ \ \ \ \ \ \ \ \ \ -I\ 231\ \e\ \ # also temperature |
215 | | .B \ \ \ \ \ \ \ \ \ \ \ -I 9\ \ \ \ \ \ # power-on hours |
| 210 | .B \ \ /dev/sdd\ \-l\ error\ \e |
| 211 | .B \ \ \ \ \ \ \ \ \ \ \ \-l\ selftest\ \e |
| 212 | .B \ \ \ \ \ \ \ \ \ \ \ \-t\ \e\ \ \ \ \ \ # Attributes not tracked: |
| 213 | .B \ \ \ \ \ \ \ \ \ \ \ \-I\ 194\ \e\ \ # temperature |
| 214 | .B \ \ \ \ \ \ \ \ \ \ \ \-I\ 231\ \e\ \ # also temperature |
| 215 | .B \ \ \ \ \ \ \ \ \ \ \ \-I 9\ \ \ \ \ \ # power-on hours |
216 | 216 | .B # |
217 | 217 | .B ################################################ |
218 | 218 | .fi |
… |
… |
as defaults for the next device entries.
|
237 | 237 | This configuration: |
238 | 238 | .PP |
239 | 239 | .nf |
240 | | \ \ DEFAULT -a -R5! -W 2,40,45 -I 194 -s L/../../7/00 -m admin@example.com |
| 240 | \ \ DEFAULT \-a \-R5! \-W 2,40,45 \-I 194 \-s L/../../7/00 \-m admin@example.com |
241 | 241 | \ \ /dev/sda |
242 | 242 | \ \ /dev/sdb |
243 | 243 | \ \ /dev/sdc |
244 | | \ \ DEFAULT -H -m admin@example.com |
| 244 | \ \ DEFAULT \-H \-m admin@example.com |
245 | 245 | \ \ /dev/sdd |
246 | | \ \ /dev/sde -d removable |
| 246 | \ \ /dev/sde \-d removable |
247 | 247 | .fi |
248 | 248 | .PP |
249 | 249 | has the same effect as: |
250 | 250 | .PP |
251 | 251 | .nf |
252 | | \ \ /dev/sda -a -R5! -W 2,40,45 -I 194 -s L/../../7/00 -m admin@example.com |
253 | | \ \ /dev/sdb -a -R5! -W 2,40,45 -I 194 -s L/../../7/00 -m admin@example.com |
254 | | \ \ /dev/sdc -a -R5! -W 2,40,45 -I 194 -s L/../../7/00 -m admin@example.com |
255 | | \ \ /dev/sdd -H -m admin@example.com |
256 | | \ \ /dev/sde -d removable -H -m admin@example.com |
| 252 | \ \ /dev/sda \-a \-R5! \-W 2,40,45 \-I 194 \-s L/../../7/00 \-m admin@example.com |
| 253 | \ \ /dev/sdb \-a \-R5! \-W 2,40,45 \-I 194 \-s L/../../7/00 \-m admin@example.com |
| 254 | \ \ /dev/sdc \-a \-R5! \-W 2,40,45 \-I 194 \-s L/../../7/00 \-m admin@example.com |
| 255 | \ \ /dev/sdd \-H \-m admin@example.com |
| 256 | \ \ /dev/sde \-d removable \-H \-m admin@example.com |
257 | 257 | .fi |
258 | 258 | |
259 | 259 | |
… |
… |
or
|
264 | 264 | .B DEFAULT |
265 | 265 | on any line of the |
266 | 266 | .B /usr/local/etc/smartd.conf |
267 | | configuration file. Note that |
268 | | .B these are NOT command-line options for |
| 267 | configuration file. Note that |
| 268 | .B these are NOT command-line options for |
269 | 269 | \fBsmartd\fP. |
270 | 270 | The Directives below may appear in any order, following the device |
271 | | name. |
| 271 | name. |
272 | 272 | |
273 | 273 | .B For an ATA device, |
274 | 274 | if no Directives appear, then the device will be monitored |
275 | | as if the \'\-a\' Directive (monitor all SMART properties) had been given. |
| 275 | as if the \(aq\-a\(aq Directive (monitor all SMART properties) had been given. |
276 | 276 | |
277 | 277 | .B If a SCSI disk is listed, |
278 | 278 | it will be monitored at the maximum implemented level: roughly |
279 | | equivalent to using the \'\-H \-l selftest\' options for an ATA disk. |
280 | | So with the exception of \'\-d\', \'\-m\', \'\-l selftest\', \'\-s\', and |
281 | | \'\-M\', the Directives below are ignored for SCSI disks. For SCSI |
282 | | disks, the \'\-m\' Directive sends a warning email if the SMART status |
| 279 | equivalent to using the \(aq\-H \-l selftest\(aq options for an ATA disk. |
| 280 | So with the exception of \(aq\-d\(aq, \(aq\-m\(aq, \(aq\-l selftest\(aq, \(aq\-s\(aq, and |
| 281 | \(aq\-M\(aq, the Directives below are ignored for SCSI disks. For SCSI |
| 282 | disks, the \(aq\-m\(aq Directive sends a warning email if the SMART status |
283 | 283 | indicates a disk failure or problem, if the SCSI inquiry about disk |
284 | 284 | status fails, or if new errors appear in the self-test log. |
285 | 285 | |
286 | 286 | .B If a 3ware controller is used |
287 | 287 | then the corresponding SCSI (/dev/sd?) or character device (/dev/twe?, |
288 | | /dev/twa?, /dev/twl? or /dev/tws?) must be listed, along with the \'\-d 3ware,N\' |
| 288 | /dev/twa?, /dev/twl? or /dev/tws?) must be listed, along with the \(aq\-d 3ware,N\(aq |
289 | 289 | Directive (see below). The individual ATA disks hosted by the 3ware |
290 | 290 | controller appear to \fBsmartd\fP as normal ATA devices. Hence all |
291 | 291 | the ATA directives can be used for these disks (but see note below). |
292 | 292 | |
293 | 293 | .\" %IF OS Linux FreeBSD |
294 | 294 | .B If an Areca controller is used |
295 | | then the corresponding device (SCSI /dev/sg? on Linux or /dev/arcmsr0 on |
296 | | FreeBSD) must be listed, along with the \'\-d areca,N\' Directive (see below). |
| 295 | then the corresponding device (SCSI /dev/sg? on Linux or /dev/arcmsr0 on |
| 296 | FreeBSD) must be listed, along with the \(aq\-d areca,N\(aq Directive (see below). |
297 | 297 | The individual SATA disks hosted by the Areca controller appear to \fBsmartd\fP |
298 | 298 | as normal ATA devices. Hence all the ATA directives can be used for |
299 | 299 | these disks. Areca firmware version 1.46 or later which supports |
… |
… |
This is for ATA disks that have a SCSI to ATA Translation (SAT) Layer
|
328 | 328 | (SATL) between the disk and the operating system. |
329 | 329 | SAT defines two ATA PASS THROUGH SCSI commands, one 12 bytes long and |
330 | 330 | the other 16 bytes long. The default is the 16 byte variant which can be |
331 | | overridden with either \'\-d sat,12\' or \'\-d sat,16\'. |
| 331 | overridden with either \(aq\-d sat,12\(aq or \(aq\-d sat,16\(aq. |
332 | 332 | |
333 | | If \'\-d sat,auto\' is specified, device type SAT (for ATA/SATA disks) is |
| 333 | If \(aq\-d sat,auto\(aq is specified, device type SAT (for ATA/SATA disks) is |
334 | 334 | only used if the SCSI INQUIRY data reports a SATL (VENDOR: "ATA "). |
335 | 335 | Otherwise device type SCSI (for SCSI/SAS disks) is used. |
336 | 336 | |
… |
… |
Otherwise device type SCSI (for SCSI/SAS disks) is used.
|
338 | 338 | \- this device type is for ATA disks that are behind a Cypress USB to PATA |
339 | 339 | bridge. This will use the ATACB proprietary scsi pass through command. |
340 | 340 | The default SCSI operation code is 0x24, but although it can be overridden |
341 | | with \'\-d usbcypress,0xN\', where N is the scsi operation code, |
| 341 | with \(aq\-d usbcypress,0xN\(aq, where N is the scsi operation code, |
342 | 342 | you're running the risk of damage to the device or filesystems on it. |
343 | 343 | |
344 | 344 | .I usbjmicron[,p][,x][,PORT] |
345 | 345 | \- this device type is for SATA disks that are behind a JMicron USB to |
346 | | PATA/SATA bridge. The 48-bit ATA commands (required e.g. for \'\-l xerror\', |
| 346 | PATA/SATA bridge. The 48-bit ATA commands (required e.g.\& for \(aq\-l xerror\(aq, |
347 | 347 | see below) do not work with all of these bridges and are therefore disabled by |
348 | | default. These commands can be enabled by \'\-d usbjmicron,x\'. |
| 348 | default. These commands can be enabled by \(aq\-d usbjmicron,x\(aq. |
349 | 349 | If two disks are connected to a bridge with two ports, an error message is printed |
350 | 350 | if no PORT is specified. |
351 | | The port can be specified by \'\-d usbjmicron[,x],PORT\' where PORT is 0 |
| 351 | The port can be specified by \(aq\-d usbjmicron[,x],PORT\(aq where PORT is 0 |
352 | 352 | (master) or 1 (slave). This is not necessary if the device uses a port |
353 | 353 | multiplier to connect multiple disks to one port. The disks appear under |
354 | 354 | separate /dev/ice names then. |
355 | | CAUTION: Specifying \',x\' for a device which does not support it results |
| 355 | CAUTION: Specifying \(aq,x\(aq for a device which does not support it results |
356 | 356 | in I/O errors and may disconnect the drive. The same applies if the specified |
357 | 357 | PORT does not exist or is not connected to a disk. |
358 | 358 | |
359 | 359 | The Prolific PL2507/3507 USB bridges with older firmware support a pass-through |
360 | | command similar to JMicron and work with \'\-d usbjmicron,0\'. |
| 360 | command similar to JMicron and work with \(aq\-d usbjmicron,0\(aq. |
361 | 361 | Newer Prolific firmware requires a modified command which can be selected by |
362 | | \'\-d usbjmicron,p\'. |
| 362 | \(aq\-d usbjmicron,p\(aq. |
363 | 363 | Note that this does not yet support the SMART status command. |
364 | 364 | |
365 | 365 | .I usbprolific |
… |
… |
to a MegaRAID controller. The non-negative integer N (in the range of 0 to
|
384 | 384 | This interface will also work for Dell PERC controllers. |
385 | 385 | In log files and email messages this disk will be identified as |
386 | 386 | megaraid_disk_XXX with XXX in the range from 000 to 127 inclusive. |
387 | | It is possible to set RAID device name as /dev/bus/N, where N is a SCSI bus |
| 387 | It is possible to set RAID device name as /dev/bus/N, where N is a SCSI bus |
388 | 388 | number. |
389 | 389 | Please see the \fBsmartctl\fP(8) man page for further details. |
390 | 390 | |
… |
… |
Please see the \fBsmartctl\fP(8) man page for further details.
|
420 | 420 | \- [FreeBSD, Linux, Windows and Cygwin only] the device consists of one or more SATA disks |
421 | 421 | connected to an Areca SATA RAID controller. The positive integer N (in the range |
422 | 422 | from 1 to 24 inclusive) denotes which disk on the controller is monitored. |
423 | | In log files and email messages this disk will be identifed as |
| 423 | In log files and email messages this disk will be identified as |
424 | 424 | areca_disk_XX with XX in the range from 01 to 24 inclusive. |
425 | 425 | Please see the \fBsmartctl\fP(8) man page for further details. |
426 | 426 | |
… |
… |
Please see the \fBsmartctl\fP(8) man page for further details.
|
460 | 460 | This allows to ignore specific devices which are detected by a following |
461 | 461 | DEVICESCAN configuration line. |
462 | 462 | It may also be used to temporary disable longer multi-line configuration entries. |
463 | | This Directive may be used in conjunction with the other \'\-d\' Directives. |
| 463 | This Directive may be used in conjunction with the other \(aq\-d\(aq Directives. |
464 | 464 | |
465 | 465 | .I removable |
466 | 466 | \- the device or its media is removable. This indicates to |
… |
… |
This Directive may be used in conjunction with the other \'\-d\' Directives.
|
468 | 468 | that it should continue (instead of exiting, which is the default |
469 | 469 | behavior) if the device does not appear to be present when |
470 | 470 | \fBsmartd\fP is started. This Directive may be used in conjunction |
471 | | with the other \'\-d\' Directives. |
| 471 | with the other \(aq\-d\(aq Directives. |
472 | 472 | .TP |
473 | 473 | .B \-n POWERMODE[,N][,q] |
474 | | [ATA only] This \'nocheck\' Directive is used to prevent a disk from |
| 474 | [ATA only] This \(aqnocheck\(aq Directive is used to prevent a disk from |
475 | 475 | being spun-up when it is periodically polled by \fBsmartd\fP. |
476 | 476 | |
477 | | ATA disks have five different power states. In order of increasing |
478 | | power consumption they are: \'OFF\', \'SLEEP\', \'STANDBY\', \'IDLE\', |
479 | | and \'ACTIVE\'. Typically in the OFF, SLEEP, and STANDBY modes the |
480 | | disk\'s platters are not spinning. But usually, in response to SMART |
| 477 | ATA disks have five different power states. In order of increasing |
| 478 | power consumption they are: \(aqOFF\(aq, \(aqSLEEP\(aq, \(aqSTANDBY\(aq, \(aqIDLE\(aq, |
| 479 | and \(aqACTIVE\(aq. Typically in the OFF, SLEEP, and STANDBY modes the |
| 480 | disk's platters are not spinning. But usually, in response to SMART |
481 | 481 | commands issued by \fBsmartd\fP, the disk platters are spun up. So if |
482 | 482 | this option is not used, then a disk which is in a low-power mode may |
483 | 483 | be spun up and put into a higher-power mode when it is periodically |
… |
… |
polled by \fBsmartd\fP.
|
485 | 485 | |
486 | 486 | Note that if the disk is in SLEEP mode when \fBsmartd\fP is started, |
487 | 487 | then it won't respond to \fBsmartd\fP commands, and so the disk won't |
488 | | be registered as a device for \fBsmartd\fP to monitor. If a disk is in |
| 488 | be registered as a device for \fBsmartd\fP to monitor. If a disk is in |
489 | 489 | any other low-power mode, then the commands issued by \fBsmartd\fP to |
490 | 490 | register the disk will probably cause it to spin-up. |
491 | 491 | |
492 | | The \'\fB\-n\fP\' (nocheck) Directive specifies if \fBsmartd\fP\'s |
| 492 | The \(aq\fB\-n\fP\(aq (nocheck) Directive specifies if \fBsmartd\fP's |
493 | 493 | periodic checks should still be carried out when the device is in a |
494 | 494 | low-power mode. It may be used to prevent a disk from being spun-up |
495 | 495 | by periodic \fBsmartd\fP polling. The allowed values of POWERMODE |
… |
… |
are:
|
497 | 497 | |
498 | 498 | .I never |
499 | 499 | \- \fBsmartd\fP will poll (check) the device regardless of its power |
500 | | mode. This may cause a disk which is spun-down to be spun-up when |
| 500 | mode. This may cause a disk which is spun-down to be spun-up when |
501 | 501 | \fBsmartd\fP checks it. This is the default behavior if the '\-n' |
502 | 502 | Directive is not given. |
503 | 503 | |
… |
… |
In the IDLE state, most disks are still spinning, so this is probably
|
516 | 516 | not what you want. |
517 | 517 | |
518 | 518 | Maximum number of skipped checks (in a row) can be specified by |
519 | | appending positive number \',N\' to POWERMODE (like \'\-n standby,15\'). |
| 519 | appending positive number \(aq,N\(aq to POWERMODE (like \(aq\-n standby,15\(aq). |
520 | 520 | After N checks are skipped in a row, powermode is ignored and the |
521 | 521 | check is performed anyway. |
522 | 522 | |
523 | 523 | When a periodic test is skipped, \fBsmartd\fP normally writes an |
524 | | informal log message. The message can be suppressed by appending |
525 | | the option \',q\' to POWERMODE (like \'\-n standby,q\'). |
| 524 | informal log message. The message can be suppressed by appending |
| 525 | the option \(aq,q\(aq to POWERMODE (like \(aq\-n standby,q\(aq). |
526 | 526 | This prevents a laptop disk from spinning up due to this message. |
527 | 527 | |
528 | | Both \',N\' and \',q\' can be specified together. |
| 528 | Both \(aq,N\(aq and \(aq,q\(aq can be specified together. |
529 | 529 | .TP |
530 | 530 | .B \-T TYPE |
531 | 531 | Specifies how tolerant |
… |
… |
Directive are \fIon\fP and \fIoff\fP. Also affects SCSI devices.
|
570 | 570 | STATUS command. |
571 | 571 | If this command reports a failing health status, then disk |
572 | 572 | failure is predicted in less than 24 hours, and a message at loglevel |
573 | | .B \'LOG_CRIT\' |
| 573 | .B \(aqLOG_CRIT\(aq |
574 | 574 | will be logged to syslog. [Please see the |
575 | 575 | .B smartctl \-H |
576 | 576 | command-line option.] |
… |
… |
error log has increased since the last check.
|
587 | 587 | \- [ATA only] report if the number of ATA errors reported in the Extended |
588 | 588 | Comprehensive SMART error log has increased since the last check. |
589 | 589 | |
590 | | If both \'\-l error\' and \'\-l xerror\' are specified, smartd checks |
| 590 | If both \(aq\-l error\(aq and \(aq\-l xerror\(aq are specified, smartd checks |
591 | 591 | the maximum of both values. |
592 | 592 | |
593 | 593 | [Please see the \fBsmartctl \-l xerror\fP command-line option.] |
… |
… |
Self-Test Log has increased since the last check, or if the timestamp
|
598 | 598 | associated with the most recent failed test has increased. Note that |
599 | 599 | such errors will \fBonly\fP be logged if you run self-tests on the |
600 | 600 | disk (and it fails a test!). Self-Tests can be run automatically by |
601 | | \fBsmartd\fP: please see the \fB\'\-s\'\fP Directive below. |
602 | | Self-Tests can also be run manually by using the \fB\'\-t\ short\'\fP |
603 | | and \fB\'\-t\ long\'\fP options of \fBsmartctl\fP and the results of |
604 | | the testing can be observed using the \fBsmartctl \'\-l\ selftest\'\fP |
| 601 | \fBsmartd\fP: please see the \fB\(aq\-s\(aq\fP Directive below. |
| 602 | Self-Tests can also be run manually by using the \fB\(aq\-t\ short\(aq\fP |
| 603 | and \fB\(aq\-t\ long\(aq\fP options of \fBsmartctl\fP and the results of |
| 604 | the testing can be observed using the \fBsmartctl \(aq\-l\ selftest\(aq\fP |
605 | 605 | command-line option. |
606 | 606 | [Please see the \fBsmartctl \-l\fP and \fB\-t\fP command-line |
607 | 607 | options.] |
… |
… |
an extended self-test is run after all bad sectors have been reallocated.
|
615 | 615 | \- [ATA only] report if the Offline Data Collection status has changed |
616 | 616 | since the last check. The report will be logged as LOG_CRIT if the new |
617 | 617 | status indicates an error. With some drives the status often changes, |
618 | | therefore \'\-l offlinests\' is not enabled by '\-a\' Directive. |
| 618 | therefore \(aq\-l offlinests\(aq is not enabled by \(aq\-a\(aq Directive. |
619 | 619 | .\" %IF NOT OS Cygwin Windows |
620 | | .\"! Appending \',ns\' (no standby) to this directive is not implemented |
| 620 | .\"! Appending ',ns' (no standby) to this directive is not implemented |
621 | 621 | .\"! on OS_MAN_FILTER. |
622 | 622 | .\" %ENDIF NOT OS Cygwin Windows |
623 | 623 | .\" %IF OS Cygwin Windows |
624 | 624 | |
625 | | [Windows and Cygwin only] If \',ns\' (no standby) is appended to this |
| 625 | [Windows and Cygwin only] If \(aq,ns\(aq (no standby) is appended to this |
626 | 626 | directive, smartd disables system auto standby as long as an Offline |
627 | | Data Collection is in progress. See \'\-l selfteststs,ns\' below. |
| 627 | Data Collection is in progress. See \(aq\-l selfteststs,ns\(aq below. |
628 | 628 | .\" %ENDIF OS Cygwin Windows |
629 | 629 | |
630 | 630 | .I selfteststs[,ns] |
… |
… |
Data Collection is in progress. See \'\-l selfteststs,ns\' below.
|
632 | 632 | since the last check. The report will be logged as LOG_CRIT if the new |
633 | 633 | status indicates an error. |
634 | 634 | .\" %IF NOT OS Cygwin Windows |
635 | | .\"! Appending \',ns\' (no standby) to this directive is not implemented |
| 635 | .\"! Appending ',ns' (no standby) to this directive is not implemented |
636 | 636 | .\"! on OS_MAN_FILTER. |
637 | 637 | .\" %ENDIF NOT OS Cygwin Windows |
638 | 638 | .\" %IF OS Cygwin Windows |
639 | 639 | |
640 | | [Windows and Cygwin only] If \',ns\' (no standby) is appended to this |
| 640 | [Windows and Cygwin only] If \(aq,ns\(aq (no standby) is appended to this |
641 | 641 | directive, smartd disables system auto standby as long as a Self-Test |
642 | 642 | is in progress. This prevents that a Self-Test is aborted because the |
643 | 643 | OS sets the system to a standby/sleep mode when idle. Smartd check |
644 | | interval (\'\-i\' option) should be shorter than the configured idle |
| 644 | interval (\(aq\-i\(aq option) should be shorter than the configured idle |
645 | 645 | timeout. Auto standby is not disabled if the system is running on |
646 | 646 | battery. |
647 | 647 | .\" %ENDIF OS Cygwin Windows |
… |
… |
IDLE mode.
|
683 | 683 | Run Self-Tests or Offline Immediate Tests, at scheduled times. A |
684 | 684 | Self- or Offline Immediate Test will be run at the end of periodic |
685 | 685 | device polling, if all 12 characters of the string \fBT/MM/DD/d/HH\fP |
686 | | match the extended regular expression \fBREGEXP\fP. Here: |
| 686 | match the extended regular expression \fBREGEXP\fP. Here: |
687 | 687 | .RS 7 |
688 | 688 | .IP \fBT\fP 4 |
689 | 689 | is the type of the test. The values that \fBsmartd\fP will try to |
690 | | match (in turn) are: \'L\' for a \fBL\fPong Self-Test, \'S\' for a |
691 | | \fBS\fPhort Self-Test, \'C\' for a \fBC\fPonveyance Self-Test (ATA |
692 | | only), and \'O\' for an \fBO\fPffline Immediate Test (ATA only). As |
| 690 | match (in turn) are: \(aqL\(aq for a \fBL\fPong Self-Test, \(aqS\(aq for a |
| 691 | \fBS\fPhort Self-Test, \(aqC\(aq for a \fBC\fPonveyance Self-Test (ATA |
| 692 | only), and \(aqO\(aq for an \fBO\fPffline Immediate Test (ATA only). As |
693 | 693 | soon as a match is found, the test will be started and no additional |
694 | 694 | matches will be sought for that device and that polling cycle. |
695 | 695 | |
696 | | To run scheduled Selective Self-Tests, use \'n\' for \fBn\fPext span, |
697 | | \'r\' to \fBr\fPedo last span, or \'c\' to \fBc\fPontinue with next span |
| 696 | To run scheduled Selective Self-Tests, use \(aqn\(aq for \fBn\fPext span, |
| 697 | \(aqr\(aq to \fBr\fPedo last span, or \(aqc\(aq to \fBc\fPontinue with next span |
698 | 698 | or redo last span based on status of last test. |
699 | 699 | The LBA range is based on the first span from the last test. |
700 | 700 | See the \fBsmartctl \-t select,[next|redo|cont]\fP options for |
701 | 701 | further info. |
702 | 702 | |
703 | | Some disks (e.g. WD) do not preserve the selective self test log accross |
704 | | power cycles. If state persistence (\'\-s\' option) is enabled, the last |
| 703 | Some disks (e.g.\& WD) do not preserve the selective self test log across |
| 704 | power cycles. If state persistence (\(aq\-s\(aq option) is enabled, the last |
705 | 705 | test span is preserved by smartd and used if (and only if) the selective |
706 | 706 | self test log is empty. |
707 | 707 | .IP \fBMM\fP 4 |
… |
… |
is the month of the year, expressed with two decimal digits. The
|
709 | 709 | range is from 01 (January) to 12 (December) inclusive. Do \fBnot\fP |
710 | 710 | use a single decimal digit or the match will always fail! |
711 | 711 | .IP \fBDD\fP 4 |
712 | | is the day of the month, expressed with two decimal digits. The |
| 712 | is the day of the month, expressed with two decimal digits. The |
713 | 713 | range is from 01 to 31 inclusive. Do \fBnot\fP |
714 | 714 | use a single decimal digit or the match will always fail! |
715 | 715 | .IP \fBd\fP 4 |
… |
… |
is the day of the week, expressed with one decimal digit. The
|
717 | 717 | range is from 1 (Monday) to 7 (Sunday) inclusive. |
718 | 718 | .IP \fBHH\fP 4 |
719 | 719 | is the hour of the day, written with two decimal digits, and given in |
720 | | hours after midnight. The range is 00 (midnight to just before 1am) |
| 720 | hours after midnight. The range is 00 (midnight to just before 1 am) |
721 | 721 | to 23 (11pm to just before midnight) inclusive. Do \fBnot\fP use a |
722 | 722 | single decimal digit or the match will always fail! |
723 | 723 | .RE |
… |
… |
single decimal digit or the match will always fail!
|
726 | 726 | .TP |
727 | 727 | .B \& |
728 | 728 | Some examples follow. In reading these, keep in mind that in extended |
729 | | regular expressions a dot \fB\'.\'\fP matches any single character, and |
730 | | a parenthetical expression such as \fB\'(A|B|C)\'\fP denotes any one of the three possibilities \fBA\fP, |
731 | | \fBB\fP, or \fBC\fP. |
| 729 | regular expressions a dot \fB\(aq.\(aq\fP matches any single character, and |
| 730 | a parenthetical expression such as \fB\(aq(A|B|C)\(aq\fP denotes any one |
| 731 | of the three possibilities \fBA\fP, \fBB\fP, or \fBC\fP. |
732 | 732 | |
733 | | To schedule a short Self-Test between 2-3am every morning, use: |
| 733 | To schedule a short Self-Test between 2\(en3 am every morning, use: |
734 | 734 | .nf |
735 | 735 | \fB \-s S/../.././02\fP |
736 | 736 | .fi |
737 | | To schedule a long Self-Test between 4-5am every Sunday morning, use: |
| 737 | To schedule a long Self-Test between 4\(en5 am every Sunday morning, use: |
738 | 738 | .nf |
739 | 739 | \fB \-s L/../../7/04\fP |
740 | 740 | .fi |
741 | | To schedule a long Self-Test between 10-11pm on the first and |
| 741 | To schedule a long Self-Test between 10\(en11 pm on the first and |
742 | 742 | fifteenth day of each month, use: |
743 | 743 | .nf |
744 | 744 | \fB \-s L/../(01|15)/./22\fP |
745 | 745 | .fi |
746 | | To schedule an Offline Immediate test after every midnight, 6am, |
747 | | noon,and 6pm, plus a Short Self-Test daily at 1-2am and a Long |
748 | | Self-Test every Saturday at 3-4am, use: |
| 746 | To schedule an Offline Immediate test after every midnight, 6 am, |
| 747 | noon, and 6 pm, plus a Short Self-Test daily at 1\(en2 am and a Long |
| 748 | Self-Test every Saturday at 3\(en4 am, use: |
749 | 749 | .nf |
750 | 750 | \fB \-s (O/../.././(00|06|12|18)|S/../.././01|L/../../6/03)\fP |
751 | 751 | .fi |
752 | 752 | If Long Self-Tests of a large disks take longer than the system uptime, |
753 | 753 | a full disk test can be performed by several Selective Self-Tests. |
754 | | To setup a full test of a 1TB disk within 20 days (one 50GB span |
| 754 | To setup a full test of a 1 TB disk within 20 days (one 50 GB span |
755 | 755 | each day), run this command once: |
756 | 756 | .nf |
757 | | smartctl -t select,0-99999999 /dev/sda |
| 757 | smartctl \-t select,0-99999999 /dev/sda |
758 | 758 | .fi |
759 | | To run the next test spans on Monday-Friday between 12-13am, run smartd |
| 759 | To run the next test spans on Monday\(enFriday between 12\(en13 am, run smartd |
760 | 760 | with this directive: |
761 | 761 | .nf |
762 | 762 | \fB \-s n/../../[1-5]/12\fP |
… |
… |
Scheduled tests are run immediately following the regularly-scheduled
|
767 | 767 | device polling, if the current local date, time, and test type, match |
768 | 768 | \fBREGEXP\fP. By default the regularly-scheduled device polling |
769 | 769 | occurs every thirty minutes after starting \fBsmartd\fP. Take caution |
770 | | if you use the \'\-i\' option to make this polling interval more than |
| 770 | if you use the \(aq\-i\(aq option to make this polling interval more than |
771 | 771 | sixty minutes: the poll times may fail to coincide with any of the |
772 | 772 | testing times that you have specified with \fBREGEXP\fP. In this case |
773 | 773 | the test will be run following the next device polling. |
… |
… |
test was already started or run in the same hour.
|
782 | 782 | |
783 | 783 | To avoid performance problems during system boot, \fBsmartd\fP will |
784 | 784 | not attempt to run any scheduled tests following the very first |
785 | | device polling (unless \'\-q onecheck\' is specified). |
| 785 | device polling (unless \(aq\-q onecheck\(aq is specified). |
786 | 786 | |
787 | 787 | Each time a test is run, \fBsmartd\fP will log an entry to SYSLOG. |
788 | 788 | You can use these or the '-q showtests' command-line option to verify |
… |
… |
if multiple test types are all scheduled for the same hour, the
|
792 | 792 | longer test type has precedence. This is usually the desired behavior. |
793 | 793 | |
794 | 794 | If the scheduled tests are used in conjunction with state persistence |
795 | | (\'\-s\' option), smartd will also try to match the hours since last |
796 | | shutdown (or 90 days at most). If any test would have been started |
| 795 | (\(aq\-s\(aq option), smartd will also try to match the hours since last |
| 796 | shutdown (or 90 days at most). If any test would have been started |
797 | 797 | during downtime, the longest (see above) of these tests is run after |
798 | 798 | second device polling. |
799 | 799 | |
800 | | If the \'\-n\' directive is used and any test would have been started |
| 800 | If the \(aq\-n\(aq directive is used and any test would have been started |
801 | 801 | during disk standby time, the longest of these tests is run when the |
802 | 802 | disk is active again. |
803 | 803 | |
… |
… |
in \fBREGEXP\fP that appear to indicate that you have made this
|
809 | 809 | mistake. |
810 | 810 | .TP |
811 | 811 | .B \-m ADD |
812 | | Send a warning email to the email address \fBADD\fP if the \'\-H\', |
813 | | \'\-l\', \'\-f\', \'\-C\', or \'\-O\' Directives detect a failure or a |
814 | | new error, or if a SMART command to the disk fails. This Directive |
| 812 | Send a warning email to the email address \fBADD\fP if the \(aq\-H\(aq, |
| 813 | \(aq\-l\(aq, \(aq\-f\(aq, \(aq\-C\(aq, or \(aq\-O\(aq Directives detect a failure or a |
| 814 | new error, or if a SMART command to the disk fails. This Directive |
815 | 815 | only works in conjunction with these other Directives (or with the |
816 | | equivalent default \'\-a\' Directive). |
| 816 | equivalent default \(aq\-a\(aq Directive). |
817 | 817 | |
818 | 818 | To prevent your email in-box from getting filled up with warning |
819 | 819 | messages, by default only a single warning will be sent for each of |
820 | | the enabled alert types, \'\-H\', \'\-l\', \'\-f\', \'\-C\', or |
821 | | \'\-O\' even if more than one failure or error is detected or if the |
| 820 | the enabled alert types, \(aq\-H\(aq, \(aq\-l\(aq, \(aq\-f\(aq, \(aq\-C\(aq, or |
| 821 | \(aq\-O\(aq even if more than one failure or error is detected or if the |
822 | 822 | failure or error persists. [This behavior can be modified; see the |
823 | | \'\-M\' Directive below.] |
| 823 | \(aq\-M\(aq Directive below.] |
824 | 824 | |
825 | 825 | To send email to more than one user, please use the following "comma |
826 | 826 | separated" form for the address: \fBuser1@add1,user2@add2,...,userN@addN\fP |
827 | 827 | (with no spaces). |
828 | 828 | |
829 | | To test that email is being sent correctly, use the \'\-M test\' |
| 829 | To test that email is being sent correctly, use the \(aq\-M test\(aq |
830 | 830 | Directive described below to send one test email message on |
831 | 831 | \fBsmartd\fP |
832 | 832 | startup. |
… |
… |
executable must be in the path of the shell or environment from which
|
837 | 837 | \fBsmartd\fP |
838 | 838 | was started. If you wish to specify an explicit path to the mail |
839 | 839 | executable (for example /usr/local/bin/mail) or a custom script to |
840 | | run, please use the \'\-M exec\' Directive below. |
| 840 | run, please use the \(aq\-M exec\(aq Directive below. |
841 | 841 | |
842 | 842 | .\" %IF OS Windows |
843 | | On Windows, the \'\fBBlat\fP\' mailer |
| 843 | On Windows, the \(aq\fBBlat\fP\(aq mailer |
844 | 844 | (\fBhttp://blat.sourceforge.net/\fP) is used by default. |
845 | 845 | This mailer uses a different command line syntax, see |
846 | | \'\-M exec\' below. |
| 846 | \(aq\-M exec\(aq below. |
847 | 847 | |
848 | 848 | .\" %ENDIF OS Windows |
849 | 849 | Note also that there is a special argument |
850 | 850 | .B <nomailer> |
851 | | which can be given to the \'\-m\' Directive in conjunction with the \'\-M |
852 | | exec\' Directive. Please see below for an explanation of its effect. |
| 851 | which can be given to the \(aq\-m\(aq Directive in conjunction with the \(aq\-M |
| 852 | exec\(aq Directive. Please see below for an explanation of its effect. |
853 | 853 | |
854 | 854 | If the mailer or the shell running it produces any STDERR/STDOUT |
855 | 855 | output, then a snippet of that output will be copied to SYSLOG. The |
856 | | remainder of the output is discarded. If problems are encountered in |
| 856 | remainder of the output is discarded. If problems are encountered in |
857 | 857 | sending mail, this should help you to understand and fix them. If |
858 | 858 | you have mail problems, we recommend running \fBsmartd\fP in debug |
859 | | mode with the \'-d\' flag, using the \'-M test\' Directive described |
| 859 | mode with the \(aq\-d\(aq flag, using the \(aq\-M test\(aq Directive described |
860 | 860 | below. |
861 | 861 | .\" %IF ENABLE_SMARTDPLUGINDIR |
862 | 862 | .\" %IF NOT OS Windows |
863 | 863 | |
864 | | If a word of the comma separated list has the form \'@plugin\', a custom |
| 864 | If a word of the comma separated list has the form \(aq@plugin\(aq, a custom |
865 | 865 | script /usr/local/etc/smartd_warning.d/plugin is run and the word is |
866 | | removed from the list before sending mail. The string \'plugin\' may be any |
867 | | valid name except \'ALL\'. |
868 | | If \'@ALL\' is specified, all scripts in /usr/local/etc/smartd_warning.d/* |
| 866 | removed from the list before sending mail. The string \(aqplugin\(aq may be any |
| 867 | valid name except \(aqALL\(aq. |
| 868 | If \(aq@ALL\(aq is specified, all scripts in /usr/local/etc/smartd_warning.d/* |
869 | 869 | are run instead. |
870 | 870 | This is handled by the script /usr/local/etc/smartd_warning.sh |
871 | | (see also \'\-M exec\' below). |
| 871 | (see also \(aq\-M exec\(aq below). |
872 | 872 | .\" %ENDIF NOT OS Windows |
873 | 873 | .\" %ENDIF ENABLE_SMARTDPLUGINDIR |
874 | 874 | .\" %IF OS Windows |
… |
… |
This is handled by the script /usr/local/etc/smartd_warning.sh
|
876 | 876 | [Windows only] If one of the following words are used as the first address |
877 | 877 | in the comma separated list, warning messages are sent via WTSSendMessage(). |
878 | 878 | This displays message boxes on the desktops of the selected sessions. |
879 | | Address \'\fBconsole\fP\' specifies the console session only, |
880 | | \'\fBactive\fP\' specifies the console session and all active remote |
881 | | sessions, and \'\fBconnected\fP\' specifies the console session and |
| 879 | Address \(aq\fBconsole\fP\(aq specifies the console session only, |
| 880 | \(aq\fBactive\fP\(aq specifies the console session and all active remote |
| 881 | sessions, and \(aq\fBconnected\fP\(aq specifies the console session and |
882 | 882 | all connected (active or waiting for login) remote sessions. |
883 | 883 | This is handled by the script EXEDIR/smartd_warning.cmd which runs |
884 | | the tool EXEDIR/wtssendmsg.exe (see also \'\-M exec\' below). |
885 | | The addresses \'\fBmsgbox\fP\' and \'\fBsysmsgbox\fP\' are now |
886 | | deprecated and have the same effect as \'\fBconsole\fP\'. |
| 884 | the tool EXEDIR/wtssendmsg.exe (see also \(aq\-M exec\(aq below). |
| 885 | The addresses \(aq\fBmsgbox\fP\(aq and \(aq\fBsysmsgbox\fP\(aq are now |
| 886 | deprecated and have the same effect as \(aq\fBconsole\fP\(aq. |
887 | 887 | .\" %ENDIF OS Windows |
888 | 888 | .TP |
889 | 889 | .B \-M TYPE |
890 | 890 | These Directives modify the behavior of the |
891 | 891 | \fBsmartd\fP |
892 | | email warnings enabled with the \'\-m\' email Directive described above. |
893 | | These \'\-M\' Directives only work in conjunction with the \'\-m\' |
| 892 | email warnings enabled with the \(aq\-m\(aq email Directive described above. |
| 893 | These \(aq\-M\(aq Directives only work in conjunction with the \(aq\-m\(aq |
894 | 894 | Directive and can not be used without it. |
895 | 895 | |
896 | 896 | Multiple \-M Directives may be given. If more than one of the |
… |
… |
three):
|
902 | 902 | |
903 | 903 | .I once |
904 | 904 | \- send only one warning email for each type of disk problem detected. This |
905 | | is the default unless state persistence (\'\-s\' option) is enabled. |
| 905 | is the default unless state persistence (\(aq\-s\(aq option) is enabled. |
906 | 906 | |
907 | 907 | .I daily |
908 | 908 | \- send additional warning reminder emails, once per day, for each type |
909 | 909 | of disk problem detected. This is the default if state persistence |
910 | | (\'\-s\' option) is enabled. |
| 910 | (\(aq\-s\(aq option) is enabled. |
911 | 911 | |
912 | 912 | .I diminishing |
913 | 913 | \- send additional warning reminder emails, after a one-day interval, |
914 | 914 | then a two-day interval, then a four-day interval, and so on for each |
915 | | type of disk problem detected. Each interval is twice as long as the |
| 915 | type of disk problem detected. Each interval is twice as long as the |
916 | 916 | previous interval. |
917 | 917 | |
918 | 918 | If a disk problem is no longer detected, the internal email counter is |
… |
… |
immediately upon
|
927 | 927 | startup. This allows one to verify that email is delivered correctly. |
928 | 928 | Note that if this Directive is used, |
929 | 929 | \fBsmartd\fP |
930 | | will also send the normal email warnings that were enabled with the \'\-m\' Directive, |
| 930 | will also send the normal email warnings that were enabled with the \(aq\-m\(aq Directive, |
931 | 931 | in addition to the single test email! |
932 | 932 | |
933 | 933 | .I exec PATH |
… |
… |
Then it must be included in double quotes.
|
944 | 944 | By setting PATH to point to a customized script, you can make |
945 | 945 | \fBsmartd\fP perform useful tricks when a disk problem is detected |
946 | 946 | (beeping the console, shutting down the machine, broadcasting warnings |
947 | | to all logged-in users, etc.) But please be careful. \fBsmartd\fP |
| 947 | to all logged-in users, etc.\&) But please be careful. \fBsmartd\fP |
948 | 948 | will \fBblock\fP until the executable PATH returns, so if your |
949 | 949 | executable hangs, then \fBsmartd\fP will also hang. |
950 | 950 | .\" %IF NOT OS Windows |
… |
… |
Some sample scripts are included in
|
953 | 953 | .\" %ENDIF NOT OS Windows |
954 | 954 | |
955 | 955 | The return status of the executable is recorded by \fBsmartd\fP in |
956 | | SYSLOG. The executable is not expected to write to STDOUT or |
| 956 | SYSLOG. The executable is not expected to write to STDOUT or |
957 | 957 | STDERR. If it does, then this is interpreted as indicating that |
958 | 958 | something is going wrong with your executable, and a fragment of this |
959 | 959 | output is logged to SYSLOG to help you to understand the problem. |
… |
… |
should send mail or write to a file or device.
|
962 | 962 | |
963 | 963 | Before running the executable, \fBsmartd\fP sets a number of |
964 | 964 | environment variables. These environment variables may be used to |
965 | | control the executable\'s behavior. The environment variables |
| 965 | control the executable's behavior. The environment variables |
966 | 966 | exported by \fBsmartd\fP are: |
967 | 967 | .RS 7 |
968 | 968 | .IP \fBSMARTD_MAILER\fP 4 |
969 | | is set to the argument of \-M exec, if present or else to \'mail\' |
| 969 | is set to the argument of \-M exec, if present or else to \(aqmail\(aq |
970 | 970 | (examples: /usr/local/bin/mail, mail). |
971 | 971 | .IP \fBSMARTD_DEVICE\fP 4 |
972 | 972 | is set to the device path (example: /dev/sda). |
973 | 973 | .IP \fBSMARTD_DEVICETYPE\fP 4 |
974 | | is set to the device type specified by \'-d\' directive or |
975 | | \'auto\' if none. |
| 974 | is set to the device type specified by \(aq\-d\(aq directive or |
| 975 | \(aqauto\(aq if none. |
976 | 976 | .IP \fBSMARTD_DEVICESTRING\fP 4 |
977 | 977 | is set to the device description. For SMARTD_DEVICETYPE of ata or |
978 | 978 | scsi, this is the same as SMARTD_DEVICE. For 3ware RAID controllers, |
979 | | the form used is \'/dev/sdc [3ware_disk_01]\'. For HighPoint |
980 | | RocketRAID controller, the form is \'/dev/sdd [hpt_1/1/1]\' under Linux |
981 | | or \'/dev/hptrr [hpt_1/1/1]\' under FreeBSD. For Areca controllers, the |
982 | | form is \'/dev/sg2 [areca_disk_09]\' on Linux or \'/dev/arcmsr0 [areca_disk_09]\' on FreeBSD. In these cases the device string |
983 | | contains a space and is NOT quoted. So to use $SMARTD_DEVICESTRING in a |
| 979 | the form used is \(aq/dev/sdc [3ware_disk_01]\(aq. For HighPoint |
| 980 | RocketRAID controller, the form is \(aq/dev/sdd [hpt_1/1/1]\(aq under Linux |
| 981 | or \(aq/dev/hptrr [hpt_1/1/1]\(aq under FreeBSD. For Areca controllers, |
| 982 | the form is \(aq/dev/sg2 [areca_disk_09]\(aq on Linux or \(aq/dev/arcmsr0 |
| 983 | [areca_disk_09]\(aq on FreeBSD. |
| 984 | In these cases the device string contains a space and is NOT quoted. |
| 985 | So to use $SMARTD_DEVICESTRING in a |
984 | 986 | shell script you should probably enclose it in double quotes. |
985 | 987 | .IP \fBSMARTD_DEVICEINFO\fP 4 |
986 | 988 | is set to device identify information. It includes most of the info printed |
… |
… |
one or more disk sectors could not be read.
|
1019 | 1021 | .br |
1020 | 1022 | \fIFailedOpenDevice\fP: the open() command to the device failed. |
1021 | 1023 | .IP \fBSMARTD_ADDRESS\fP 4 |
1022 | | is determined by the address argument ADD of the \'\-m\' Directive. |
| 1024 | is determined by the address argument ADD of the \(aq\-m\(aq Directive. |
1023 | 1025 | If ADD is \fB<nomailer>\fP, then \fBSMARTD_ADDRESS\fP is not set. |
1024 | 1026 | Otherwise, it is set to the comma-separated-list of email addresses |
1025 | 1027 | given by the argument ADD, with the commas replaced by spaces |
… |
… |
SMARTD_ADDRESS.
|
1034 | 1036 | .\" %ENDIF OS Windows |
1035 | 1037 | .IP \fBSMARTD_MESSAGE\fP 4 |
1036 | 1038 | is set to the one sentence summary warning email message string from |
1037 | | \fBsmartd\fP. |
1038 | | This message string contains space characters and is NOT quoted. So to |
| 1039 | \fBsmartd\fP.m46 |
| 1040 | This message string contains space characters and is NOT quoted. So to |
1039 | 1041 | use $SMARTD_MESSAGE in a shell script you should probably enclose it in |
1040 | 1042 | double quotes. |
1041 | 1043 | .\" %IF NOT OS Windows |
1042 | 1044 | .IP \fBSMARTD_FULLMESSAGE\fP 4 |
1043 | 1045 | is set to the contents of the entire email warning message string from |
1044 | | \fBsmartd\fP. |
1045 | | This message string contains space and return characters and is NOT quoted. So to |
1046 | | use $SMARTD_FULLMESSAGE in a shell script you should probably enclose it in |
1047 | | double quotes. |
| 1046 | \fBsmartd\fP. |
| 1047 | This message string contains space and return characters and is NOT |
| 1048 | quoted. |
| 1049 | So to use $SMARTD_FULLMESSAGE in a shell script you should probably |
| 1050 | enclose it in double quotes. |
1048 | 1051 | .\" %ENDIF NOT OS Windows |
1049 | 1052 | .\" %IF OS Windows |
1050 | 1053 | .IP \fBSMARTD_FULLMSGFILE\fP 4 |
… |
… |
the mailer or command exits.
|
1055 | 1058 | .\" %ENDIF OS Windows |
1056 | 1059 | .IP \fBSMARTD_TFIRST\fP 4 |
1057 | 1060 | is a text string giving the time and date at which the first problem |
1058 | | of this type was reported. This text string contains space characters |
1059 | | and no newlines, and is NOT quoted. For example: |
| 1061 | of this type was reported. This text string contains space characters |
| 1062 | and no newlines, and is NOT quoted. For example: |
1060 | 1063 | .br |
1061 | 1064 | Sun Feb 9 14:58:19 2003 CST |
1062 | 1065 | .IP \fBSMARTD_TFIRSTEPOCH\fP 4 |
… |
… |
is an integer, which is the unix epoch (number of seconds since Jan 1,
|
1064 | 1067 | 1970) for \fBSMARTD_TFIRST\fP. |
1065 | 1068 | .IP \fBSMARTD_PREVCNT\fP 4 |
1066 | 1069 | is an integer specifying the number of previous messages sent. |
1067 | | It is set to \'0\' for the first message. |
| 1070 | It is set to \(aq0\(aq for the first message. |
1068 | 1071 | .IP \fBSMARTD_NEXTDAYS\fP 4 |
1069 | 1072 | is an integer specifying the number of days until the next message will be sent. |
1070 | | It it set to empty on \'\-M once\' and set to \'1\' on \'\-M daily\'. |
| 1073 | It it set to empty on \(aq\-M once\(aq and set to \(aq1\(aq on \(aq\-M daily\(aq. |
1071 | 1074 | .RE |
1072 | 1075 | .\" The following two lines are a workaround for a man2html bug. Please leave them. |
1073 | 1076 | .\" They define a non-existent option; useful because man2html can't correctly reset the margins. |
1074 | 1077 | .TP |
1075 | 1078 | .B \& |
1076 | | If the \'\-m ADD\' Directive is given with a normal address argument, |
| 1079 | If the \(aq\-m ADD\(aq Directive is given with a normal address argument, |
1077 | 1080 | then the executable pointed to by PATH will be run in a shell with |
1078 | 1081 | STDIN receiving the body of the email message, and with the same |
1079 | 1082 | command-line arguments: |
1080 | 1083 | .nf |
1081 | 1084 | -s "$SMARTD_SUBJECT" $SMARTD_ADDRESS |
1082 | 1085 | .fi |
1083 | | that would normally be provided to \'mail\'. Examples include: |
| 1086 | that would normally be provided to \(aqmail\(aq. Examples include: |
1084 | 1087 | .nf |
1085 | | .B -m user@home -M exec /usr/bin/mail |
1086 | | .B -m admin@work -M exec /usr/local/bin/mailto |
1087 | | .B -m root -M exec /Example_1/shell/script/below |
| 1088 | .B \-m user@home \-M exec /usr/bin/mail |
| 1089 | .B \-m admin@work \-M exec /usr/local/bin/mailto |
| 1090 | .B \-m root \-M exec /Example_1/shell/script/below |
1088 | 1091 | .fi |
1089 | 1092 | |
1090 | 1093 | .\" %IF OS Windows |
1091 | | [Windows only] On Windows, the syntax of the \'\fBBlat\fP\' mailer is |
| 1094 | [Windows only] On Windows, the syntax of the \(aq\fBBlat\fP\(aq mailer is |
1092 | 1095 | used: |
1093 | 1096 | .nf |
1094 | | - -q -subject "%SMARTD_SUBJECT%" -to %SMARTD_ADDRCSV% |
| 1097 | \- \-q \-subject "%SMARTD_SUBJECT%" \-to %SMARTD_ADDRCSV% |
1095 | 1098 | .fi |
1096 | 1099 | |
1097 | 1100 | .\" %ENDIF OS Windows |
1098 | | If the \'\-m ADD\' Directive is given with the special address argument |
| 1101 | If the \(aq\-m ADD\(aq Directive is given with the special address argument |
1099 | 1102 | .B <nomailer> |
1100 | 1103 | then the executable pointed to by PATH is run in a shell with |
1101 | 1104 | .B no |
… |
… |
STDIN and
|
1103 | 1106 | .B no |
1104 | 1107 | command-line arguments, for example: |
1105 | 1108 | .nf |
1106 | | .B -m <nomailer> -M exec /Example_2/shell/script/below |
| 1109 | .B \-m <nomailer> \-M exec /Example_2/shell/script/below |
1107 | 1110 | .fi |
1108 | 1111 | If the executable produces any STDERR/STDOUT output, then \fBsmartd\fP |
1109 | 1112 | assumes that something is going wrong, and a snippet of that output |
1110 | 1113 | will be copied to SYSLOG. The remainder of the output is then |
1111 | 1114 | discarded. |
1112 | 1115 | |
1113 | | Some EXAMPLES of scripts that can be used with the \'\-M exec\' |
| 1116 | Some EXAMPLES of scripts that can be used with the \(aq\-M exec\(aq |
1114 | 1117 | Directive are given below. |
1115 | 1118 | .\" %IF NOT OS Windows |
1116 | 1119 | Some sample scripts are also included in |
… |
… |
SMARTD_SUBJECT and SMARTD_FULLMESSAGE
|
1142 | 1145 | are set by the script before running the executable. |
1143 | 1146 | .TP |
1144 | 1147 | .B \-f |
1145 | | [ATA only] Check for \'failure\' of any Usage Attributes. If these |
| 1148 | [ATA only] Check for \(aqfailure\(aq of any Usage Attributes. If these |
1146 | 1149 | Attributes are less than or equal to the threshold, it does NOT indicate |
1147 | 1150 | imminent disk failure. It "indicates an advisory condition where the usage |
1148 | 1151 | or age of the device has exceeded its intended design life period." |
… |
… |
or age of the device has exceeded its intended design life period."
|
1150 | 1153 | .TP |
1151 | 1154 | .B \-p |
1152 | 1155 | [ATA only] Report anytime that a Prefail Attribute has changed |
1153 | | its value since the last check. [Please see the |
| 1156 | its value since the last check. [Please see the |
1154 | 1157 | .B smartctl \-A |
1155 | 1158 | command-line option.] |
1156 | 1159 | .TP |
1157 | 1160 | .B \-u |
1158 | 1161 | [ATA only] Report anytime that a Usage Attribute has changed its value |
1159 | | since the last check. [Please see the |
| 1162 | since the last check. [Please see the |
1160 | 1163 | .B smartctl \-A |
1161 | 1164 | command-line option.] |
1162 | 1165 | .TP |
1163 | 1166 | .B \-t |
1164 | | [ATA only] Equivalent to turning on the two previous flags \'\-p\' and \'\-u\'. |
| 1167 | [ATA only] Equivalent to turning on the two previous flags \(aq\-p\(aq and \(aq\-u\(aq. |
1165 | 1168 | Tracks changes in \fIall\fP device Attributes (both Prefailure and |
1166 | | Usage). [Please see the \fBsmartctl\fP \-A command-line option.] |
| 1169 | Usage). [Please see the \fBsmartctl\fP \-A command-line option.] |
1167 | 1170 | .TP |
1168 | 1171 | .B \-i ID |
1169 | 1172 | [ATA only] Ignore device Attribute number \fBID\fP when checking for failure |
1170 | 1173 | of Usage Attributes. \fBID\fP must be a decimal integer in the range |
1171 | | from 1 to 255. This Directive modifies the behavior of the \'\-f\' |
| 1174 | from 1 to 255. This Directive modifies the behavior of the \(aq\-f\(aq |
1172 | 1175 | Directive and has no effect without it. |
1173 | 1176 | |
1174 | | This is useful, for example, if you have a very old disk and don\'t |
| 1177 | This is useful, for example, if you have a very old disk and don't |
1175 | 1178 | want to keep getting messages about the hours-on-lifetime Attribute |
1176 | 1179 | (usually Attribute 9) failing. This Directive may appear multiple |
1177 | 1180 | times for a single device, if you want to ignore multiple Attributes. |
… |
… |
times for a single device, if you want to ignore multiple Attributes.
|
1179 | 1182 | .B \-I ID |
1180 | 1183 | [ATA only] Ignore device Attribute \fBID\fP when tracking changes in the |
1181 | 1184 | Attribute values. \fBID\fP must be a decimal integer in the range |
1182 | | from 1 to 255. This Directive modifies the behavior of the \'\-p\', |
1183 | | \'\-u\', and \'\-t\' tracking Directives and has no effect without one |
| 1185 | from 1 to 255. This Directive modifies the behavior of the \(aq\-p\(aq, |
| 1186 | \(aq\-u\(aq, and \(aq\-t\(aq tracking Directives and has no effect without one |
1184 | 1187 | of them. |
1185 | 1188 | |
1186 | 1189 | This is useful, for example, if one of the device Attributes is the disk |
1187 | | temperature (usually Attribute 194 or 231). It\'s annoying to get reports |
| 1190 | temperature (usually Attribute 194 or 231). It's annoying to get reports |
1188 | 1191 | each time the temperature changes. This Directive may appear multiple |
1189 | 1192 | times for a single device, if you want to ignore multiple Attributes. |
1190 | 1193 | .TP |
… |
… |
times for a single device, if you want to ignore multiple Attributes.
|
1192 | 1195 | [ATA only] When tracking, report the \fIRaw\fP value of Attribute \fBID\fP |
1193 | 1196 | along with its (normally reported) \fINormalized\fP value. \fBID\fP must |
1194 | 1197 | be a decimal integer in the range from 1 to 255. This Directive modifies |
1195 | | the behavior of the \'\-p\', \'\-u\', and \'\-t\' tracking Directives |
| 1198 | the behavior of the \(aq\-p\(aq, \(aq\-u\(aq, and \(aq\-t\(aq tracking Directives |
1196 | 1199 | and has no effect without one of them. This Directive may be given |
1197 | 1200 | multiple times. |
1198 | 1201 | |
1199 | 1202 | A common use of this Directive is to track the device Temperature |
1200 | 1203 | (often ID=194 or 231). |
1201 | 1204 | |
1202 | | If the optional flag \'!\' is appended, a change of the Normalized |
| 1205 | If the optional flag \(aq!\(aq is appended, a change of the Normalized |
1203 | 1206 | value is considered critical. The report will be logged as LOG_CRIT |
1204 | | and a warning email will be sent if \'\-m\' is specified. |
| 1207 | and a warning email will be sent if \(aq\-m\(aq is specified. |
1205 | 1208 | .TP |
1206 | 1209 | .B \-R ID[!] |
1207 | 1210 | [ATA only] When tracking, report whenever the \fIRaw\fP value of Attribute |
1208 | 1211 | \fBID\fP changes. (Normally \fBsmartd\fP only tracks/reports changes |
1209 | 1212 | of the \fINormalized\fP Attribute values.) \fBID\fP must be a decimal |
1210 | 1213 | integer in the range from 1 to 255. This Directive modifies the |
1211 | | behavior of the \'\-p\', \'\-u\', and \'\-t\' tracking Directives and |
| 1214 | behavior of the \(aq\-p\(aq, \(aq\-u\(aq, and \(aq\-t\(aq tracking Directives and |
1212 | 1215 | has no effect without one of them. This Directive may be given |
1213 | 1216 | multiple times. |
1214 | 1217 | |
1215 | | If this Directive is given, it automatically implies the \'\-r\' |
| 1218 | If this Directive is given, it automatically implies the \(aq\-r\(aq |
1216 | 1219 | Directive for the same Attribute, so that the Raw value of the |
1217 | 1220 | Attribute is reported. |
1218 | 1221 | |
… |
… |
A common use of this Directive is to track the device Temperature
|
1221 | 1224 | different types of system behavior affects the values of certain |
1222 | 1225 | Attributes. |
1223 | 1226 | |
1224 | | If the optional flag \'!\' is appended, a change of the Raw |
| 1227 | If the optional flag \(aq!\(aq is appended, a change of the Raw |
1225 | 1228 | value is considered critical. The report will be logged as |
1226 | | LOG_CRIT and a warning email will be sent if \'\-m\' is specified. |
1227 | | An example is \'-R 5!\' to warn when new sectors are reallocated. |
| 1229 | LOG_CRIT and a warning email will be sent if \(aq\-m\(aq is specified. |
| 1230 | An example is \(aq\-R 5!\(aq to warn when new sectors are reallocated. |
1228 | 1231 | .TP |
1229 | 1232 | .B \-C ID[+] |
1230 | 1233 | [ATA only] Report if the current number of pending sectors is |
… |
… |
value is the Current Pending Sector count. The allowed range of
|
1234 | 1237 | ID\ =\ 0. If the \fB\-C ID\fP option is not given, then it defaults to |
1235 | 1238 | \fB\-C 197\fP (since Attribute 197 is generally used to monitor |
1236 | 1239 | pending sectors). If the name of this Attribute is changed by a |
1237 | | \'\-v 197,FORMAT,NAME\' directive, the default is changed to |
| 1240 | \(aq\-v 197,FORMAT,NAME\(aq directive, the default is changed to |
1238 | 1241 | \fB\-C 0\fP. |
1239 | 1242 | |
1240 | | If \'+\' is specified, a report is only printed if the number of sectors |
1241 | | has increased between two check cycles. Some disks do not reset this |
| 1243 | If \(aq+\(aq is specified, a report is only printed if the number of sectors |
| 1244 | has increased between two check cycles. Some disks do not reset this |
1242 | 1245 | attribute when a bad sector is reallocated. |
1243 | | See also \'\-v 197,increasing\' below. |
| 1246 | See also \(aq\-v 197,increasing\(aq below. |
1244 | 1247 | |
1245 | 1248 | The warning email counter is reset if the number of pending sectors |
1246 | 1249 | dropped to 0. This typically happens when all pending sectors have |
1247 | 1250 | been reallocated or could be read again. |
1248 | 1251 | |
1249 | 1252 | A pending sector is a disk sector (containing 512 bytes of your data) |
1250 | | which the device would like to mark as ``bad" and reallocate. |
| 1253 | which the device would like to mark as "bad" and reallocate. |
1251 | 1254 | Typically this is because your computer tried to read that sector, and |
1252 | 1255 | the read failed because the data on it has been corrupted and has |
1253 | 1256 | inconsistent Error Checking and Correction (ECC) codes. This is |
… |
… |
value is the Offline Uncorrectable Sector count. The allowed range of
|
1266 | 1269 | ID\ =\ 0. If the \fB\-U ID\fP option is not given, then it defaults to |
1267 | 1270 | \fB\-U 198\fP (since Attribute 198 is generally used to monitor |
1268 | 1271 | offline uncorrectable sectors). If the name of this Attribute is changed |
1269 | | by a \'\-v 198,FORMAT,NAME\' (except \'\-v 198,FORMAT,Offline_Scan_UNC_SectCt\'), |
| 1272 | by a \(aq\-v 198,FORMAT,NAME\(aq (except \(aq\-v 198,FORMAT,Offline_Scan_UNC_SectCt\(aq), |
1270 | 1273 | directive, the default is changed to \fB\-U 0\fP. |
1271 | 1274 | |
1272 | | If \'+\' is specified, a report is only printed if the number of sectors |
1273 | | has increased since the last check cycle. Some disks do not reset this |
| 1275 | If \(aq+\(aq is specified, a report is only printed if the number of sectors |
| 1276 | has increased since the last check cycle. Some disks do not reset this |
1274 | 1277 | attribute when a bad sector is reallocated. |
1275 | | See also \'\-v 198,increasing\' below. |
| 1278 | See also \(aq\-v 198,increasing\(aq below. |
1276 | 1279 | |
1277 | 1280 | The warning email counter is reset if the number of offline uncorrectable |
1278 | 1281 | sectors dropped to 0. This typically happens when all offline uncorrectable |
… |
… |
sectors have been reallocated or could be read again.
|
1281 | 1284 | An offline uncorrectable sector is a disk sector which was not |
1282 | 1285 | readable during an off-line scan or a self-test. This is important |
1283 | 1286 | to know, because if you have data stored in this disk sector, and you |
1284 | | need to read it, the read will fail. Please see the previous \'\-C\' |
| 1287 | need to read it, the read will fail. Please see the previous \(aq\-C\(aq |
1285 | 1288 | option for more details. |
1286 | 1289 | .TP |
1287 | 1290 | .B \-W DIFF[,INFO[,CRIT]] |
… |
… |
degrees since last report, or if new min or max temperature is detected.
|
1290 | 1293 | Report or Warn if the temperature is greater or equal than one of |
1291 | 1294 | \fBINFO\fP or \fBCRIT\fP degrees Celsius. |
1292 | 1295 | If the limit \fBCRIT\fP is reached, a message with loglevel |
1293 | | \fB\'LOG_CRIT\'\fP will be logged to syslog and a warning email |
1294 | | will be send if \'\-m\' is specified. If only the limit \fBINFO\fP is |
1295 | | reached, a message with loglevel \fB\'LOG_INFO\'\fP will be logged. |
| 1296 | \fB\(aqLOG_CRIT\(aq\fP will be logged to syslog and a warning email |
| 1297 | will be send if \(aq\-m\(aq is specified. If only the limit \fBINFO\fP is |
| 1298 | reached, a message with loglevel \fB\(aqLOG_INFO\(aq\fP will be logged. |
1296 | 1299 | |
1297 | 1300 | The warning email counter is reset if the temperature dropped below |
1298 | 1301 | \fBINFO\fP or \fBCRIT\fP-5 if \fBINFO\fP is not specified. |
1299 | 1302 | |
1300 | 1303 | If this directive is used in conjunction with state persistence |
1301 | | (\'\-s\' option), the min and max temperature values are preserved |
1302 | | across boot cycles. The minimum temperature value is not updated |
| 1304 | (\(aq\-s\(aq option), the min and max temperature values are preserved |
| 1305 | across boot cycles. The minimum temperature value is not updated |
1303 | 1306 | during the first 30 minutes after startup. |
1304 | 1307 | |
1305 | 1308 | To disable any of the 3 reports, set the corresponding limit to 0. |
1306 | | Trailing zero arguments may be omitted. By default, all temperature |
1307 | | reports are disabled (\'-W 0\'). |
| 1309 | Trailing zero arguments may be omitted. By default, all temperature |
| 1310 | reports are disabled (\(aq\-W 0\(aq). |
1308 | 1311 | |
1309 | 1312 | To track temperature changes of at least 2 degrees, use: |
1310 | 1313 | .nf |
… |
… |
To combine all of the above reports, use:
|
1324 | 1327 | .fi |
1325 | 1328 | |
1326 | 1329 | For ATA devices, smartd interprets Attribute 194 or 190 as Temperature Celsius |
1327 | | by default. This can be changed to Attribute 9 or 220 by the drive |
1328 | | database or by the \'\-v 9,temp\' or \'\-v 220,temp\' directive. |
| 1330 | by default. This can be changed to Attribute 9 or 220 by the drive |
| 1331 | database or by the \(aq\-v 9,temp\(aq or \(aq\-v 220,temp\(aq directive. |
1329 | 1332 | .TP |
1330 | 1333 | .B \-F TYPE |
1331 | 1334 | [ATA only] Modifies the behavior of \fBsmartd\fP to compensate for some |
… |
… |
multiple times. The valid arguments are:
|
1334 | 1337 | |
1335 | 1338 | .I none |
1336 | 1339 | \- Assume that the device firmware obeys the ATA specifications. This |
1337 | | is the default, unless the device has presets for \'\-F\' in the |
| 1340 | is the default, unless the device has presets for \(aq\-F\(aq in the |
1338 | 1341 | drive database. Using this directive will override any preset values. |
1339 | 1342 | |
1340 | 1343 | .I nologdir |
… |
… |
byte-reversed order.
|
1360 | 1363 | .I samsung3 |
1361 | 1364 | \- Some Samsung disks (at least SP2514N with Firmware VF100-37) report |
1362 | 1365 | a self-test still in progress with 0% remaining when the test was already |
1363 | | completed. If this directive is specified, \fBsmartd\fP will not skip the |
1364 | | next scheduled self-test (see Directive \'\-s\' above) in this case. |
| 1366 | completed. If this directive is specified, \fBsmartd\fP will not skip the |
| 1367 | next scheduled self-test (see Directive \(aq\-s\(aq above) in this case. |
1365 | 1368 | |
1366 | 1369 | .I xerrorlba |
1367 | 1370 | \- This only affects \fBsmartctl\fP. |
… |
… |
next scheduled self-test (see Directive \'\-s\' above) in this case.
|
1372 | 1375 | [ATA only] Sets a vendor-specific raw value print FORMAT, an optional |
1373 | 1376 | BYTEORDER and an optional NAME for Attribute ID. |
1374 | 1377 | This directive may be used multiple times. |
1375 | | Please see \fBsmartctl -v\fP command-line option for further details. |
| 1378 | Please see \fBsmartctl \-v\fP command-line option for further details. |
1376 | 1379 | |
1377 | 1380 | The following arguments affect smartd warning output: |
1378 | 1381 | |
1379 | 1382 | .I 197,increasing |
1380 | 1383 | \- Raw Attribute number 197 (Current Pending Sector Count) is not |
1381 | | reset if uncorrectable sectors are reallocated. This sets \'-C 197+\' |
1382 | | if no other \'-C\' directive is specified. |
| 1384 | reset if uncorrectable sectors are reallocated. This sets \(aq\-C 197+\(aq |
| 1385 | if no other \(aq\-C\(aq directive is specified. |
1383 | 1386 | |
1384 | 1387 | .I 198,increasing |
1385 | 1388 | \- Raw Attribute number 198 (Offline Uncorrectable Sector Count) is not |
1386 | | reset if uncorrectable sectors are reallocated. This sets \'-U 198+\' |
1387 | | if no other \'-U\' directive is specified. |
| 1389 | reset if uncorrectable sectors are reallocated. This sets \(aq\-U 198+\(aq |
| 1390 | if no other \(aq\-U\(aq directive is specified. |
1388 | 1391 | .TP |
1389 | 1392 | .B \-P TYPE |
1390 | 1393 | [ATA only] Specifies whether \fBsmartd\fP should use any preset options |
… |
… |
The valid arguments to this Directive are:
|
1408 | 1411 | command-line option.] |
1409 | 1412 | .TP |
1410 | 1413 | .B \-a |
1411 | | Equivalent to turning on all of the following Directives: |
1412 | | .B \'\-H\' |
| 1414 | Equivalent to turning on all of the following Directives: |
| 1415 | .B \(aq\-H\(aq |
1413 | 1416 | to check the SMART health status, |
1414 | | .B \'\-f\' |
| 1417 | .B \(aq\-f\(aq |
1415 | 1418 | to report failures of Usage (rather than Prefail) Attributes, |
1416 | | .B \'\-t\' |
| 1419 | .B \(aq\-t\(aq |
1417 | 1420 | to track changes in both Prefailure and Usage Attributes, |
1418 | | .B \'\-l\ error\' |
| 1421 | .B \(aq\-l\ error\(aq |
1419 | 1422 | to report increases in the number of ATA errors, |
1420 | | .B \'\-l\ selftest\' |
| 1423 | .B \(aq\-l\ selftest\(aq |
1421 | 1424 | to report increases in the number of Self-Test Log errors, |
1422 | | .B \'\-l\ selfteststs\' |
| 1425 | .B \(aq\-l\ selfteststs\(aq |
1423 | 1426 | to report changes of Self-Test execution status, |
1424 | | .B \'\-C 197\' |
| 1427 | .B \(aq\-C 197\(aq |
1425 | 1428 | to report nonzero values of the current pending sector count, and |
1426 | | .B \'\-U 198\' |
| 1429 | .B \(aq\-U 198\(aq |
1427 | 1430 | to report nonzero values of the offline pending sector count. |
1428 | 1431 | |
1429 | 1432 | Note that \-a is the default for ATA devices. If none of these other |
… |
… |
configuration file Directives might be:
|
1448 | 1451 | .B \-H \-l\ selftest \-l\ error \-f. |
1449 | 1452 | .fi |
1450 | 1453 | If you want more frequent information, use: |
1451 | | .B -a. |
| 1454 | .B \-a. |
1452 | 1455 | |
1453 | 1456 | .TP |
1454 | 1457 | .B ADDITIONAL DETAILS ABOUT DEVICESCAN |
… |
… |
SMART properties of any devices that are found.
|
1465 | 1468 | which will be applied to all devices that are found in the scan. For |
1466 | 1469 | example |
1467 | 1470 | .nf |
1468 | | .B DEVICESCAN -m root@example.com |
| 1471 | .B DEVICESCAN \-m root@example.com |
1469 | 1472 | .fi |
1470 | 1473 | will scan for all devices, and then monitor them. It will send one |
1471 | 1474 | email warning per device for any problems that are found. |
1472 | 1475 | .nf |
1473 | | .B DEVICESCAN -d ata -m root@example.com |
| 1476 | .B DEVICESCAN \-d ata \-m root@example.com |
1474 | 1477 | .fi |
1475 | | will do the same, but restricts the scan to ATA devices only. |
| 1478 | will do the same, but restricts the scan to ATA devices only. |
1476 | 1479 | .nf |
1477 | | .B DEVICESCAN -H -d ata -m root@example.com |
| 1480 | .B DEVICESCAN \-H \-d ata \-m root@example.com |
1478 | 1481 | .fi |
1479 | 1482 | will do the same, but only monitors the SMART health status of the |
1480 | 1483 | devices, (rather than the default \-a, which monitors all SMART |
… |
… |
properties).
|
1483 | 1486 | Configuration entries for specific devices may precede the \fBDEVICESCAN\fP entry. |
1484 | 1487 | For example |
1485 | 1488 | .nf |
1486 | | .B DEFAULT -m root@example.com |
1487 | | .B /dev/sda -s S/../.././02 |
1488 | | .B /dev/sdc -d ignore |
1489 | | .B DEVICESCAN -s L/../.././02 |
| 1489 | .B DEFAULT \-m root@example.com |
| 1490 | .B /dev/sda \-s S/../.././02 |
| 1491 | .B /dev/sdc \-d ignore |
| 1492 | .B DEVICESCAN \-s L/../.././02 |
1490 | 1493 | .fi |
1491 | 1494 | will scan for all devices except /dev/sda and /dev/sdc, monitor them, and run a long |
1492 | | test between 2-3am every morning. Device /dev/sda will also be monitored, but |
| 1495 | test between 2\(en3 am every morning. Device /dev/sda will also be monitored, but |
1493 | 1496 | only a short test will be run. Device /dev/sdc will be ignored. |
1494 | 1497 | Warning emails will be sent for all monitored devices. |
1495 | 1498 | |
1496 | 1499 | .TP |
1497 | | .B EXAMPLES OF SHELL SCRIPTS FOR \'\-M exec\' |
1498 | | These are two examples of shell scripts that can be used with the \'\-M |
1499 | | exec PATH\' Directive described previously. The paths to these scripts |
1500 | | and similar executables is the PATH argument to the \'\-M exec PATH\' |
| 1500 | .B EXAMPLES OF SHELL SCRIPTS FOR \(aq\-M exec\(aq |
| 1501 | These are two examples of shell scripts that can be used with the \(aq\-M |
| 1502 | exec PATH\(aq Directive described previously. The paths to these scripts |
| 1503 | and similar executables is the PATH argument to the \(aq\-M exec PATH\(aq |
1501 | 1504 | Directive. |
1502 | 1505 | |
1503 | | Example 1: This script is for use with \'\-m ADDRESS -M exec PATH\'. It appends |
| 1506 | Example 1: This script is for use with \(aq\-m ADDRESS \-M exec PATH\(aq. It appends |
1504 | 1507 | the output of |
1505 | | .B smartctl -a |
| 1508 | .B smartctl \-a |
1506 | 1509 | to the output of the smartd email warning message and sends it to ADDRESS. |
1507 | 1510 | |
1508 | 1511 | .nf |
… |
… |
to the output of the smartd email warning message and sends it to ADDRESS.
|
1512 | 1515 | # Save the email message (STDIN) to a file: |
1513 | 1516 | cat > /root/msg |
1514 | 1517 | |
1515 | | # Append the output of smartctl -a to the message: |
1516 | | /usr/local/sbin/smartctl -a -d $SMART_DEVICETYPE $SMARTD_DEVICE >> /root/msg |
1517 | | |
| 1518 | # Append the output of smartctl \-a to the message: |
| 1519 | /usr/local/sbin/smartctl \-a \-d $SMART_DEVICETYPE $SMARTD_DEVICE >> /root/msg |
| 1520 | |
1518 | 1521 | # Now email the message to the user at address ADD: |
1519 | | /usr/bin/mail -s "$SMARTD_SUBJECT" $SMARTD_ADDRESS < /root/msg |
| 1522 | /usr/bin/mail \-s "$SMARTD_SUBJECT" $SMARTD_ADDRESS < /root/msg |
1520 | 1523 | \fP |
1521 | 1524 | .fi |
1522 | 1525 | |
1523 | | Example 2: This script is for use with \'\-m <nomailer> \-M exec |
1524 | | PATH\'. It warns all users about a disk problem, waits 30 seconds, and |
| 1526 | Example 2: This script is for use with \(aq\-m <nomailer> \-M exec |
| 1527 | PATH\(aq. It warns all users about a disk problem, waits 30 seconds, and |
1525 | 1528 | then powers down the machine. |
1526 | 1529 | |
1527 | 1530 | .nf |
… |
… |
EOF
|
1539 | 1542 | sleep 30 |
1540 | 1543 | |
1541 | 1544 | # Power down the machine |
1542 | | /sbin/shutdown -hf now |
| 1545 | /sbin/shutdown \-hf now |
1543 | 1546 | \fP |
1544 | 1547 | .fi |
1545 | 1548 | |