In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly shows you how the Linux system to view GPU, the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor to take you to study and learn "Linux system how to view GPU" this article.
GPU makes the graphics card less dependent on CPU and does part of the work of the original CPU, so how to view GPU information in the Linux system.
Use the CUDA_VISIBLE_DEVICES=GPU number to specify which graphics card to use before running the program. Write it in the program if you use multiple graphics cards. Do not python * * .py directly, which will occupy all the graphics cards.
There are two table on this terminal, both are connected servers, it is best to run the program on the first one, the first one uses tmux, the computer shutdown program can still run, and the code can be transferred on another table when running the program.
Linux to view video card information:
Lspci | grep-I vga 1 you can use nvidia GPU to:
Lspci | grep-I nvidia 1 preceded by the serial number "00:0f.0" is the video card code (here is the virtual machine used)
View the details of the specified video card with the following instructions:
Lspci-v-s 00:0f.0 1Linux to view Nvidia graphics card information and usage
Nvidia comes with a command line tool to view the usage of video memory:
Nvidia-smi 12
Header interpretation:
Fan: displays the fan speed. The value is between 0 and 100%, which is the expected speed of the computer. If the computer is not cooled by the fan or the fan is broken, it will be shown as NTemp A; Temp: the temperature inside the graphics card, in degrees Celsius; Perf: represents the performance status, from P0 to P12 P0 represents the maximum performance, P12 represents the state minimum performance; Pwr: energy consumption; Bus-Id: related information related to the GPU bus Disp.A: means Display Active, indicating whether the display of GPU is initialized; Memory Usage: usage of video memory; Volatile GPU-Util: floating GPU utilization; Compute M: computing mode; Processes below shows the video memory used by each process on each GPU.
If you want to periodically output the usage of the video card, you can use the watch instruction:
The watch-n 10 nvidia-smi 1 command line argument-n is followed by the period of execution of the command in s.
What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.
The above is about "how to check GPU in Linux system". If this article is helpful to you and think it is well written, please share it with your friends to learn new knowledge. if you want to know more about it, please pay more attention to the industry information channel.
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.