Crates.io | amdgpu_top |
lib.rs | amdgpu_top |
version | 0.10.0 |
source | src |
created_at | 2023-05-02 12:06:23.553579 |
updated_at | 2024-11-28 09:16:28.171988 |
description | Tool to displays AMDGPU usage. The tool displays information gathered from performance counters (GRBM, GRBM2), sensors, fdinfo, gpu_metrics and AMDGPU driver. |
homepage | |
repository | https://github.com/Umio-Yasuno/amdgpu_top |
max_upload_size | |
id | 854492 |
size | 171,177 |
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 |
---|---|---|
cargo run -- [options ..]
# or
amdgpu_top [options ..]
# Run TUI mode
amdgpu_top
# Run GUI mode
amdgpu_top --gui
# Run SMI mode
amdgpu_top --smi
# Dump AMDGPU info
amdgpu_top -d
# Dump AMDGPU info and gpu_metrics
amdgpu_top -d -gm
# Dump AMDGPU info and pp_table
amdgpu_top -d --pp-table
# Dump AMDGPU info in JSON format
amdgpu_top -d --json
# Dump DRM info
amdgpu_top --drm-info
# Decode gpu_metrics file
amdgpu_top --decode-gm <path>
# Decode gpu_metrics file and output in JSON format
amdgpu_top --json --decode-gm <path>
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
--pp_table, --pp-table
Dump pp_table from sysfs and VBIOS for all AMD GPUs.
(only support Navi1x and Navi2x, Navi3x)
--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)
--gl, --opengl
Use OpenGL API to the GUI backend.
--vk, --vulkan
Use Vulkan API to the GUI backend,
and use APU/iGPU for GUI rendering if it is available.
-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.
--decode-gm <Path>, --decode-gpu-metrics <Path>
Decode the specified gpu_metrics file.
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 |
$ 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%
...
sudo dnf install amdgpu_top
sudo eopkg it amdgpu_top
cargo install amdgpu_top
# or
git clone https://github.com/Umio-Yasuno/amdgpu_top
cd amdgpu_top
cargo install --locked --path .
cargo install --locked --path . --no-default-features --features="tui"
sudo apt install libdrm-dev
Features | Size (stripped) |
---|---|
json | ~1.1M |
tui | ~1.5M |
json, tui | ~1.7M |
json, tui, gui | ~18M |
/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
amdgpu_allowed_register_entry
/drivers/gpu/drm/amd/amdgpu/{cik,nv,vi,si,soc15,soc21}.c
amdgpu_top
is using cargo-i18n with Project Fluent for translation.
Please refer to pop-os/popsicle for additional supported languages.
If amdgpu_top
is not enough for you or you don't like it, try the following applications.
AMD_DEBUG=info <opengl application>
or RADV_DEBUG=info <vulkan application>