FreeBSD: Get / Read Hard Disk Temperature Using smartd Tools

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

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:

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 0 comments... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
0 comments… add one

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum