Get the disk health status with SMART monitor tools on Debian and Ubuntu Linux

Every modern disk has a internal monitoring function called SMART that keeps track on errors in that disk. There is a software package called smartmontools on Linux which can be used to query the SMART status of the disk to monitor if the disk might fail in near future.


apt-get install smartmontools


First we need to know the internal device name of the harddisks. For the first SATA disk, this is normally /dev/sda, the second is /dev/sdb etc. If you are unsure about the device names of your computer, then you can get them with:

fdisk -l

The command lists the partitions e.g. /dev/sda1. To get the device name, use the partition name without the number, e.g. the device of partition/dev/sda1 is /dev/sda.

To get a summary of the healt status of the disk, run:

smartctl --health /dev/sda

replace /dev/sda with the device name of the harddisk that you want to query.

The output will look similar to this:

~# smartctl --health /dev/sda
smartctl version 5.38 [x86_64-unknown-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is

SMART overall-health self-assessment test result: PASSED

To get the full detailed output of all parameters, use this command:

smartctl --all /dev/sda


4 thoughts on “Get the disk health status with SMART monitor tools on Debian and Ubuntu Linux”

  1. Thanks for the information it helps me understand what is going on. I have an HP Pavillion 10z-000 Touchsmart Notebook based off integrated AMD A4 with Radeon graphics chipset and using the InsydeH20 BIOS. This small notebook came with Windows 8.1 and was horrendously slow. So alleviate the bottleneck I just replaced the slow Seagate Thin Medalist SATA Drive with a PNY CS1100 240GB SSD drive and now started seeing the SMART Error 301 on every boot up when the BIOS screen appears when it goes through POST. Unfortunately, I can only run the Diagnostics via F2 to test the drive or memory, or hit ENTER to continue to boot. When I tried the BIOS built in drive diagnostics it doesn’t run, and reports a failure, when I hit ENTER to bypass, my Ubuntu 16.04 OS boots up fast and everything seems to be fine. I installed the smartmontools and ran the tests and they come back without any problems. The health of the drive is fine, so I can only assume that the HP InsydeH20 BIOS needs to somehow be reset or disabled, but when I go into the BIOS, there are no settings for the hard drive, so I think I will need to try to use the InsydeH20 python scripts to alter the BIOS to unlock all the advanced features, but I’m a little reluctant as I don’t want to brick the notebook. Any other suggestions on dealing with this annoyance are welcomed.

  2. This is in reply to my previous comment. I actually solved the SMART 301 Error. What I needed to do was go into the BIOS Setup – (F10) on this HP Pavillion 10z Touchsmart and select the option Load BIOS Defaults, then Save and Exit.


Leave a Comment