Find fan speed and cpu temp in Linux

If you would like to try a different option, you can try s-tui, a software we were working on. It is a terminal UI app, so running it over SSH is also possible. It displays CPU temperature, utilization, frequency and power. Fan speed was also added.

Installation methods are explained on the GitHub Readme. s-tui on GitHub

This is a screenshot of what it looks like s-tui screenshot


For CPU temperature:

On Debian:

sudo apt-get install lm-sensors

On Centos:

sudo yum install lm_sensors

Run using:

sudo sensors-detect

Type sensors to get CPU temp.

For fan speed:

sensors | grep -i fan

This will output fan speed

or install psensor using:

sudo apt-get install psensor

One can also use hardinfo

sudo apt-get install hardinfo

I have used ipmitool from GitHub and freeipmi on my servers, but, well, they're servers, with BMC hardware which supports IPMI. If your PC does, it's a reasonable solution.

I run a script which pulls SDR data on the machine in test (example lines follow)

ti=$(date +%H:%M:%S)
pt=$(ipmitool -I open sdr | grep 'PS1 Temp')

and sends it to the screen as well as to logfile then idles w/ ping for 15 seconds

echo "$ti|$pt" && echo "$ti|$pt" >> logfile && ping -w 15 127.0.0.1 > nul

before looping around again for another pass.

Tags:

Fan