smartd is a daemon that monitоrs the Self-Monitoring, Analysis and Reporting Technology (S.M.A.R.T) system which 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.
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 email@example.com -M test -a -s (S/../.././01|L/../../6/03) /dev/sdb -d sat -o on -S on -m firstname.lastname@example.org -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
Following, the article provides a basic configuration and instruction on how to use smartctl and smartd on Linux-based machines. Also, You can read more Linux guides by link https://linuxnotes.org/category/linux-how-to/
Viva La Linux!