Cpu temperature linux ubuntu

4 Useful Tools to Monitor CPU and GPU Temperature in Ubuntu

The CPU or GPU temperature depends entirely on the usage of running programs or applications. Sensitive computer components such as CPUs have a finite lifespan and running them at a temperature that exceeds a certain limit (or at higher temperatures generally) can shorten it. Besides, it can also cause thermal throttling especially when the fan is not providing adequate cooling.

So it is important to monitor your system’s CPU temperature to avoid damaging it as a result of overheating. In this article, we will share some useful command-line tools to help you keep a close eye on the temperature of your CPU and GPU.

1. Glances

Glances is a cross-platform, advanced and popular real-time system monitoring tool that uses the psutil library to gather information from various system resources.

It can display information from sensors using the psutil and/or hddtemp tools. One of its intriguing features is the webserver mode which allows you to access it via a web browser to remotely monitor your Linux server.

There are various methods to install Glances on your system, but the preferred way of installing glances is using an auto-install script, which will install the latest production-ready version.

To install Glances on your system, use curl or wget command as shown.

# curl -L https://bit.ly/glances | /bin/bash OR # wget -O- https://bit.ly/glances | /bin/bash

Once you have installed it, start Glances and press f key to view sensors information.

Glances - Monitor CPU and GPU Temperature

2. Sensors

Sensors is a simple command-line utility that displays the current readings of all sensor chips including the CPU. It comes pre-installed some Linux distributions such as Ubuntu by default, otherwise install it as shown.

$ sudo apt-get install lm-sensors

Then you can run the following command to detect all sensors on your system.

Detect Sensors in Linux

Once detected, you can run the following command to check CPU temperature, GPU temperature, fan speed, voltage, etc.

Sensors - Show CPU and GPU Temperature

3. Hardinfo

Hardinfo is a lightweight system profiler and benchmark tool designed for hardware analysis and report generation. It features comprehensive reports on system hardware and allows for the generation of HTML reports on your system’s hardware.

Читайте также:  Using usb drives with linux

To install the hardinfo package on your Ubuntu Linux system, run the following command.

$ sudo apt install hardinfo

After the installation is complete, you can launch hardinfo to view devices’ information by running the following command.

View Device Information in Linux

To launch the GUI app, simply run the following command or search for ‘System Profiler and Benchmark’ in the system menu or Dash and open it.

Then click on sensors to view sensors information as shown in the following screenshot.

View Sensors Information in Ubuntu

4. i7z

i7z is a tiny command-line utility that reports Intel Core i7, i5, i3 CPU information including temperatures. You can install it on your Ubuntu system by running the following command.

Once installed, run i7z with root privileges as shown.

Show Intel Core Information with Temperature

You might also like to read these useful related articles.

That’s all for now! In this article, we have shared the useful command-line tools for viewing CPU and GPU temperatures in a Ubuntu system. Have your say about this article or ask questions via the feedback form below.

Источник

How to Check CPU Temperature on Linux

Like any electrical component, CPUs generate heat when being used. Some resource-demanding programs cause the CPU to increase the clock speed, which results in higher temperatures. Dust buildup also causes the CPU to overheat.

High temperatures shorten the lifespan of sensitive components, so keeping track of CPU temperatures is crucial. This way, you prevent performance throttling or component damage.

In this tutorial, you will learn how to use different tools and in-built utilities to check CPU temperature on Linux machines.

How to Check CPU Temperature on Linux

Check CPU Temperature Using Lm-Sensors

Lm-sensors is a command-line utility for hardware monitoring. Use the tool to check the temperature of the CPU and other components. Follow these steps to install and configure Lm-sensors:

1. Open the terminal and install these packages using a package manager for your distribution. In Ubuntu, use the following command:

sudo apt install hddtemp lm-sensors

Wait for the lm-sensors and hddtemp to finish downloading and installing.

2. Execute the sensors command to see the CPU temperature. The output shows the current temperature readings of all sensors in the machine. The results include the temperature of each core and maximum thresholds.

Sensors command output on Linux Ubuntu.

3. To check SSD and hard drive temperatures, execute the following command:

Check hard drive temperature on Linux Ubuntu.

The output shows the temperature of the selected disk.

Читайте также:  Lenovo s10 3 линукс

4. To see which system components you can monitor, run sudo sensors-detect .

Answer YES to multiple scanning requests until the system scan is complete.

Output showing a summary of sensors detected on Ubuntu.

When the scan completes, the output shows the summary.

5. To ensure that system monitoring works, load the needed modules using the following command:

Start kmod service on Ubuntu to monitor hardware temperature.

6. To run the sensors command repeatedly and get real-time data in the terminal, execute the following command:

Real-time output in terminal showing CPU temperature on Ubuntu.

The output refreshes every two seconds and displays the current CPU temperature reading.

Note: To check CPU usage on Linux, read our tutorial on How to check CPU usage.

Check CPU Temperature Using Psensor

Psensor is a GUI app that allows you to monitor the temperature of various system components. This utility also allows you to monitor CPU usage and fan speed.

Psensor includes an applet indicator for Ubuntu, allowing you to display the temperature in the top panel to notify you when the temperatures get too high.

Install Psensor

Before installing Psensor, you need to install and configure Lm-sensors.

1. Run this command to install the necessary packages:

sudo apt install lm-sensors hddtemp

2. Next, scan for sensors in your machine:

Answer YES to any scan requests until the scan is completed.

3. To make sure the packages are installed, execute the sensors command.

Sensors command output on Linux Ubuntu.

4. Update the package repository with sudo apt update .

5. Install Psensor using the following command:

Install Psensor app on Ubuntu Linux.

Answer YES and wait for the installation to finish.

Using Psensor

Search for Psensor in the app menu and open the utility. The app displays a graph of the selected values and shows the CPU temperature, CPU and memory usage, free RAM, GPU temperature, and HDD temperature.

Psensor app on Ubuntu showing hardware temperatures.

To configure Psensor and set which stats you want to see, follow these steps:

1. Click Psensor in the menu bar, followed by Preferences.

2. Check off the boxes for the options you want – whether Psensor launches on system startup, the update interval, graph colors, etc.

Psensor app Preferences on Ubuntu Linux.

3. To show CPU or HDD temperatures in the top panel, go to Sensor Preferences under the Application Indicator. Enable the Display sensor in the label option.

Display sensor output in the top label in Ubuntu.

Note: Learn more about monitoring CPU performance by referring to our article on Linux perf, a lightweight command-line utility.

Check Temperature Without Third-Party Utilities

There is a way to use the in-built utilities to check the CPU temperature if you don’t want to use third-party apps.

Читайте также:  Linux command is hashed

1. To check the CPU temperature without installing a third-party app, use the following command:

cat /sys/class/thermal/thermal_zone*/temp

Display CPU temperature in Ubuntu without third-party apps.

The output shows the CPU temperature in the five-digit format. Here, 49000 means 49C.

2. If you get several thermal zones and different temperatures, execute the following command to see what a single thermal zone represents:

For example, run cat /sys/class/thermal/thermal_zone2/type to see the type of thermal zone 2.

The CPU temperature is in the zone labeled x86_pkg_temp.

3. To see what all the thermal zones are referring to, use:

Display CPU temperature in Ubuntu without third-party apps.

The output shows the last stored temperature for that thermal zone in degrees Celsius. In this example, there is only one thermal zone, labeled x86_pkg_temp, which represents the CPU temperature.

You now know how to check CPU temperature on Linux using various utilities. The guide also showed how to configure the tools to display other information, such as GPU and HDD temperature.

Источник

How do I get the CPU temperature?

sudo apt-get install lm-sensors 

After installation type the following in terminal

It will ask you few questions. Answer Yes for all of them. Finally to get your CPU temperature type sensors in your terminal.

$ sensors coretemp-isa-0000 Adapter: ISA adapter Core 0: +41.0°C (high = +78.0°C, crit = +100.0°C) coretemp-isa-0001 Adapter: ISA adapter Core 1: +41.0°C (high = +78.0°C, crit = +100.0°C) w83627dhg-isa-0290 Adapter: ISA adapter Vcore: +1.10 V (min = +0.00 V, max = +1.74 V) in1: +1.60 V (min = +1.68 V, max = +1.44 V) ALARM AVCC: +3.30 V (min = +2.98 V, max = +3.63 V) VCC: +3.28 V (min = +2.98 V, max = +3.63 V) in4: +1.85 V (min = +1.66 V, max = +1.11 V) ALARM in5: +1.26 V (min = +1.72 V, max = +0.43 V) ALARM in6: +0.09 V (min = +1.75 V, max = +0.62 V) ALARM 3VSB: +3.30 V (min = +2.98 V, max = +3.63 V) Vbat: +3.18 V (min = +2.70 V, max = +3.30 V) fan1: 0 RPM (min = 10546 RPM, div = 128) ALARM fan2: 892 RPM (min = 2136 RPM, div = 8) ALARM fan3: 0 RPM (min = 10546 RPM, div = 128) ALARM fan4: 0 RPM (min = 10546 RPM, div = 128) ALARM fan5: 0 RPM (min = 10546 RPM, div = 128) ALARM temp1: +36.0°C (high = +63.0°C, hyst = +55.0°C) sensor = diode temp2: +39.5°C (high = +80.0°C, hyst = +75.0°C) sensor = diode temp3: +119.0°C (high = +80.0°C, hyst = +75.0°C) ALARM sensor = thermistor cpu0_vid: +2.050 V 

Install hddtemp

To see HDD temperature Install hddtemp

sudo apt-get install hddtemp 
$ sudo hddtemp /dev/sda /dev/sda: ST3160813AS: 34°C 

Источник

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