[smartmontools-support] scheduled self tests

Christian Franke Christian.Franke at t-online.de
Sun Jul 19 11:57:28 CEST 2020


serando wrote:
> I want to use smartmontools on a PC and not on a server, that runs all day.
> My PC does not run all day at the same time. It's very different. So
> when a test is scheduled to run daily at 2:00 P.M., it can be, that my
> PC is off at that time, but maybe I turn on my PC at 4:00 P.M on that
> day. Nevertheless I want that the test is performed on this day.
>
>
> When I use the command ...
> /dev/sda -a -d sat -o on -S on -s (S/../.././09) -m root -M exec
> /usr/share/smartmontools/smartd-runner
>
> ... then the short self-test will run daily at 9:00 A.M.
>
> Question:
> What happens, when the PC is off at 9:00 A.M.
> But when I turn it on at 12:00 A.M.?
>
> A) The test will not be performed on that day.
> B) The test will be performed as soon as the PC is turned on.

If state persistence is not enabled: A)

If state persistence is enabled: ~B), but the test will be performed 
after second device polling. With default check interval, this will be 
~30 minutes after boot.

The smartd-runner script suggests that you are using Debian or Ubuntu. 
Then state persistence is enabled by default 
(/var/lib/smartmontools/smartd.*). See '-s' command line option in 
'smartd -h' output or 'man smartd'.


> I have not found the answer of this question in "man". Did I miss it?

$ man smartd.conf
...
If the scheduled tests are used in conjunction with state persistence 
('-s' option), smartd will also try to match the hours since last 
shutdown (or 90 days at most). If any test would have been started 
during downtime, the longest ... of these tests is run after second 
device polling.
,,,

Regards,
Christian



More information about the Smartmontools-support mailing list