SOLVED How to determine if a S.M.A.R.T test is still running?

Joined
Mar 5, 2022
Messages
224
To start the test I am running:
sudo smartctl -t long /dev/da3

To get the status of the disk I am running:
sudo smartctl -l selftest /dev/da3
smartctl 7.2 2021-09-14 r5236 [FreeBSD 13.1-RELEASE-p9 amd64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 7286 -
# 2 Extended offline Completed without error 00% 7283 -
# 3 Short offline Completed without error 00% 7256 -
# 4 Short offline Completed without error 00% 7232 -
# 5 Short offline Completed without error 00% 7208 -
# 6 Short offline Completed without error 00% 7183 -
# 7 Short offline Completed without error 00% 7159 -
# 8 Short offline Completed without error 00% 7135 -
# 9 Extended offline Completed without error 00% 7115 -
#10 Short offline Completed without error 00% 7086 -
#11 Short offline Completed without error 00% 7062 -
#12 Short offline Completed without error 00% 7038 -
#13 Short offline Completed without error 00% 7014 -
#14 Short offline Completed without error 00% 6990 -
#15 Short offline Completed without error 00% 6966 -
#16 Extended offline Completed without error 00% 6950 -
#17 Short offline Completed without error 00% 6918 -
#18 Short offline Completed without error 00% 6894 -
#19 Short offline Completed without error 00% 6870 -
#20 Short offline Completed without error 00% 6846 -
#21 Short offline Completed without error 00% 6822 -
But this does not show that any test is still running.

Turns out that sudo smartctl -c is the answer:
Code:
smartctl 7.2 2021-09-14 r5236 [FreeBSD 13.1-RELEASE-p9 amd64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org


=== START OF READ SMART DATA SECTION ===
General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
                                        was never started.
                                        Auto Offline Data Collection: Disabled.
Self-test execution status:      ( 249) Self-test routine in progress...
                                        90% of test remaining.
Total time to complete Offline
data collection:                (21360) seconds.
Offline data collection
capabilities:                    (0x11) SMART execute Offline immediate.
                                        No Auto Offline data collection support.
                                        Suspend Offline collection upon new
                                        command.
                                        No Offline surface scan supported.
                                        Self-test supported.
                                        No Conveyance Self-test supported.
                                        No Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                        power-saving mode.

Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 230) minutes.
SCT capabilities: (0x303d) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
 
Last edited:

Alecmascot

Guru
Joined
Mar 18, 2014
Messages
1,177
if you run smartctl -a "drive" you will find one of the early lines in the report shows the percentage completed.
 
Top