The Ultimate smartctl Hard Drive Monitoring Guide on Linux

In this guide, you will learn The Ultimate smartctl Hard Drive Monitoring Guide on Linux. Nowadays there are many tools that you can use to monitor and check your hard drive health. One of these tools is called smartctl. It is a command-line utility that is included in the Smartmontools package. It interacts with the Self-Monitoring, Analysis, and Reporting Technology (S.M.A.R.T.) system present in modern HDDs and SSDs. You can easily install the Smartmontools on Linux distros and start to use the smartctl command to check your hard device’s health.

Boost your Linux System with smartctl Hard Drive Monitoring

To complete this guide, you must log in to your Linux server as a non-root user with udo privileges. You can check the Linux initial guides on the Orcacore website.

Now proceed to the following steps to start your smartctl hard drive monitoring.

Install smartctl Utility on Linux

As we said, smartctl is a part of a package called Smartmontools. On most Linux distros, you can use the default package manager to install this package.

On Debian-based distros like Ubuntu and Debian, you can use:

sudo apt install smartmontools

For RHEL-based distros like AlmaLinux, Rocky Linux, and Fedora, you can run:

sudo dnf install smartmontools

Once your installation is completed, you can proceed to the next step to start your hard drive monitoring.

Check the smartctl Status on the Linux Drive

First, you must check if smartctl is enabled on your drive. To do this, you can run the following command:

sudo smartctl -i /dev/sda 

If it is not enabled, you can enable it by using the command below:

sudo smartctl -s on /dev/sda 

Run a Quick Hard Drive Health Test with smartctl

At this point, you can perform a quick health test on your drive by using the command below:

sudo smartctl -H /dev/sda 

List All Smart Information about Storage Devices

At this point, you can use the -a option to get all the available information about a storage device.

sudo smartctl -a /dev/sda

This will provide you with a list of information about your drive such as device type, power-on hours, temperature, etc.

Also, you can run extended tests with smartctl such as short and long self-tests.

The short test is meant to quickly check the most common problems that could be found on a storage device. The test should take no more than 10 minutes: mechanical, electrical, and read performances of a disk are checked.

The long test is a more accurate version of the “short” test. It can take a lot of time to complete: as stated in the smartctl manual, it can last from tens of minutes to several hours.

Run Smart Short and Long Tests on Linux

At this point, you can use the following commands to perform your extended test.

For a short test, you can use:

sudo smartctl -t short /dev/sda 

To get a long test, you can run:

sudo smartctl -t long /dev/sda 

At this point, you can get the results with the command below:

sudo smartctl -l selftest /dev/sda

Drive Temperature Monitoring with smartctl

If you have drives running 24/7, monitoring the temperature is an essential task. To do this, you can run the command below:

sudo smartctl -A /dev/sda | sudo grep Temperature_Celsius  

Conclusion

At this point, you have learned smartctl Hard Drive Monitoring Guide on Linux. It is a utility that is included in Smartmontools that interacts with SMART. With the smartctl utility, you can easily monitor your drive’s health and storage.

Hope you enjoy it. Also, you may interested in these articles:

Fix APEI Generic Hardware Error Source in Linux

Check Linux System and Hardware Information

Find Hard Disk Information on Linux

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles

POPULAR TAGS

Most Popular