Here’s a nifty little Ruby gem that allows you to read your Mac’s sensors in Terminal – iStats.
Not to be confused with iStat Menu, a closed source GUI tool that costs $10 and does similar things.
iStats is simply a free macOS command-line tool that allows you to easily grab the CPU temperature, fan speeds, battery stats etc.
1. First things first. Ruby should be included by default in macOS if you’re running macOS 10.11 El Capitan or later. However, if you don’t have it installed, you can easily install it via Homebrew ( click on homebrew to learn how to install and use it ). Once Homebrew is installed, installing Ruby is at easy as typing brew install ruby in terminal. To check if the installation was successful type ruby –version.
2. Once Ruby is installed, you can easily install iStats with the following command sudo gem install iStats. Type in your password and done. ( I already had iStats installed so your installation terminal output might look different – the screenshot is just for reference )
4. If you want to go a step forward with iStats, you can use parameters. To know which parameters you can use, type iStats -h in Terminal to get a list of all the parameters supported by iStats ( for references check first photo ).
5. For more info check out iStats on github.
That’s it. Enjoy!