What are the commands to find out fan speed and cpu temp in linux (I know lm-sensor can do the task). Is there any alternative for that?
6 Answers
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
-
Thanks after many days got a response on question. i was using lm-sensor as suggested by others. will defiantly try this new software. thanks !!!Rajnish Kumar Soni– Rajnish Kumar Soni2017-10-11 09:12:47 +00:00Commented Oct 11, 2017 at 9:12
-
Looks impressive and I like the terminal eye candy!Trevor– Trevor2018-05-13 10:03:42 +00:00Commented May 13, 2018 at 10:03
-
1Works great on Linux. I hope that it would have some OSX support soon.MasterAM– MasterAM2019-04-23 06:09:02 +00:00Commented Apr 23, 2019 at 6:09
-
Can it log values? I'm facing random hard system crashes, and would like to see if any of fan/temperature etc. correlate.user7543– user75432021-02-02 19:45:56 +00:00Commented Feb 2, 2021 at 19:45
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
-
32sensors |grep fan doesn't output anything at all!matteo– matteo2018-08-19 16:56:29 +00:00Commented Aug 19, 2018 at 16:56
-
1@matteo Case matters. On my system it is "Processor Fan", so use 'grep -i fan'KevinM– KevinM2018-08-21 15:56:04 +00:00Commented Aug 21, 2018 at 15:56
-
2The sensors have to be detected first by running sensors-detect after installation (interactive terminal script, just pres Enter on questions and all have to be done automagically). This is needed on CentOS, on Debian configure/reconfigure is fired after install or dpkg-reconfigure psensor).Milan Kerslager– Milan Kerslager2019-02-08 19:58:42 +00:00Commented Feb 8, 2019 at 19:58
-
5On my i5-8265U CPU
sensors-detectcannot detect the fans, sosensorscannot show them either. I asked for a solution hererubo77– rubo772019-08-01 07:11:39 +00:00Commented Aug 1, 2019 at 7:11 -
In addition to @MilanKerslager point, after
sensors-detecthas listed your sensors, you need to check that the kernel driver modules are also installed.Luciano– Luciano2019-09-01 10:31:59 +00:00Commented Sep 1, 2019 at 10:31
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.
i'm use Glances in python. It's a interactive process manager and hardware status.
apt install python python-pip; pip install glances;
and run with:
glances
good look ;)
-
3Can you show how it allows the user to find out fan speed and CPU temperature?G-Man Says 'Reinstate Monica'– G-Man Says 'Reinstate Monica'2019-02-25 02:23:10 +00:00Commented Feb 25, 2019 at 2:23
-
@G-Man check this github.com/nicolargo/glances/issues/1087, I havent tested yet thoAquarius Power– Aquarius Power2019-05-18 02:03:06 +00:00Commented May 18, 2019 at 2:03
GUI alternative for sensors command are Psensor and XSensors:
sudo apt install xsensors
sudo apt install psensor
For better detection of your hardware's sensors, you can also run following:
sudo apt install lm-sensors
sudo sensors-detect
sensors
watch -d -n 1 sensors
