Hidden Linux : SMART Drives
SMART - or Self-Monitoring,
Analysis and Reporting Technology - is built into practically every
hard disk drive with the aim of detecting electrical and mechanical
faults that could eventually cause the drive to fail. Adding the SMART
Monitoring Tools ("smartmontools") package to your system can give you
advance warning of impending problems.Most distributions include SMART in the default installation. If it's not present, add "smartmontools" from your package manager, or download it from smartmontools.sourceforge.net.
The package consists of two utilities - smartd and smartctl. The first is a daemon that runs in the background, the second a control and monitoring tool.
Tests take two forms. A short test will check the drive's electrical, mechanical and read performance, and will typically complete within a minute. A long test may take considerably longer because it scans the entire surface of the disk. Here are the commands to use ...
| sudo smartctl --test=short /dev/sda |
| sudo smartctl --test=long /dev/sda |
... where /dev/sda is the device to scan. (You can list all drives on your system with sudo fdisk -l.)
View any error output with:
| sudo
smartctl -l error /dev/sda |
Or view detailed information about the driver with:
| sudo smartctl -a
/dev/sda |
The SmartMonTools FAQ has a lot more information.
![]() |
![]() |



PC World is New Zealand’s top selling computing and technology magazine.
Comments
Here's a screenshot of it detecting a failing drive..
http://racepics.biz/temp/diskfail.jpg
Posted by: chris | June 2, 2011 9:19 AM
Standard issue in Ubuntu.
Its incorporated in the "Disk Utility" (System>Administration>Disk Utility)
I use it a lot to test windows PC's hard drives via liveCD as well.
Posted by: chris | June 2, 2011 9:06 AM