hddtemp
Report hard drive temperatures
TLDR
Display temperature of a specific drive
Display temperature of a SATA drive assigned to sda
Log temperatures to syslog every n seconds
Print only numeric value of temperature without unit
Define the unit used to denote temperature
Wake ATA drive before attempting to read temperature
Enter debug mode to show S.M.A.R.T. fields and their values
Suppress compatibility check for drive types
SYNOPSIS
hddtemp [options] device
PARAMETERS
-d, --daemon
Run as TCP daemon (default port 7634).
-p PORT, --port=PORT
Daemon port (default: 7634).
-l HOST, --listen=HOST
Daemon listen address (default: all interfaces).
-n, --no-drive-temp
Omit drive temperature from output.
-u UNIT, --unit=UNIT
Output unit: C (Celsius, default), F (Fahrenheit), K (Kelvin).
-q, --quiet
Suppress non-error output.
-s, --stdout
Write to stdout (daemon mode).
-t, --thermal
Show thermal sensor if available.
-D, --debug
Enable debug output.
--help
Show help.
--version
Show version.
-d N, --drive=N
Select drive number in SCSI enclosures.
DESCRIPTION
hddtemp is a lightweight Linux command-line tool designed to retrieve the internal temperature of hard disk drives (HDDs) and solid-state drives (SSDs) that support S.M.A.R.T. (Self-Monitoring, Analysis, and Reporting Technology). It queries ATA, SCSI, and SAS drives from manufacturers like Seagate, Western Digital, Samsung, Hitachi, Fujitsu, and IBM, using a database of known drive signatures to parse responses accurately.
The tool outputs the temperature in Celsius by default, along with the drive model and serial number. It can operate standalone for one-off checks or as a daemon providing TCP access for monitoring tools like Nagios, Munin, or MRTG. This makes it ideal for system administration, server monitoring, and preventive maintenance to avoid overheating issues.
hddtemp relies on direct disk access, so it typically requires root privileges unless run with user namespaces or udev rules. It supports drive selection by number in multi-drive setups and customizable units (Celsius, Fahrenheit, Kelvin). The daemon mode listens on a configurable port (default 7634), allowing remote queries in formats like Nagios plugins.
Limitations include dependency on drive firmware support for temperature reporting; not all SSDs expose reliable temps. It's actively maintained with an updated drive database.
CAVEATS
Requires root or smartmontools privileges; not all drives/SSDs report temperature; daemon exposes network service—use firewall.
DRIVE DATABASE
Uses /usr/share/hddtemp/hddtemp.db for vendor/model recognition; update via package manager.
NAGIOS USAGE
Daemon mode supports plugins: echo '/dev/sda' | nc host 7634 returns parsable output.
HISTORY
Originally developed by Elie De Brauwer in 2002; maintained by Arnaud Ebalard and contributors. Drive database updated regularly for new models; packaged in major distros since early 2000s.


