SMART Drive Self-test Script: 1.07 (27 Sept 2025)
Standalone or Companion to Multi-Report 3.1 and later.
For Standalone Operation (not using multi_report_config.txt file),
edit lines (around line 110) ‘######### USER SETTINGS #########’ as desired.
There are six significant groups of variables: Automatic Update, Short tests, Long tests,
SCRUB/RESILVER, Ignore Drives, and Reports.
Open this file up in a simple text editor to view the configuration notes, starts on line 110’ish.
NOTE: If you edit this file and it states the file cannot be run, ensure your text editor
did not end each line with ‘CRLF’. All lines should end with ‘LF’.
Automatic Updates will allow the drive_selftest.sh file to be updated should it be out of date.
This script can use the multi_report_config.txt file when combined with Multi-Report.
You must configure these settings in Multi-Report, otherwise the values at the beginning
of this script will be used.
Short and Long tests are configured as follows:
Test_Mode: 1 = Use Short(or Long) Drives_to_Test_Per_Day value
2 = All Drives Tested (Ignores other options except when active)
3 = No Drives Tested
Time_Delay_Between_Drives: Tests will have a XX second delay between the
drives starting testing.
Short_Drives_Test_Delay: Time period in seconds to wait for SHORT tests to complete.
Default is 130 seconds for use with Multi-Report, if not then set to 1 second.
BELOW OPTIONS ARE USED ONLY WITH Test Mode 1
SMART_Testing_Order: Select “DriveID” or “Serial” sorting order.
Drives_to_Test_Per_Day: How many drives to run each day minimum.
The script will auto-correct if you choose too small of a value.
Drives_Test_Period: Options are “Week” (Mon-Sun) or “Month” (days 1 - 28)
Drives_Tested_Days_of_the_Week: Days of the week allowed to run:
1=Mon, 2=Tue, 3=Wed, 4=Thu, 5=Fri, 6=Sat, 7=Sun Default = “1,2,3,4,5,6,7”
Press Any Key to Continue
Missed Drive Catchup Feature
This feature was added to enable catching up on any S.M.A.R.T. Long tests for
drives that were missed because the script was not being run every day.
The default setting is to make up one extra drive per day.
You may change this setting to 0 (zero) to disable this feature,
or increase the value as desired.
NORMAL OPERATION DOES NOT REQUIRE ANY COMMAND LINE SWITCHES
Command Line Switches:
NOTE! The demo mode uses the ‘Drives_Tested_Days_of_the_Week’ value to
calculate how many drives are to be run on which days of the week.
If the demo results are not the desired effect, adjust the values.
'-update' --- Will download the current published version of this script.
'-timer' --- Generates a file which tracks how many seconds are utilized
for each routine within the script. Used for development.
'-demo' '[short|long]' '[1|2|3]' '[week|month]' '[driveid|serial]'
Lists full drive testing schedule.
Use short or long options to focus on one list.
Override Settings will not use the script set values.
Test Mode using '1','2', or '3'.
Testing Period 'week' or 'month'.
'-clearlog' --- Delete all the drive_selftest log files.
'-debug' --- Runs the script in Debug Mode
Example: drive_selftest -demo short 1 week serial
Means: Simulate Short SMART Test, Test Mode 1 to spread across a Week
and using the days of the week set in the script setup.
Example: drive_selftest -demo short
Means: Simulate a Short SMART Test using the current configured settings
This will provide a listing of how your drives would be tested for
a short test in Test Mode 1, providing you the dates they would be tested.
Here is the output. These all seem like general testing options, I don’t see any specific test dates for my drives.