some questions about /etc/smartd.conf

I’m trying to configure alerts just in case any of my hard disk fails.
I’m working on /etc/smartd.conf which is the default file in opensuse, it has only two lines uncommented.


[FONT=monospace]# SUSE default: 
#   -d removable: Prevent error messages after disconnecting of 
#                 monitored removable discs. 
#   -s S/:        Run Short Self Test every day in the deep night. 
#                 (Takes several minutes.) 
#   -s L/:        Run Extended Self Test every first Sunday in the 
#                 month. (Start earlier, it could take tens of hours.) 
DEFAULT -d removable -s (S/../.././03|L/../(01|02|03|04|05|06|07)/7/01) 

# The word DEVICESCAN will cause any remaining lines in this 
# configuration file to be ignored: it tells smartd to scan for all 
# ATA and SCSI devices.  DEVICESCAN may be followed by any of the 
# Directives listed below, which will be applied to all devices that 
# are found.  Most users should comment out DEVICESCAN and explicitly 
# list the devices that they wish to monitor. 
DEVICESCAN

[/FONT]

I’m trying to understand the first line, I guess [FONT=monospace]S/…/…/./03 means run short test every day at 3 o’clock

the other is a bit harder: [FONT=monospace]L/…/(01|02|03|04|05|06|07)/7/01
L is run long test.
FONT=monospace means every day in the week? but /7/ is sunday, isn’t it?
and /01 is run at 1 in the night?

the second not uncomented line: DEVICESCAN says that it make it scan for every device and that “[FONT=monospace]will cause any remaining lines in this configuration file to be ignored”
it means “all lines BELOW this one”, right?

so if I want to check if there is any error and inform me it will simply be set as

[/FONT][/FONT][/FONT][/FONT]

[FONT=monospace][FONT=monospace][FONT=monospace][FONT=monospace]DEFAULT -d removable -s (S/../.././03|L/../(01|02|03|04|05|06|07)/7/01) 

/dev/sdc -H -C 0 -U 0 -m my@mail.com 

DEVICESCAN
[/FONT][/FONT][/FONT][/FONT]

[FONT=monospace][FONT=monospace][FONT=monospace]

[/FONT][/FONT][/FONT]it is right?

best regards

Never had reason to change anything there myself… Take a look at the “man” pages for smartd.conf, there’s a lot more info there.

man smartd.conf

As an aside, if I thought I had a drive failing I’d play safe side and replace it rather than monitor it :wink:

Agreed, but the reason of monitoring is to know that the disk is failing when it begins to fail and not when it is not working anymore

best regards

I now see from the initial sentence of this post that you were referring to disks in general, I had just read your other post ( https://forums.opensuse.org/showthread.php/546403-SMART-hdd-Airflow-temperature-error-should-I-change-the-drive ) and, wrongly, assumed that was the drive you wished to set up an alert for. My bad…