How to check drive temperature on Linux?
I like hddtemp
, which provides a pretty standard way of getting the temperature for supported devices. It requires SMART support though.
Example Usage: sudo hddtemp /dev/sd[abcdefghi]
Example Response:
/dev/sda: WDC WD6401AALS-00J7B0: 31°C
/dev/sdb: WDC WD7501AALS-00J7B0: 30°C
All SMART-capable devices should respond to smartctl
. And I guss that only smart-devices have a temperature reading.
All other tools will propably be more or less vendor-specific (like Dell`s omsa). IPMI might be another generic approach, but I doubt, that a temperature-reading of a storage-device is standard there.
As mentioned by Rovanion, to list all drives in one go:
hddtemp /dev/sd?
Or, if you prefer a for loop:
for i in /dev/sd[a-z]; do hddtemp "$i"; done