How can I access thermal sensors on Mac using CLI?

I have a Mac I used to log and monitor thermal sensors. This includes an external USB sensor, and a few of the internal sensors in the Mac.


These are both older intel Macs. I recently upgraded from a 2009 running high sierra, to one a little newer running Catalina. Formerly, to access all of the thermal sensors, I used a program called Hardware Monitor. It was a GUI program but it included a CLI program you could use to poll the sensors.


However that software is abandoned and will not run on Catalina. So now I'm searching for a replacement. I'm not looking for the overall thermal pressure of the machine(aka powermetrics isn't the solution, unless it has features I'm not seeing). I'm looking for raw temperature numbers for all of the internal thermal sensors. Something I can easily grab periodically via my own running script. It hits the internal sensors, then the USB sensors, then loads it all into an sql database.


^ here is the Sensor Overview window from the program Hardware Monitor, running on an older Mac. This is the data I'm trying to access via command line.


[Re-Titled by Moderator]

Earlier Mac models

Posted on May 7, 2025 02:41 AM

Reply

Similar questions

8 replies

May 7, 2025 10:39 AM in response to l008com

A LOT of this depends on the system you're running.


Apple Silicon chips (M1/M2/M3/M4) don't report CPU temperatures in the same way that Intel chips do, due to a completely different thinking behind chip performance, thermal throttling, etc.


As such, much of what you're looking for just isn't available (or relevant) for Apple Silicon-based devices.


Apple Silicon only reports temperature in buckets of 'Nominal', 'Fair', 'Serious', or 'Critical', with no direct degrees C/F readout.


The best you can get right now is via either systemstats or powermetrics and it sounds like you're already familiar with those.


This doesn't directly explain why non-CPU temperature metrics aren't available either, but they seem to be absent, too.

May 7, 2025 01:18 PM in response to l008com

I wasn't suggesting that was a solution since you wanted a command-line approach... just saying that someone had managed to work out it.


Digging deeper I did come across an FOSS project stats which does something similar to iStats Menu. Part of this project installs a helper tool smc which does the heavy lifting of extracting the stats from the system. It's not pretty, though, since it's designed to be used within the Stats app, but it does appear to support getting temperatures from the command line:


% smc list -t
[INFO]: found 375 keys

[TAOL]     25.375
[TB0T]     26.599990844726562
[TB1T]     26.199996948242188
[TB2T]     26.599990844726562
[TCDX]     39.25374984741211
[TCHP]     33.50730895996094
...



it looks like there's a selector (TAOL, TB0T, TB1T, etc.) that identifies the sensor along with its value. The sensor codes are likely to be universal, and specific to the machine you're running on, so you'll need to work out which of the 375 codes are relevant for your machine.


If you're a developer, you may also be able to look through the code and extract the specifics for your use case. I haven't looked into that yet.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How can I access thermal sensors on Mac using CLI?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.