Sometimes you may want to know how fast your fans are spinning, more as a “number value” rather than a “noise value”. While you can hear when your Mac in front of you is working hard, it’s impossible to tell how fast those fans are spinning when you’re miles away from your Mac in a data centre.
Thankfully there is an easy way to read out the fan speed with a small built-in utility we can access from the command line. Launch a terminal session and issue spindump as admin user:
sudo spindump Password: Sampling all processes for 10 seconds with 10 milliseconds of run time between samples Sampling completed, processing symbols... Spindump analysis written to file /tmp/spindump.txt
It’ll take a few seconds, at the end of which a file is produced that tells you a lot more than just the fan speed. To filter this info out, issue the following:
cat /tmp/spindump.txt | grep "Fan speed" Fan speed: 3151 rpm (-317)
And there you have it! Execute this command under low load, then try again under heavy load to see your low and high spin numbers to get an impression how how busy your Mac’s fans are.
To remove that temporary file and avoid your hard disk from being clogged up, issue this when you’re done:
sudo rm /tmp/spindump.txt
This may not be the most elegant way to read out your fan speeds, but it works without installing additional utilities. The spindump command is computationally expensive, so don’t do it continuously – there are better tools for that (such as smcFanControl, or others – see the link below).
correct usage of grep command
grep “Fan speed” /tmp/spindump.txt