How to trigger Offline data collection with Smartmontools?
I just purchased a new SSD and I'm trying to figure out how to monitor the expected lifetime of it. When I run
sudo smartctl -a /dev/sda
it reports
...
General SMART Values:
Offline data collection status: (0x80) **Offline data collection activity
was never started**.
...
Furthermore I note that some of the statistics are indicated to be updated "Always" or "Offline":
$ sudo smartctl -data -A /dev/sda
...
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
...
198 Offline_Uncorrectable 0x0030 100 100 001 Old_age **Offline** - 0
199 UDMA_CRC_Error_Count 0x0032 100 100 001 Old_age **Always** - 0
202 **Perc_Rated_Life_Used** 0x0018 100 100 001 Old_age **Offline** - 0
206 Write_Error_Rate 0x000e 100 100 001 Old_age **Always** - 0
Does this mean that the "Offline" stats are not up-to-date?
Will the "Offline" stats update themselves with time, or need I trigger them to update somehow?
I am particularly interested in the value indicating the lifetime of the SSD, "Perc_Rated_Life_Used", which is labeled as "Offline".
Using the --offlineauto=on
flag (credit to Michael Krell's suggestion below) as so:
sudo smartctl --offlineauto=on -a /dev/sda
produces a new output section:
=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Automatic Offline Testing Enabled **every four hours**.
However, the smart data section still reports:
Offline data collection status: (0x80) Offline data collection activity
**was never started**.
This is on a newly updated Ubuntu 13.1016.04 system.
referring to the smartmontools site:
Column Updated
Some SMART attributes values, that are updated only during off-line data collection activities are labeled "Offline" in column "UPDATED".
How to enable "Offline data collection":
smartctl --offlineauto=on
According to the smartmontools site:
Note that a one-time offline test can also be carried out immediately upon receipt of a user command. See the
-t offline
option, which causes a one-time offline test to be carried out immediately.
So, executing:
sudo smartctl -t offline /dev/sda
updates the smart data section to:
Offline data collection status: (0x82) Offline data collection activity
was completed without error.
Problem solved.