Wondering how hot a drive got during last night’s copy job, with no monitoring running? Many drives keep their own history.
The command prints the drive’s temperature limits and a table of past readings:
sudo smartctl -l scttemphist /dev/sda
Each line has a time estimate, the temperature and a little bar made of asterisks, so a hot spell stands out at a glance. The values survive power cycles. Above the table you’ll see the sampling interval and how many entries the drive holds, which together tell you how far back you can look.
For just the current value plus the recorded minimum and maximum, use the status variant:
sudo smartctl -l scttempsts /dev/sda
I find the min and max line the quickest sanity check for a new case or fan setup. Run it before and after, under a similar load, and you have something better than a feeling.
This is SCT, an ATA feature, and not every drive has it. If yours doesn’t, you get a message saying SCT commands are unsupported. There is also -l scttempint,N to change the logging interval, but it clears the existing history, so I’d leave it alone unless you really want a fresh start. The time stamps are reconstructed from the interval, so treat them as approximate, especially across periods when the machine was off.
Further reading: smartctl man page
Going deeper: Keep a domain pointed at your home with Cloudflare DDNS on Unraid