Monitor CPU and GPU temperature on Linux | Linux China

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/F8qG7f9YD02Pe/article/details/90746079
640?wx_fmt=png This article discusses two simple ways to monitor CPU and GPU temperature in the Linux command line. - Alejandro Egea-abellán

Since  the Steam (including  the Steam Play , namely Proton) and some other development, GNU / Linux is becoming more and more choices everyday gaming platform of computer users. There are also a considerable number of users in the face like video editing or graphic design (Kdenlive and  Blender  is such a good example of the application) when the resource-intensive computing tasks, will use GNU / Linux.

Whether you are a user of one of these or other users, you also will want to know your computer CPU and GPU how hot can (if you want to overclock will be more so). If so, then read on. We will introduce two very simple commands to monitor CPU and GPU temperature.

My apparatus comprises a  Slimbook Kymera  and two monitors (one monitor TV and a PC), so that I can play a game, watch another to monitor the temperature. In addition, because I use  Zorin OS , I will focus on the Ubuntu derivative distributions and Ubuntu.

In order to monitor the behavior of the CPU and GPU, we will use a practical  watch command dynamically get readings after every few seconds.

Monitor CPU temperature in Linux

For CPU temperature, we will use in conjunction  watch with the  sensors command. An article on the graphical user interface version of the tool is an interesting article has been introduced in the It's FOSS. However, we will use the command line version here:

 
  
  1. watch -n 2 sensors

watch To ensure that the readings once (of course, this cycle values ​​can change according to your needs) every 2 seconds update:

 
  
  1. Every 2,0s: sensors
  2. iwlwifi-virtual-0
  3. Adapter: Virtual device
  4. temp1: +39.0°C
  5. acpitz-virtual-0
  6. Adapter: Virtual device
  7. temp1: +27.8°C (crit = +119.0°C)
  8. temp2: +29.8°C (crit = +119.0°C)
  9. coretemp-isa-0000
  10. Adapter: ISA adapter
  11. Package id 0: +37.0°C (high = +82.0°C, crit = +100.0°C)
  12. Core 0: +35.0°C (high = +82.0°C, crit = +100.0°C)
  13. Core 1: +35.0°C (high = +82.0°C, crit = +100.0°C)
  14. Core 2: +33.0°C (high = +82.0°C, crit = +100.0°C)
  15. Core 3: +36.0°C (high = +82.0°C, crit = +100.0°C)
  16. Core 4: +37.0°C (high = +82.0°C, crit = +100.0°C)
  17. Core 5: +35.0°C (high = +82.0°C, crit = +100.0°C)

In addition, we can obtain the following information:

◈ We have five core is being used (and the current maximum temperature of 37.0 ℃). ◈ temperature exceeds 82.0 deg.] C is considered to be overheated. ◈ 100.0 deg.] C over a temperature will be considered exceeding a critical value.

According to the above temperature values ​​we can conclude that my computer now work load is very small.

GPU temperature monitoring in Linux

Now let's look at the video card. I never used AMD graphics card, so I will focus on the Nvidia graphics card. The first thing we need to do from  additional driving Ubuntu is  to download the latest driver suitable.

In Ubuntu (Zorin or Linux Mint is the same), go to "Software and Updates> Additional Drivers" option, select the latest available drivers. In addition, you can add or official ppa enabled graphics card (be accomplished through the command line or through the "software and updates> Other Software"). After installing the driver, you will be able to use the "Nvidia X Server" GUI program and command-line tool  nvidia-smi(Nvidia System Management Interface). Therefore, we will use  watch and  nvidia-smi:

 
  
  1. watch -n 2 nvidia-smi

As in the case of the CPU, we will get readings every two seconds in the last update:

 
  
  1. Every 2,0s: nvidia-smi
  2. Fri Apr 19 20:45:30 2019
  3. +-----------------------------------------------------------------------------+
  4. | Nvidia-SMI 418.56 Driver Version: 418.56 CUDA Version: 10.1 |
  5. |-------------------------------+----------------------+----------------------+
  6. | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
  7. | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
  8. |===============================+======================+======================|
  9. | 0 GeForce GTX 106... Off | 00000000:01:00.0 On | N/A |
  10. | 0% 54C P8 10W / 120W | 433MiB / 6077MiB | 4% Default |
  11. +-------------------------------+----------------------+----------------------+
  12. +-----------------------------------------------------------------------------+
  13. | Processes: GPU Memory |
  14. | GPU PID Type Process name Usage |
  15. |=============================================================================|
  16. | 0 1557 G /usr/lib/xorg/Xorg 190MiB |
  17. | 0 1820 G /usr/bin/gnome-shell 174MiB |
  18. | 0 7820 G ...equest-channel-token=303407235874180773 65MiB |
  19. +-----------------------------------------------------------------------------+

From this table, we get the following information about the graphics card:

◈ it is using the version number is 418.56 open source drivers. ◈ card displays the current temperature is 54.0 ℃, and the fan is used in an amount of 0%. ◈ power consumption is very low: only 10W. ◈ total of 6GB of VRAM (video random access memory), using only 433MB. ◈ vram is being used by three processes, their ID 1557,1820 and 7820 respectively.

Most of these values ​​are clearly facts or that we did not play any games or consumption of system resources large load processing tasks. When we started playing games, video processing, or other similar tasks, these values ​​will begin to rise.

in conclusion

Even if we have GUI tools, but I found these two commands for real-time monitoring hardware is very handy.

How would you go to use them? You can learn more about these tool tips by reading their man pages.

There are other tools you prefer it? We share it in the comments;).

have fun!


via: https://itsfoss.com/monitor-cpu-gpu-temp-linux/

Author: Alejandro Egea-Abellán  topics: lujun9972  Translator: cycoe  proofread: wxy

This article from the  LCTT  original compiler, Linux China  is proud

640?wx_fmt=jpeg


Guess you like

Origin blog.csdn.net/F8qG7f9YD02Pe/article/details/90746079