hddtemp
hddtemp copied to clipboard
smartctl-based replacement for hddtemp
- Motivation
The original hddtemp is not maintained far too long. Due to that it was removed from the official repositories of Ubuntu (since 22.04) and Debian (since 12). This tool can be used instead to print the temps:
#+begin_example
sudo hddtemp-lt /dev/sda: WDC WD10EFRX-68FYTN0 28 /dev/nvme0n1: Samsung SSD 950 PRO 256GB 40 #+end_example
- Requirements
- =smartctl= from =smartmontools= package
- NVMe support: =smartctl= v6.5+
- Usage
#+begin_example hddtemp-lt [options] [disk1 ..] #+end_example
Without any disk arguments, show temperature for all sd and nvme disks.
- Options
- =--classic= :: Replicate output format of the original hddtemp
- =-h, --help= :: Show usage
- =-q= :: Suppress warnings
- =-u, --units C|F= :: Use Celsius (default) or Fahrenheit scale
- =-V, --version= :: Show version
By default, output is aligned into columns. Device models can contain spaces like /WDC WD10EFRX-68FYTN0/ or /Samsung SSD 950 PRO 256GB/ so fields are separated with at least two spaces.
When =--classic= is applied:
- output is not aligned, fields are separated with a single space
- there is a colon after disk models
- scale marker is added
Sample /classic/ output:
#+begin_example
sudo hddtemp-lt --classic /dev/sda: WDC WD10EFRX-68FYTN0: 28°C /dev/nvme0n1: Samsung SSD 950 PRO 256GB: 40°C #+end_example
- Installation
Fetch the archive either from releases or from the development branch, extract it and put =hddtemp-lt= under =/usr/local/bin/=. In case you downloaded the script alone from github by a raw link, be sure to manually make it executable.
- How to provide smartctl output samples
No serial numbers, no time:
#+begin_example sudo smartctl -q noserial -i -A -l scttempsts /dev/sda | grep -v 'Local Time is' #+end_example