LinuxCommandLibrary

radeontop

Monitor AMD GPU utilization

TLDR

Show the utilization of the default AMD GPU

$ radeontop
copy

Enable colored output
$ radeontop --color
copy

Select a specific GPU (the bus number is the first number in the output of lspci)
$ radeontop --bus [bus_number]
copy

Specify the display refresh rate (higher means more GPU overhead)
$ radeontop --ticks [samples_per_second]
copy

SYNOPSIS

radeontop [options]

PARAMETERS

-h, --help
    Display a help message and exit.

-v, --version
    Show version information and exit.

-d <delay>, --delay=<delay>
    Set the delay between updates in seconds (default: 1). Use 0 for continuous updates.

-b, --batch
    Run in batch mode; print once and exit (non-interactive).

-p, --pretty
    Enable pretty-print mode for simpler, less verbose output, often used with batch mode.

-c, --color
    Force color output, even if not on a tty.

-n <iterations>, --iterations=<iterations>
    Set the number of iterations (updates) before exiting.

-a, --all-blocks
    Display all available rings and blocks, including less commonly used ones.

-i, --irq
    Show IRQ (Interrupt Request) counters for various GPU components.

-g <gpu_id>, --gpu=<gpu_id>
    Specify the GPU to monitor (0-indexed, default: 0 for the first detected GPU).

-U, --human-readable
    Use human-readable units for memory sizes (e.g., KB, MB, GB) instead of bytes.

-P, --percentages
    Show percentages for each block's utilization when applicable.

-f, --framebuffer
    Display framebuffer memory usage statistics.

-s, --sclk-mclk
    Display SCLK (Shader Clock) and MCLK (Memory Clock) frequencies.

-S, --sensors
    Display GPU sensor data, including temperature and power consumption.

-F, --fps
    Display current frame rate (requires specific driver/application setup for accurate reporting).

-j, --json
    Output data in JSON format, suitable for scripting and parsing by other tools.

DESCRIPTION

radeontop is a command-line utility designed for real-time monitoring of AMD Radeon GPU utilization. It provides a comprehensive overview of various GPU components, including shader engine usage, memory controller activity, video decode/encode engines, and power consumption. Similar to htop or top for CPU and memory, radeontop offers a dynamic, interactive display of GPU metrics, making it an invaluable tool for developers, system administrators, and enthusiasts to diagnose performance issues, monitor resource allocation, and understand the behavior of demanding applications. It leverages the amdgpu kernel driver and DRM (Direct Rendering Manager) interfaces to retrieve detailed statistics, presenting them in a human-readable format. The tool supports multiple GPUs and can output data in various formats, including an interactive ncurses-based display or a JSON stream for scripting and further analysis.

CAVEATS

radeontop relies heavily on the amdgpu kernel driver and the DRM (Direct Rendering Manager) subsystem. It will not work with older radeon drivers or non-AMD GPUs.

The availability and accuracy of certain metrics (like FPS) depend on the specific driver version, kernel configuration, and how applications interact with the GPU.

For optimal functionality, ensure you are running a recent Linux kernel with the amdgpu driver enabled.

Some metrics might require root privileges or specific udev rules for non-root users to access GPU performance counters.

INSTALLATION

radeontop is often available in the official repositories of major Linux distributions. For Debian/Ubuntu, it can be installed via sudo apt install radeontop. For Fedora, sudo dnf install radeontop. On other distributions, it might be part of a larger amdgpu_top or radeontop package, or may require building from source from its GitHub repository.

INTERACTIVE MODE

By default, radeontop runs in an interactive, ncurses-based display mode, updating metrics in real-time. This mode provides a dynamic overview of GPU activity, similar to htop, allowing users to quickly assess GPU workload and identify potential bottlenecks. The interactive interface updates statistics every second (by default) and can be customized with various display options. Pressing 'q' exits this mode.

HISTORY

radeontop emerged as a community-driven open-source project to fill a gap in monitoring tools for AMD Radeon GPUs on Linux, paralleling nvidia-smi for NVIDIA cards. It leverages the growing capabilities of the amdgpu open-source driver, which has become the primary driver for modern AMD GPUs on Linux. Its development has focused on providing a comprehensive, real-time overview of GPU statistics, moving from basic utilization figures to more detailed insights into various engine blocks, memory usage, and sensor data. It aims to provide similar functionality to what top does for CPU and memory, but tailored specifically for the GPU.

SEE ALSO

top(1), htop(1), nvidia-smi(1), glxinfo(1), lspci(8)

Copied to clipboard