In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to monitor CPU and GPU under Linux". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to monitor CPU and GPU under Linux".
Both CPU and GPU are chips with computing power. CPU is more like the "generalist" main instruction operation (execution) for heavy and numerical operations, while GPU is more like a "specialist", with the main graphics class numerical calculation as the core. The speed of different types of operations also determines their ability.
Monitor CPU temperature in Linux
For the CPU temperature, we will use the watch with the sensors command. An interesting article about the graphical user interface version of this tool has been introduced in It's FOSS. However, we will use the command line version here:
Watch-n 2 sensors
Watch ensures that the readings are updated every 2 seconds (of course, the periodic value can be changed according to your needs):
Every 250s: sensorsiwlwifi-virtual-0Adapter: Virtual devicetemp1: + 39.0° Cacpitz-virtual-0Adapter: Virtual devicetemp1: + 27.8C (crit = + 119.0 °C) temp2: + 29.8C (crit = + 119.0 °C) coretemp-isa-0000Adapter: ISA adapterPackage id 0: + 37.0C (high = + 82.0C, crit = + 100.0 °C) Core 0: + 35.0C (high = + 82.0C, crit = + 100.0 °C) Core 1: + 35.0C (high = + 82.0C, crit = + 100.0 °C) Core 2: + 33.0C (high = + 100.0 °C) Crit = + 100.0 °C) Core 3: + 36 °C (high = + 82 °C, crit = + 100.0 °C) Core 4: + 37 °C (high = + 82 °C, crit = + 100.0 °C) Core 5: + 35 °C (high = + 82 °C, crit = + 100.0 °C)
In addition, we can also get the following information:
We have five cores in use (and the current maximum temperature is 37.0 ℃).
Based on the above temperature, we can conclude that the current workload of my computer is very small.
Monitor GPU temperature in Linux
Now let's take a look at the graphics card. I have never used an AMD graphics card, so I will focus on the Nvidia graphics card. The first thing we need to do is to download the appropriate latest driver from the Ubuntu add-on driver.
In Ubuntu (the same for Zorin or Linux Mint), go to the "Software and updates > additional drivers" option and select the latest available drivers. In addition, you can add or enable the official ppa of the graphics card (via the command line or through "Software and updates > other Software"). After installing the driver, you will be able to use the "Nvidia X Server" GUI program as well as the command line tool nvidia-smi (Nvidia system Administration Interface). So we will use watch and nvidia-smi:
Watch-n 2 nvidia-smi
As in the case of CPU, we get updated readings every two seconds:
Every 2000s: nvidia-smiFri Apr 19 20:45:30 2019 Nvidia-SMI Driver Version: 418.56 CUDA Version: 10.1 | |- -- + | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | = = + = | 0 GeForce GTX 106. Off | 00000000433MiB 00.0 On | Nameba | | 0% 54C P8 10W / 120W | 433MiB / 6077MiB | 4% Default | +-+ +- -+ | Processes: GPU Memory | | GPU PID Type Process name Usage | | = = | | 0 1557 G / usr/lib/xorg/Xorg 190MiB | | 0 1820 G / usr/bin/gnome-shell 174MiB | | 0 7820 G... equest-channel-token=303407235874180773 65MiB | +-- -+
From this table, we get the following information about the display card:
It is using an open source driver with version 418.56. The current temperature of the video card is 54.0 ℃ and the fan usage is 0%. Electricity consumption is very low: only 10W. The total amount of vram (Video Random access memory) is 6GB and only 433MB is used. Vram is being used by three processes with ID of 1557, 1820, and 7820, respectively.
Most of these facts or numbers make it clear that we are not playing any games that consume system resources or dealing with heavy tasks. These values start to rise when we start playing games, dealing with videos, or other similar tasks.
Thank you for reading, the above is the content of "how to monitor CPU and GPU under Linux". After the study of this article, I believe you have a deeper understanding of how to monitor CPU and GPU under Linux, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.