FreeBSD: Get / Read Hard Disk Temperature Using smartd Tools

Posted on in Categories , , last updated March 18, 2017

How do I read my hard disk temperature using smartool (smartctl command) under FreeBSD operating system?

smartd is a daemon that monitors the Self-Monitoring, Analysis and Reporting Technology (SMART) system built into many ATA-3 and later ATA, IDE and SCSI-3 hard drives. The purpose of SMART is to monitor the reliability of the hard drive and predict drive failures, and to carry out different types of drive self-tests.

You need to use the smartctl command to Control and Monitor Utility for SMART Disks.

FreeBSD Install smartctl / smartd

Use FreeBSD ports system as follows:
# cd /usr/ports/sysutils/smartmontools
# make install clean

OR use binary package system:
# pkg install smartmontools
Sample outputs:

Fig.01: Installing smartmontools using pkg command
Fig.01: Installing smartmontools using pkg command

Make sure smartd start at boot time. Type the following command as root user:

echo 'smartd_enable="YES"' >> /etc/rc.conf

Make sure your hard disk support SMART monitoring, enter:
# smartctl -i /dev/ad0
# smartctl -i /dev/ada1
Sample outputs:

smartctl 6.5 2016-05-07 r4318 [FreeBSD 11.0-RELEASE-p8 amd64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke,

Device Model:     APPLE HDD HTS541010A9E662
Serial Number:    J8900176HM4XHF
LU WWN Device Id: 5 000cca 6a0d6cd05
Firmware Version: JA0AB560
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5400 rpm
Form Factor:      2.5 inches
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ATA8-ACS T13/1699-D revision 6
SATA Version is:  SATA 2.6, 3.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Sat Mar 18 18:15:49 2017 IST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

To see current hard disk temperature for /dev/ad0 (first hard disk), enter:
# smartctl -d ata -A /dev/ad0 | grep -i temperature
# smartctl -A /dev/ada1 | grep -i temperature
Sample outputs:

194 Temperature_Celsius     0x0002   122   122   000    Old_age   Always       -       49 (Min/Max 19/50)

See also:

Leave a Comment