Is there any way to view real time fan speed and thermal information (CPU, GPU) through the terminal, such as by installing an application with homebrew (i.e. $ brew install ...) or python (i.e. $ pip install ...)?

I found the threads below:

Using terminal to get current fan speed?

Can I get the CPU temperature and fan speed from the command line in OS X?

However the suggestions for terminal applications (such as istats) only give static information (not real time dynamically update information).

There is a github repo called lm-sensors which was designed for linux, however this repo has not been updated in a while and I was not able to install it properly after cloning the git. After I run the Make file, I get errors about header files being missing.

I am running OS X 10.15.4 (Catalina).

  • You weren’t able to install lm-sensors for Linux on your Mac because macOS ≠ Linux. Just because you have the source doest mean it’s just a compile away from getting a Mac version. – Allan May 16 '20 at 11:57
  • @Allan I realize that macOS is not Linux, however macOS has Darwin running as part of itsthe core components and Darwin is unix-like (and is based on free BSD). Numerous applications which are designed to run on linux will run on Darwin, that's the reason I gave lm-sensors a try. – NM_ May 16 '20 at 18:10
  • 1
    Um, no. Darwin is based on the Mach kernel. Darwin is not Unix like, it’s actually a certified Unix. Apps/utilities designed for Linux don't “also run on Darwin”. You’re confusing “made for Linux” and “the GNU version.” If something is designed for Linux means it requires the Linux kernel and/or libraries. – Allan May 16 '20 at 18:28
  • @Allan I learned something today. This explains a lot.Thank you for the information and clearing my misconceptions. – NM_ May 16 '20 at 18:33

This Github repo has a program that can provide CPU temperature and fan speed on macOS and may be useful to you. If it only displays the readings one time, when you run it, just use the watch command to run it continously. (You can install watch using MacPorts or Homebrew).

With regards to CPU temperature and power monitoring:

If you have an intel based Apple Mac, the Intel Power Gadget is a very useful application in getting accurate cpu core, temperature and power usage information.

While Intel Power Gadgets is a GUI based app it also includes a command line tool called PowerLog. (You can find PowerLog in Intel Power Gadget folder in Applications, after you install the Intel Power Gadget App).

Intel PowerLog doesn't display the information in realtime in the terminal, when run, but produces a log file. But you can use the unix tail command to view the log while it is being generated and thus get the output in realtime.

If you know how to code, Intel also provides an Intel Power Gadget API that you can use to create your own cpu monitoring program.

The app Mac Fans Control provides realtime infromation on cpu fan speed and temperature:

Realtime CPU Fan Speed and Temperature

If you are willing to pay for their software, contact them and ask if they can provide a command line version of the same app.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .