How to install smartctl / smartd/smartmontools on FreeBSD system

Fig.01: Installing smartmontools using pkg command

Fig.01: Installing smartmontools using pkg command

You can install smartmontools using pkg command as follows:
# pkg install smartmontools
Sample outputs:

Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
	smartmontools: 6.5_1

Number of packages to be installed: 1

The process will require 2 MiB more space.
399 KiB to be downloaded.

Proceed with this action? [y/N]: y
Fetching smartmontools-6.5_1.txz: 100%  399 KiB  68.2kB/s    00:06    
Checking integrity... done (0 conflicting)
[1/1] Installing smartmontools-6.5_1...
[1/1] Extracting smartmontools-6.5_1: 100%
Message from smartmontools-6.5_1:
smartmontools has been installed

To check the status of drives, use the following:

	/usr/local/sbin/smartctl -a /dev/ad0	for first ATA/SATA drive
	/usr/local/sbin/smartctl -a /dev/da0	for first SCSI drive
	/usr/local/sbin/smartctl -a /dev/ada0	for first SATA drive

To include drive health information in your daily status reports,
add a line like the following to /etc/periodic.conf:
	daily_status_smart_devices="/dev/ad0 /dev/da0"
substituting the appropriate device names for your SMART-capable disks.

To enable drive monitoring, you can use /usr/local/sbin/smartd.
A sample configuration file has been installed as
Copy this file to /usr/local/etc/smartd.conf and edit appropriately

To have smartd start at boot
	echo 'smartd_enable="YES"' >> /etc/rc.conf

Examples and usage: FreeBSD: Get / Read Hard Disk Temperature Using smartd Tools