brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: smartctl -l scttemphist shows the smart temperature history a drive keeps

Smart
~/tips/tip-smart-scttemphist

sudo smartctl -l scttemphist /dev/sda

Reads the temperature graph the drive recorded itself, even without monitoring software.

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

More Smart tips sudo nvme smart-log /dev/nvme0 sudo smartctl -q silent -a /dev/sda sudo smartctl -l devstat /dev/sda sudo smartctl -t select,1000000-2000000 /dev/sda sudo smartctl -l sataphy /dev/sda All Smart tips (19) All topics

Link