Basic information
smartd is a daemon that monitоrs the Self-Monitoring, Analysis and Reporting Technology (S.M.A.R.T) system that is built into most ATA/SATA and SCSI/SAS drives and solid-state drives.
smartctl is a command-line utility designed to perform SMART tasks such as printing the SMART self-test and error logs, enabling and disabling SMART automatic testing, and initiating device self-tests.
Installation
Both can be installed with smartmontools in Debian-like system:
# apt-get install smartmontools
or Centos system:
# yum install smartmontools
Basic smartd configuration
Here is a basic smartd configuration to monitor 2 HDD drives. The following lines need to be added to /etc/smartd.conf.
/dev/sda -d sat -o on -S on -m test@example.com -M test -a -s (S/../.././01|L/../../6/03) /dev/sdb -d sat -o on -S on -m test@example.com -M test -a -s (S/../.././01|L/../../6/03)
Basic smartctl usage
To check if S.M.A.R.T exist on disc:
# smartctl -i /dev/sda
To get report about all disk health:
# smartctl -i -a /dev/sda