Are you a Linux user looking for an easy way to check the health of your SSD? The smartctl tool is here to help! Part of the smartmontools package, smartctl allows you to check the health of your SSD from the command line. However, before you can use it, you’ll need to make sure the smartmontools package is installed on your system. In this article, we’ll walk you through the process of installing and using smartctl to check your SSD health in Linux.
For Ubuntu, Mint or Debian based distributions:
apt-get install smartmontools
Fedora, Centos or Red Hat based distributions:
yum install smartmontools
But for most distros, we can install it using the application installer or the package manager/installer.
Once installed, run the following command in the terminal (in our case ‘sda’ is the volume we are checking, but you might need to replace it depending on the id of yours, for eample: sdb, sdc, etc.):
sudo smartctl -a /dev/sda | grep SSD_Life_Left
You should see something like this:
231 SSD_Life_Left 0x0000 095 095 000 Old_age Offline - 95
In our case, 95 means that our SSD drive is in a 95% condition.
A higher value indicates a better condition.
If we need more information about our SSD, run the following command:
sudo smartctl -data -A /dev/sda
The we get the following result:
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.10.93-1-MANJARO] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x0032 100 100 000 Old_age Always - 0
9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 5089
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 416
148 Unknown_Attribute 0x0000 100 100 000 Old_age Offline - 0
149 Unknown_Attribute 0x0000 100 100 000 Old_age Offline - 0
167 Write_Protect_Mode 0x0000 100 100 000 Old_age Offline - 0
168 SATA_Phy_Error_Count 0x0012 100 100 000 Old_age Always - 0
169 Bad_Block_Rate 0x0000 100 100 000 Old_age Offline - 4
170 Bad_Blk_Ct_Erl/Lat 0x0000 100 100 010 Old_age Offline - 0/7
172 Erase_Fail_Count 0x0032 100 100 000 Old_age Always - 0
173 MaxAvgErase_Ct 0x0000 100 100 000 Old_age Offline - 92 (Average 62)
181 Program_Fail_Count 0x0032 100 100 000 Old_age Always - 0
182 Erase_Fail_Count 0x0000 100 100 000 Old_age Offline - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
192 Unsafe_Shutdown_Count 0x0012 100 100 000 Old_age Always - 38
194 Temperature_Celsius 0x0022 035 042 000 Old_age Always - 35 (Min/Max 18/42)
196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 0
199 SATA_CRC_Error_Count 0x0032 100 100 000 Old_age Always - 0
218 CRC_Error_Count 0x0032 100 100 000 Old_age Always - 0
231 SSD_Life_Left 0x0000 095 095 000 Old_age Offline - 95
233 Flash_Writes_GiB 0x0032 100 100 000 Old_age Always - 11970
241 Lifetime_Writes_GiB 0x0032 100 100 000 Old_age Always - 5882
242 Lifetime_Reads_GiB 0x0032 100 100 000 Old_age Always - 6501
244 Average_Erase_Count 0x0000 100 100 000 Old_age Offline - 62
245 Max_Erase_Count 0x0000 100 100 000 Old_age Offline - 92
246 Total_Erase_Count 0x0000 100 100 000 Old_age Offline - 900240
That’s it!
VIDEO:
Why Linux Mint Could Be the Best Linux Distro
In the bustling world of Linux distributions, Linux Mint has emerged as a shining star, captivating …
Drauger OS Linux – Powerful distro not only for GAMERS
Drauger OS Linux is a powerful and feature-rich operating system that caters to the needs of both ca…
10 Reasons Why Linux is the Best Choice for Everyday Desktop Use
Introduction: When it comes to choosing an operating system for everyday desktop use, Linux stands o…