#amd-gpu #tui #display #counter #sensors #performance #tool

app amdgpu_top

Tool to displays AMDGPU usage. The tool displays information gathered from performance counters (GRBM, GRBM2), sensors, fdinfo, gpu_metrics and AMDGPU driver

12 releases (6 breaking)

0.7.0 Feb 4, 2024
0.6.1 Jan 4, 2024
0.5.0 Dec 13, 2023
0.4.0 Nov 30, 2023
0.1.7 May 2, 2023

#25 in Hardware support

Download history 4/week @ 2023-12-04 41/week @ 2023-12-11 12/week @ 2023-12-18 79/week @ 2024-01-01 3/week @ 2024-01-08 6/week @ 2024-01-15 9/week @ 2024-01-22 10/week @ 2024-01-29 7/week @ 2024-02-05 14/week @ 2024-02-12 73/week @ 2024-02-19 58/week @ 2024-02-26 39/week @ 2024-03-04 56/week @ 2024-03-11 26/week @ 2024-03-18

185 downloads per month

MIT license

1MB
3.5K SLoC

AMDGPU_TOP

amdgpu_top is tool that display AMD GPU utilization, like umr or clbr/radeontop or intel_gpu_top.
The tool displays information gathered from performance counters (GRBM, GRBM2), sensors, fdinfo, and AMDGPU driver.

Simple TUI
(like nvidia-smi, rocm-smi)
TUI GUI
amdgpu_top Simple TUI amdgpu_top TUI amdgpu_top GUI mode

Usage

cargo run -- [options ..]
# or
amdgpu_top [options ..]

Option

FLAGS:
   -d, --dump
       Dump AMDGPU info. (Specifications, VRAM, PCI, ResizableBAR, VBIOS, Video caps)
       This option can be combined with the "-J" option.
   --list
       Display a list of AMDGPU devices.
   -J, --json
       Output JSON formatted data.
       This option can be combined with the "-d" option.
   --gui
       Launch GUI mode.
   --smi
       Launch Simple TUI mode. (like nvidia-smi, rocm-smi)
   -p, --process
       Dump All GPU processes and memory usage per process.
   --apu, --select-apu
       Select APU instance.
   --single, --single-gpu
       Display only the selected APU/GPU
   --no-pc
       The application does not read the performance counter (GRBM, GRBM2)
       if this flag is set.
       Reading the performance counter may deactivate the power saving feature of APU/GPU.
   -gm, --gpu_metrics, --gpu-metrics
       Dump gpu_metrics for all AMD GPUs.
       https://www.kernel.org/doc/html/latest/gpu/amdgpu/thermal.html#gpu-metrics
   --drm_info, --drm-info
       Dump DRM info.
       Inspired by https://gitlab.freedesktop.org/emersion/drm_info
   --dark, --dark-mode
       Set to the dark mode. (TUI/GUI)
   --light, --light-mode
       Set to the light mode. (TUI/GUI)
   -V, --version
       Print version information.
   -h, --help
       Print help information.

OPTIONS:
   -i <usize>
       Select GPU instance.
   --pci <String>
       Specifying PCI path. (domain:bus:dev.func)
   -s <u64>, -s <u64>ms
       Refresh period (interval) in milliseconds for JSON mode. (default: 1000ms)
   -n <u32>
       Specifies the maximum number of iteration for JSON mode.
       If 0 is specified, it will be an infinite loop. (default: 0)
   -u <u64>, --update-process-index <u64>
       Update interval in seconds of the process index for fdinfo. (default: 5s)
   --json_fifo, --json-fifo <String>
       Output JSON formatted data to FIFO (named pipe) for other application and scripts.

Commands for TUI

key
g toggle GRBM
r toggle GRBM2
v toggle VRAM/GTT Usage
f toggle fdinfo
n toggle Sensors
m toggle GPU Metrics
h change update interval (high = 100ms, low = 1000ms)
q Quit
P sort fdinfo by pid
M sort fdinfo by VRAM usage
G sort fdinfo by GFX usage
M sort fdinfo by MediaEngine usage
R reverse sort

Example of using JSON mode

$ amdgpu_top --json | jq -c -r '(.devices[] | (.Info | .DeviceName + " (" + .PCI + "): ") + ([.gpu_activity | to_entries[] | .key + ": " + (.value.value|tostring) + .value.unit] | join(", ")))'
AMD Radeon RX 6600 (0000:03:00.0): GFX: 13%, MediaEngine: 0%, Memory: 4%
AMD Radeon Graphics (0000:08:00.0): GFX: 0%, MediaEngine: 0%, Memory: null%
AMD Radeon RX 6600 (0000:03:00.0): GFX: 15%, MediaEngine: 0%, Memory: 5%
AMD Radeon Graphics (0000:08:00.0): GFX: 0%, MediaEngine: 0%, Memory: null%
AMD Radeon RX 6600 (0000:03:00.0): GFX: 3%, MediaEngine: 0%, Memory: 2%
AMD Radeon Graphics (0000:08:00.0): GFX: 0%, MediaEngine: 0%, Memory: null%
...

Installation

Packages

Build from source

Dependencies:

  • libdrm2
  • libdrm-amdgpu1
cargo install amdgpu_top

# or

git clone https://github.com/Umio-Yasuno/amdgpu_top
cd amdgpu_top
cargo install --locked --path .

without GUI

cargo install --locked --path . --no-default-features --features="tui"

Used library

TUI

GUI

i18n

Reference

Translate

amdgpu_top is using cargo-i18n with Project Fluent for translation.
Please refer to pop-os/popsicle for additional supported languages.

Supported Languages

Alternatives

If amdgpu_top is not enough for you or you don't like it, try the following applications.

Dependencies

~1–23MB
~322K SLoC