How to Monitor CPU and GPU temperature in Linux
Last Updated :
01 Dec, 2022
This article will discuss How to Monitor CPU and GPU temperature in Linux. There are several ways to do this here in this article we will discuss a few of them. The utilization of currently running programs or applications has no bearing on the CPU or GPU temperature. Operating sensitive computer parts, such as CPUs, at temperatures over a predetermined threshold (or at higher temperatures generally) might reduce their lifespan. Additionally, it can result in thermal throttling, particularly if the fan is not delivering enough cooling.
It is to prevent overheating from harming your system's CPU, It is crucial to keep an eye on its temperature. In this post, we'll discuss a few helpful command-line utilities that may be used to monitor the temperature of your CPU and GPU.
Monitoring CPU and GPU temperature in Linux
We can monitor the CPU and GPU temperature in Linux through 3 different methods:
- Method 1: Sensors
- Method 2: Glances
- Method 3: Hardinfo
Now we will look at these methods to Monitor CPU and GPU temperature in Linux.
Method 1: Sensors
A command-line tool called Sensors shows the most recent values from all sensor chips, including the CPU. Some Linux distributions, like Ubuntu, come with already installed by default; if not, install it as directed.
Step 1: Execute the below command to install the sensors tool on your system.
sudo apt-get install lm-sensors
Step 2: Once the sensors are detected then run the following command to measure CPU temperature, GPU temperature, Fan speed, etc.
sudo sensors-detect
Output:
After the above process, the sensors will be detected and the temperature will be shown using that sensor using the Sensors method of Monitor CPU and GPU temperature in Linux.
Method 2: Glances
Glances is a Python-based, cross-platform system monitoring program that uses curses. Your system's data is retrieved using the psutil library. All of the necessary information is presented in one convenient location, either through a web-based interface or curses. Depending on the size of the user interface, the information changes dynamically. Glances have the ability to track a variety of system metrics, including CPU, memory, swap, system load average, process list, network interface, disc I/O, raid, sensors (such as CPU temperature), battery, filesystem utilization, Docker, monitor, alert, system info, uptime, etc.
Step 1: Execute the below command to install the glances tool.
sudo apt install glances -y
In the above pictures and in the next two pictures Glances is Installing
At this point, we have successfully installed Glances. Once it is installed, start glances and press the 'f' key to view the sensor's information
Output:
The above picture is showing the temperature of the CPU and GPU using Glances after following the final step.
Method 3: Hardinfo
The system profiler and benchmark program Hardinfo is compact and built for hardware analysis and report creation. It offers thorough data on system hardware and enables the creation of HTML reports on the hardware of your system.
Step 1: To install the hard info package on your Ubuntu Linux system, run the following command:
sudo apt install hardinfo
In the above picture, the Hardinfo is installed and after installation, it will look like above
Step 2: You can use the following command to launch hardinfo after the installation is finished and display device details.
$ hardinfo -rma devices.so
In above picture and next three pictures the Hardinfo is launching.....
Step 3: Use the following command to open the GUI app, or look for "System Profiler and Benchmark" in the system menu or Dash.
$ hardinfo
The above picture finally shows the CPU and GPU temperature using hardinfo method of Monitor CPU and GPU temperature in Linux
In this article, we went through useful command-line tools for viewing CPU and GPU temperatures in Ubuntu system.
Similar Reads
How to check how many CPUs are there in Linux system
In this article, we will discuss how to check CPU information in a Linux system. In the Linux system, the main configuration file of the CPU and system architecture is stored at /proc/cpuinfo. With the help of the cat, nano command we can view the CPU configuration file. This helps a lot in getting
2 min read
How to Monitor System Activity in Linux | top Command
top command is used to show the Linux processes. It provides a dynamic real-time view of the running system. Usually, this command shows the summary information of the system and the list of processes or threads which are currently managed by the Linux Kernel. As soon as you will run this command it
10 min read
How to Install and Use BpyTop Resource Monitoring Tool in Linux?
It's just as critical for terminal users to be able to keep track of their system's resource use. Knowing how much of your system's resources are being used allows you to make more educated decisions about general system maintenance. Top and htop are two choices, but they only show a few device metr
2 min read
Linux System Monitoring Commands and Tools
Monitoring the performance and health of a Linux system is essential for maintaining its stability and optimizing resource utilization. Linux provides a variety of commands and tools to facilitate system monitoring, enabling administrators to track key metrics, identify potential issues, and ensure
6 min read
How to Monitor Linux Commands Executed by System Users in Real-time?
If you are a Linux system administrator then you would definitely want to monitor the interactive activity of all system users, like monitoring the Linux commands they execute in real-time. In this brief Linux system security article, we will be going to discuss how to monitor all Linux shell comman
1 min read
Check and Monitor Active GPU in Linux
Monitoring the GPU(Graphics Processing Unit) on a Linux operating system is essential for performance testing, debugging, and ensuring usage. There are many tools for checking and monitoring the GPU activity of various GPUs like Nvidia, AMD, or Intel GPU. This article will teach us about multiple me
4 min read
SAR command in Linux to monitor system performance
sar (System Activity Report) It can be used to monitor Linux system's resources like CPU usage, Memory utilization, I/O devices consumption, Network monitoring, Disk usage, process and thread allocation, battery performance, Plug and play devices, Processor performance, file system and more. Linux s
9 min read
How to Install Turbo C++ on Linux?
In this article, we will look into how to install Turbo C++ on Linux. Turbo C++ is the free and Open-Source Software, it is a development tool for writing programs in the C/C++ language. Turbo C++ is a compiler and IDE (Integrated development environment) originally from Borland. Prerequisites: To r
2 min read
How to Use Glances to Monitor Remote Linux in Web Server Mode?
Glances is a system monitoring tool for Linux machines, it is used to monitor system resources in web server mode or through the web browser. It is an alternative to top and htop monitoring tools. This tool has various features and also provides bits of information on a single screen. Glances is a c
3 min read
How to Monitor Logs in Linux?
Monitoring logs in Linux is crucial for troubleshooting, system maintenance, and ensuring optimal performance. Linux logs provide valuable information about the system, applications, and services running on your machine. These logs help administrators diagnose issues and monitor system health. In th
4 min read