136

How can I check the SMART status of a drive under 14.04 and beyond? I've seen Checking HD SMART status on a fresh install but it doesn't seem to apply under 14.04 and later.

3 Answers 3

114

Disks Utility

Launch the Disks Utility (If you don't have it already, you can install Disks via the Software Center or open a terminal and issue the command sudo apt-get install gnome-disk-utility.

smart1

Select the drive of interest then click on the menu button at the upper right corner and choose SMART Data & self tests

enter image description here

Note that sometime between 18.10 and 20.04 the menu option has moved from the "hamburger menu" to the 3 vertical dots menu as shown below.

changes

Types of self-tests

screenshot

  • Short: Checks the electrical and mechanical performance as well as the read performance of the disk. Electrical tests might include a test of buffer RAM, a read/write circuitry test, or a test of the read/write head elements. Mechanical test includes seeking and servo on data tracks. Scans small parts of the drive's surface (area is vendor-specific and there is a time limit on the test). Checks the list of pending sectors that may have read errors, and it usually takes under two minutes.
  • Long/extended: A longer and more thorough version of the short self-test, scanning the entire disk surface with no time limit. This test usually takes several hours, depending on the read/write speed of the drive and its size.
  • Conveyance: Intended as a quick test to identify damage incurred during transporting of the device from the drive manufacturer to the computer manufacturer. Only available on ATA drives, and it usually takes several minutes.

How to interpret SMART-Attributes

The most important attribute in terms of failure rates is likely the 196 - Reallocated Sector Count, but considering Google research paper: _"...failure prediction models based on SMART parameters alone are likely to be severely limited in their prediction accuracy, given that a large fraction of our failed drives have shown no SMART error signals whatsoever." However, the majority of the drives (over 60%) in the study that failed did exhibit a smart failure, so as imperfect as it may be, it's still valid indicator.

Note that while the vast majority of recent drives support SMART not all drives do and implementations can vary. For more details on SMART see https://en.wikipedia.org/wiki/S.M.A.R.T.

4
  • 2
    I am using gnome-disk-utility 3.18.3.1 UDisks 2.1.7 (built against 2.1.6) and the SMART option doesn't appear anymore. (?!)
    – alfC
    Mar 12, 2016 at 15:17
  • 1
    @ElderGeek, I don't know. Maybe I was looking in the wrong place. I have gnome-disk-utility 3.28.1 UDisks 2.7.6 (built against 2.7.6) now and I see the option.
    – alfC
    May 14, 2018 at 19:33
  • @MatthiasWeiler you wrote "In wily (15.10) it is not a gear anymore but the usual "menu" button" <-- are you sure. Looks like the gear is still a gear, definitely still there, and the menu button is still a menu button still there And The difference is that now you click the menu button and before you would click the gear. I have no idea what you mean by "it". The option has moved from the gear button to the menu button. But there's nothing that was a gear and now is not a gear. No button has changed from one button to another button. Both buttons are still there.
    – barlop
    Aug 6, 2019 at 21:41
  • @barlop I edited my answer and apologize for any confusion you may have experienced. Hopefully it's clearer now.
    – Elder Geek
    Aug 7, 2019 at 22:35
103

The commandline version of the libatasmart library used by Gnome Disks is called skdump part of the libatasmart-bin package which is not installed by default. Install by using:

sudo apt install libatasmart-bin

Next run the following command to see the SMART information by running the following command in the terminal (replacing /dev/sda by the path to your drive):

sudo skdump /dev/sda

As an alternative the smartctl from the smartmontools package could be used. Install by using:

sudo apt install smartmontools

You will then be able to get information on SMART by running the following command in the terminal (replacing /dev/sda by the path to your drive):

sudo smartctl --all /dev/sda

Note that smartctl tends to be overly verbose. Use the -q errorsonly argument to display only errors:

sudo smartctl --quietmode=errorsonly --all /dev/sda
5
  • 11
    If you don't want to install an MTA (Postfix) when installing smartmontools, use the command sudo apt-get install smartmontools --no-install-recommends - Postfix is the only package that won't be installed.
    – Paul
    Sep 24, 2014 at 21:17
  • 2
    Also note that you may want to run sudo smartctl -a /dev/sda > sda-smart.txt since it can be a minor PITA to read the data from terminal.
    – Paul
    Sep 24, 2014 at 21:20
  • 3
    A good walkthrough and tips can be found on the Ubuntu Wiki: help.ubuntu.com/community/Smartmontools Sep 10, 2016 at 20:52
  • Can this also do a surface scan? I have a hard drive that passes SMART but fails a surface scan. I want to perform a surface scan on my laptop too.
    – Chloe
    Nov 2, 2017 at 0:40
  • 2
    @Chloe: please ask a separate question for the surface scan.
    – Gogowitsch
    Mar 24, 2020 at 8:31
27

Ubuntu 16.04

This answer is migrated from a duplicate question closed here (What happend to SMART data (disk selftest option)).

The question above has been changed to require Ubuntu versions after 14.04 but the answers haven't changed and don't apply to Ubuntu 16.04. As such it caused confusion as described in the closed question.

Select Dash the first option on the Launcher and type disks. Select the icon that appears. If the disks program isn't available you need to install it first with:

sudo apt-get install gnome-disk-utility

The disks main screen looks like this:

disks main

Notice the "hamburger" menu in the top right corner. Select it to get a drop down menu where you can select the SMART screen shown below:

disks SMART

If you require further explanation please comment below.


SMART option greyed out

In comments it was mentioned the SMART option was greyed out. This can happen with NVMe SSD's. In this case referring to this answer:

You need to first install NVMe SSD specific SMART tools:

sudo apt install nvme-cli

Then run the program to report health of drive:

$ sudo nvme smart-log /dev/nvme0
Smart Log for NVME device:nvme0 namespace-id:ffffffff
critical_warning                    : 0
temperature                         : 40 C
available_spare                     : 100%
available_spare_threshold           : 10%
percentage_used                     : 0%
data_units_read                     : 28,167,888
data_units_written                  : 19,397,424
host_read_commands                  : 561,183,142
host_write_commands                 : 171,788,833
controller_busy_time                : 1,354
power_cycles                        : 2,385
power_on_hours                      : 1,363
unsafe_shutdowns                    : 133
media_errors                        : 0
num_err_log_entries                 : 608
Warning Temperature Time            : 0
Critical Composite Temperature Time : 0
Temperature Sensor 1                : 40 C
Temperature Sensor 2                : 51 C

The most important data point is:

percentage_used                     : 0%

When it hits 100% it is time worry about replacing your drive. That said this drive is two years old and still at 0%

4
  • 1
    Everything in the other answers still holds true (more or less) to Ubuntu 16.04.
    – Kaz Wolfe
    Jan 21, 2017 at 6:41
  • 2
    For me in 17.04 the Smart test option is grayed out?
    – user240891
    Apr 27, 2017 at 19:52
  • 2
    I have several USB HDD drives where the SMART test option is indeed grayed out. It depends on the model.
    – user258532
    Nov 16, 2017 at 22:56
  • 1
    The SMART test was greyed out for me in Ubuntu 20.04 and this solution still worked.
    – Matthew
    Jan 13, 2022 at 17:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .