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 )
3. To use iStats is as simple as calling iStats with no parameters in the terminal. Which will return something like:
As you can see, this tool is even more useful on any Apple laptop as it provides an easy to read list of battery stats.
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!