Get fan speed linux

How To Display and Change Fan Speed in Ubuntu

You can measure your system performance while measuring fan speed. Sometimes, you need to check and want to display and change your fan speed. The lm_sensors is a Linux monitoring sensor you need to use for displaying the fan speed.

This open-source CLI tool provides drivers and commands for monitoring GPU/CPU fan speed, voltage, and temperature and changing them accordingly. In this guide, we go through the installation process of lm_sensors and explain how to display and change the fan speed in Ubuntu.

How To Display and Change Fan Speed in Ubuntu

You can display the fan speed in Ubuntu by following simple steps. Here, we explain two methods by which you can exactly understand the fan speed and its temperature.

Using Command-Line Interface

You can install the lm-sensors package through the package manager. To install the lm-sensors in Ubuntu, update the database of your system through the following command:

To install lm-sensors in Ubuntu, type and execute the following command:

After the successful installation of lm-sensors, you can generate and detect a list of kernel modules using the following command:

Hardware probing will start after running the previous command. To create the /etc/sensors3.conf file, you must press the Enter key to all the questions. This file starts service automatically at boot time and loads Linux kernel modules.

Читайте также:  What is subversion in linux

You can display the /etc/sensors3.conf file using the following cat command:

To display the fan speed in Ubuntu, please type the following command into the terminal:

The previous output shows the fan speed and temperature that you need.

Alternatively, you can use the grep command to filter the previous data.

You can also display the fan speed on the screen using one of the following watch commands:

watch -n1 -d ‘ sensors | grep fan’

watch -n1 -d ‘sensors | egrep «fan|temp» | grep -v «0.0»‘

Using Graphical-User Interface

Ubuntu offers many applications through which you can easily view the fan speed. Several are Psensors, xsensors, plugin, applet, and Plasma 5 applet. You can easily install one and display the fan speed using a graphical user interface.

Now, we will install the Psensor and explain the GUI method by which you can display the fan speed.

First, install the previous application using the following sudo command:

To open the Psensor application, search it in the application menu or execute the following command:

Now, you can easily see the fan speed in Ubuntu by simply opening one application.

You can also install the GKrellM GUI tool to get information about the fan speed to control them. Execute the following command in the terminal to install GKrellM in Ubuntu:

Once you install GKrellM, run the following command in the terminal to open it:

First, right-click on your username and then click on Configuration to configure the tool.

Now, click on the sensors. Here, you can configure the fan speed and control according to your system requirements:

Читайте также:  Linux add app to path

It will help you to change and check the fan speed in Ubuntu.

Conclusion

Checking and controlling the fan speed is easy in Ubuntu because you only need to configure the sensors in the system. In this guide, we explained different methods to display and control the fan speed. First, we installed lm_sensors in the CLI method and saw how you could display the fan speed and other parameters. On the other hand, with the GUI method, you can install any of the applications previously mentioned and measure the fan speed directly through said application.

About the author

Prateek Jangid

A passionate Linux user for personal and professional reasons, always exploring what is new in the world of Linux and sharing with my readers.

Источник

Find fan speed and cpu temp in Linux

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 6

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

s-tui screenshot

This is a screenshot of what it looks like

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 .

Can it log values? I’m facing random hard system crashes, and would like to see if any of fan/temperature etc. correlate.

Читайте также:  Crucial storage executive linux

For CPU temperature:

sudo apt-get install lm-sensors 
sudo yum install lm_sensors 

Type sensors to get CPU temp.

For fan speed:

This will output fan speed

sudo apt-get install psensor 

One can also use hardinfo

sudo apt-get install hardinfo 

The 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).

On my i5-8265U CPU sensors-detect cannot detect the fans, so sensors cannot show them either. I asked for a solution here

In addition to @MilanKerslager point, after sensors-detect has listed your sensors, you need to check that the kernel driver modules are also installed.

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.

Источник

Оцените статью
Adblock
detector