For system, network and cloud administrators
smartmontools
?The smartmontools package contains two utility programs (
— Official description from smartmontools.orgsmartctl
andsmartd
) to control and monitor storage systems using the Self-Monitoring, Analysis and Reporting Technology System (SMART) built into most modern ATA/SATA, SCSI/SAS and NVMe disks. In many cases, these utilities will provide advanced warning of disk degradation and failure.
smartmontools
by typing into your terminal:sudo apt-get install smartmontools -y
Once smartmontools
has been installed, it can be used by using the smartctl
command where /dev/sda
needs to be replaced with your own corresponding disk letter. The result of the test, we’ll put it into a file called 00_sda_output.txt
.
sudo smartctl --all /dev/sda >> 00_sda_output.txt
cat 00_sda_output.txt
Notice how the result will display if your disk has the SMART capability enabled.
In case your disk does not have the SMART capability enabled, you can enabled it by typing:
sudo smartctl -s on /dev/sda
The disk can be tested in 3 ways: short, long or conveyance. But to get an estimate of how much time each test will take for your disk, type:
sudo smartctl -c /dev/sda
sudo smartctl -t short /dev/sda
View your test:
sudo smartctl -l selftest /dev/sda
sudo smartctl -t long /dev/sda
View your test:
sudo smartctl -l selftest /dev/sda