Jump to content

health state of a harddrive : test it with S.M.A.R.T

Recommended Posts

hello dear all - good day dear php-freaks and experts, 


i need to run some tests on a linux machine. I need to test the hdd - with SMART.. 

i have gathered some infos in the net: 

For the desktop, we can use "Disk Utility" for this. For the command line when the smartmontools package is allready installed we can play around with smartctl. Eg:


sudo smartctl --all /dev/sda

quick test of smart on a linux machine: 


sudo smartctl -H /dev/sda #Status on the first SATA-hdd  
smartctl 5.XY 2014-06-09 r444365 [x86_64-linux-4.2.0-37-generic] (local build)
Copyright (C) 2003-11 by Bruce Allen, http://smartmontools.sourceforge.net

SMART overall-health self-assessment test result: PASSED

The result PASSED means - no error was found: 

extended test: 


sudo smartctl -t long /dev/sda #Status of the first SATA-hdd 

depends on size , speed and possible found errors

you can see the actual status of the test by running this 


sudo smartctl -c /dev/sda | grep -A 1 "execution status"


and with that 


sudo smartctl -a /dev/sda #Status of the first hdd 

other options: 

we can use gsmartcontrol, a GUI for smartctl.

by the way: There is also a utility called badblocks, and another called shred. 
Both of these utilities can perform read/write operations on our write drive 
that can be used to make sure that a drive is safe for use. 

i will apply the above mentioned commandlline-approach and will report all the findings.

i come back here and will share the insights 

Edited by dil_bert
Link to post
Share on other sites

hello dear all - well the question is  - How to check the health of a HDD

We all know that HDD sometimes may have a limited (probably predetermined) life span. So the question for me is how do I check in (Manjaro) Linux what the current health status of my HD is? And maybe an estimation how long it will take? Well  a gGraphical tool is preferred, but command line tool would also be fine. i heard that i can go the GNOME way like 

Install Gnome Disk Utility and then i could do the check SMART Data and do some tests : eg  the tests for wear-leveling-count or similar. 
Some of the test may include the following: 

The higher that number (%, from 1 to 100), the more "used up" of our HDD is, which means we are more likely to have problems. 
But if we have a recent HDD, we need not worry about it.

Installed via

sudo apt-get install gnome-disk-utility
start it via

either menu->Settings->Disk utility

or via command line

sudo gnome-disks

But - the question is - how to run the SMART-Teswts on KDE - generally spoken; How to check the health of a HDD

For Ubuntu, Mint, ARCH [like Manjaro], OpenSuse or Debian based distributions

heard about doing it like so: 

# apt-get install smartmontools
The Media_Wearout_Indicator is what we may have a closer look for. 
Some extra data: For 100 means the HDD has got an approximatley 100% lifespan, And besides that the lower number means less life left.

# smartctl -a /dev/sda | grep Media_Wearout_Indicator
To show your HDD information

# smartctl -a /dev/sda


Well - i will try it out on my Manjaro-Linux-System - with KDE .... 


Will come back and report all the findings. 


Untill soon 

Link to post
Share on other sites

good day dear freaks



well my friends recommended me to run a short and a long test weekly or on all my hdd-drives. 

To run a long test, the command is this here:


sudo smartctl -t long -a /dev/sdX

One of the first things we should see is the results of the SMART overall-health self-assessment test. 
In short - the test should say (and give back)  PASSED. 

Danger: If it does not, we know, right away, there's obviousliy something wrong with the  drive.

well we can have a short and a long test: 

i will show how we do these tests: 

The short test will examine the following:

- all the included hw (hardware) things in the drive will be tested; 
- the electrical properties of the drive: well here we talk about the controller tests its own electronics, which in generall all that is very different for each manufacturer;
- the mechanical properties of the drive: well here we talk about the servos and positioning mechanisms are tested ( in generall all that is very specific to each manufacturer);
- the read/verify-processes and procedures:  well  - alot of amount will certainly go into these parts of the test: we sure can say that certain area of the disk will be;
read to verify very very certain data and bits and bytes (especially we can say that the size and position of the region read is in general very  unique to each manufacturer);

lets have a quick look at the long test too; 

we can say that the long test runs everything included with the short test, while adding:
- here we have a global test and in general no time restriction and in the Read/Verify segment.
- here we have a great test regarding the whole disk - the whole disc is is checked (as opposed to just a section in the quick-test).
- in opposite to the quick and short-time-test which takes approximately two minutes to complete, the long (andoverall) test will require between 20-60 minutes ( which of course is depending upon the
specs of the hardware). 

here the command to have a view on the the results of the test, issue the command 

sudo smartctl -a /dev/sdX 


(and in this command the term sdX is the name of the drive - that we want to test).

The good thing: this command will do a print out of  the results of the test, 


i am glad that i run the test on a regular base!


just wanted to share this with you. - it has helped me alot.




Link to post
Share on other sites
This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.