search
HomeSystem TutorialLINUXTop 7 Linux GPU Monitoring and Diagnostic Command Line Tools

Top 7 Linux GPU Monitoring and Diagnostic Command Line Tools

Feb 11, 2024 pm 08:48 PM
linuxlinux tutoriallinux systemlinux commandshell scriptlsppip installationembeddedlinuxGetting started with linuxlinux learning

A video card is a special circuit board used to control what is displayed on a computer monitor. It is also called a Graphics Processing Unit (GPU) and computes 3D images and graphics for Linux games and other purposes. Let’s take a look at the top 7 Linux GPU monitoring and diagnostics command line tools to solve your problems.

The following tools are available on Linux for GPU monitoring and diagnostic purposes, as well as on other operating systems such as FreeBSD. Today, most Linux and FreeBSD users use Nvidia, Intel, and AMD GPUs.

Linux GPU Monitoring and Diagnostic Command Line Tool

We can use the following tools to monitor, diagnose and inspect Linux or *BSD based systems.

To get graphics processor information just run:

linuxmi@linuxmi:~/www.linuxmi.com$ sudo lshw -C display -short
[sudo] linuxmi password:

The output is as follows:

H/W path                   Device      Class          Description
=================================================================
/0/100/f                               display        SVGA II Adapter

linuxmi@linuxmi:~/www.linuxmi.com$ lspci -v | more

1. glmark2 – Stress test GPU performance on Linux

glmark2 is an OpenGL 2.0 and ES 2.0 benchmark command line utility. We can install it by entering the following command:

linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt install glmark2

Now, run as follows:

linuxmi@linuxmi:~/www.linuxmi.com$ glmark2

It will then start testing as follows and will stress test your GPU on Linux:

7大Linux GPU监控和诊断命令行工具

Linux glmark2 test screen

My benchmark results, running on Ubuntu Linux 20.04 LTS:

** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
=======================================================
    glmark2 2014.03+git20150611.fa71af2d
=======================================================
    OpenGL Information
    GL_VENDOR:     Mesa/X.org
    GL_RENDERER:   llvmpipe (LLVM 11.0.0, 256 bits)
    GL_VERSION:    3.1 Mesa 20.2.1
=======================================================
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[build] use-vbo=false: FPS: 150 FrameTime: 6.667 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[build] use-vbo=true: FPS: 164 FrameTime: 6.098 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[texture] texture-filter=nearest: FPS: 190 FrameTime: 5.263 ms
** GLX does not support GLX_EXT_swap_control or GLX_MESA_swap_control!
** Failed to set swap interval. Results may be bounded above by refresh rate.
[texture] texture-filter=linear: FPS: 172 FrameTime: 5.814 ms
=======================================================
                                  glmark2 Score: 169 
=======================================================

2., glxgears – a simple Linux GPU performance testing tool

It will display a set of rotating gears and periodically print out the frame rate. It has become extremely popular as an essential benchmarking tool for Linux and Unix-like systems like FreeBSD. Install and run it as follows:

linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt install mesa-utils

linuxmi@linuxmi:~/www.linuxmi.com$ glxgears

7大Linux GPU监控和诊断命令行工具

Measures the GPU frame rate every five seconds and publishes it to the screen. The final result will look like this:

4005 frames in 5.0 seconds = 800.123 FPS
1348 frames in 5.0 seconds = 269.529 FPS
1259 frames in 5.0 seconds = 251.788 FPS
1047 frames in 5.0 seconds = 209.265 FPS
651 frames in 5.0 seconds = 130.198 FPS
651 frames in 5.0 seconds = 130.070 FPS
759 frames in 5.0 seconds = 151.732 FPS
……

3. A simple tool to get Nvidia GPU statistics on Linux and FreeBSD Unix

It is written in Python and is the perfect tool for CLI users, especially ML/AI developers. It can be installed using PIP as follows:

linuxmi@linuxmi:~/www.linuxmi.com

pip3 install gpustat

Run as follows:

linuxmi@linuxmi:~/www.linuxmi.com$ gpustat

linuxmi@linuxmi:~/www.linuxmi.com$ gpustat -cp

View help:

linuxmi@linuxmi:~/www.linuxmi.com$ gpustat -h

4. intel_gpu_top – A top-like summary showing Intel GPU usage on Linux

First install the tool and run:

linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt install intel-gpu-tools

## CentOS/RHEL/Fedora Linux users try dnf command

##linuxmi@linuxmi:~/www.linuxmi.com$ sudo dnf install intel-gpu-tools

Fedora, RHEL and CentOS Linux users can use the podman command to install as follows:

linuxmi@linuxmi:~/www.linuxmi.com$ podman run –rm –priviledged registry.freedesktop.org/drm/igt-gpu-tools/igt:master

The tool collects data using performance counters (PMUs) exposed by i915 and other platform drivers such as RAPL (power) and Uncore IMC (memory bandwidth). Run it as follows on a Linux system:

linuxmi@linuxmi:~/www.linuxmi.com$ sudo intel_gpu_top

5. nvidia-smi – NVIDIA system management interface program
nvidia-smi provides monitoring and management capabilities for the Fermi and higher architecture families of NVIDIA Tesla, Quadro, GRID and GeForce devices. Most features of GeForce Titan series devices are supported, while the remaining Geforce brand information is very limited. NVSMI is a cross-platform tool that supports all standard NVIDIA drivers supported by Linux and FreeBSD. After installing the Nvidia driver on Ubuntu Linux, follow these steps to install it:

linuxmi@linuxmi:~/www.linuxmi.com$sudo apt install nvidia-smi

Open the terminal and run:

linuxmi@linuxmi:~/www.linuxmi.com nvidia-smi -q -g 0 -d UTILIZATION -l 1
linuxmi@linuxmi:~/www.linuxmi.com sudo nvidia-smi
linuxmi@linuxmi:~/www.linuxmi.com nvidia-smi –help

\6. nvtop – NVIDIA GPU top

Another great but very useful NVIDIA GPU tool. Similar to htop command or top command, it is an ncurses-based GPU status viewer for NVIDIA GPUs. We can install it as follows:

linuxmi@linuxmi:~/www.linuxmi.com

apt install nvtop ## Run this attack linuxmi@linuxmi:~/www.linuxmi.com

nvtop

7. radeontop – a tool to display AMD GPU utilization on Linux

View your AMD GPU utilization, both as a percentage of total activity and as an individual block on Linux. Install as follows:

linuxmi@linuxmi:~/www.linuxmi.com

sudo radeontop

It works with R600 and higher GPUs, even Southern Islands should work fine. Works with open source AMD drivers and AMD Catalyst clone source drivers.

Summarize

You now understand the various Linux GPU commands and tools used for monitoring and diagnostic purposes on Linux and BSD-based systems. If I missed your favorite tool, please let me know in the comments section below. Thanks. The above is the Linu system related content shared by Tutorial.com for all friends. If you want to learn more about Linux, remember to follow the official account "Linux", or scan the QR code below to follow. More useful information is waiting for you!

7大Linux GPU监控和诊断命令行工具

The above is the detailed content of Top 7 Linux GPU Monitoring and Diagnostic Command Line Tools. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:良许Linux教程网. If there is any infringement, please contact admin@php.cn delete
What is the main purpose of Linux?What is the main purpose of Linux?Apr 16, 2025 am 12:19 AM

The main uses of Linux include: 1. Server operating system, 2. Embedded system, 3. Desktop operating system, 4. Development and testing environment. Linux excels in these areas, providing stability, security and efficient development tools.

Does the internet run on Linux?Does the internet run on Linux?Apr 14, 2025 am 12:03 AM

The Internet does not rely on a single operating system, but Linux plays an important role in it. Linux is widely used in servers and network devices and is popular for its stability, security and scalability.

What are Linux operations?What are Linux operations?Apr 13, 2025 am 12:20 AM

The core of the Linux operating system is its command line interface, which can perform various operations through the command line. 1. File and directory operations use ls, cd, mkdir, rm and other commands to manage files and directories. 2. User and permission management ensures system security and resource allocation through useradd, passwd, chmod and other commands. 3. Process management uses ps, kill and other commands to monitor and control system processes. 4. Network operations include ping, ifconfig, ssh and other commands to configure and manage network connections. 5. System monitoring and maintenance use commands such as top, df, du to understand the system's operating status and resource usage.

Boost Productivity with Custom Command Shortcuts Using Linux AliasesBoost Productivity with Custom Command Shortcuts Using Linux AliasesApr 12, 2025 am 11:43 AM

Introduction Linux is a powerful operating system favored by developers, system administrators, and power users due to its flexibility and efficiency. However, frequently using long and complex commands can be tedious and er

What is Linux actually good for?What is Linux actually good for?Apr 12, 2025 am 12:20 AM

Linux is suitable for servers, development environments, and embedded systems. 1. As a server operating system, Linux is stable and efficient, and is often used to deploy high-concurrency applications. 2. As a development environment, Linux provides efficient command line tools and package management systems to improve development efficiency. 3. In embedded systems, Linux is lightweight and customizable, suitable for environments with limited resources.

Essential Tools and Frameworks for Mastering Ethical Hacking on LinuxEssential Tools and Frameworks for Mastering Ethical Hacking on LinuxApr 11, 2025 am 09:11 AM

Introduction: Securing the Digital Frontier with Linux-Based Ethical Hacking In our increasingly interconnected world, cybersecurity is paramount. Ethical hacking and penetration testing are vital for proactively identifying and mitigating vulnerabi

How to learn Linux basics?How to learn Linux basics?Apr 10, 2025 am 09:32 AM

The methods for basic Linux learning from scratch include: 1. Understand the file system and command line interface, 2. Master basic commands such as ls, cd, mkdir, 3. Learn file operations, such as creating and editing files, 4. Explore advanced usage such as pipelines and grep commands, 5. Master debugging skills and performance optimization, 6. Continuously improve skills through practice and exploration.

What is the most use of Linux?What is the most use of Linux?Apr 09, 2025 am 12:02 AM

Linux is widely used in servers, embedded systems and desktop environments. 1) In the server field, Linux has become an ideal choice for hosting websites, databases and applications due to its stability and security. 2) In embedded systems, Linux is popular for its high customization and efficiency. 3) In the desktop environment, Linux provides a variety of desktop environments to meet the needs of different users.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor