Archived
1
1
Fork 0
A Python module/TUI that provides AMD GPU statistics
This repository has been archived on 2024-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
Josh Lay 699dbea5df
All checks were successful
Pylint / test (push) Successful in 1m3s
forgejo: use pip'd pylint
2023-08-29 23:42:43 -05:00
.forgejo/workflows forgejo: use pip'd pylint 2023-08-29 23:42:43 -05:00
docs move doc files where RTD can hopefully find them 2023-04-25 22:09:52 -05:00
screens readme/screens: add new logs 2023-08-05 23:05:12 -05:00
src/amdgpu_stats tui: efficiency; use new Log widget instead of TextLog. remove yml req 2023-08-05 23:02:22 -05:00
.gitignore start packaging 2023-04-23 13:39:03 -05:00
.readthedocs.yaml rtd: add config 2023-04-25 22:31:45 -05:00
LICENSE.md Create LICENSE.md 2023-04-23 13:40:45 -05:00
pyproject.toml 0.1.21: the new repo release (for pypi docs) 2023-08-29 22:08:34 -05:00
README.md readme: add link for issues 2023-08-29 21:57:06 -05:00
requirements.txt requirements.txt: remove pyyaml, explicitly add rich 2023-08-06 02:34:35 -05:00
todo.md todo: remove complete item 2023-08-29 23:30:10 -05:00

amdgpu_stats

A Python module/TUI for AMD GPU statistics. Tested only on RX6000 series cards and (less so) with Ryzen CPU iGPUs.

Please file an issue if finding incompatibility!

Screenshots

Main screen / stats

Screenshot of the main stats table

Usage graphs

Screenshot of the 'graphing' scroll bars

Logs

Screenshot of the 'Logs' tab pane

Installation

pip install amdgpu-stats

To use the TUI, run amdgpu-stats in your terminal of choice. For the module, see below!

Module

Introduction:

In [1]: import amdgpu_stats.utils

In [2]: amdgpu_stats.utils.AMDGPU_CARDS
Out[2]: {'card0': '/sys/class/drm/card0/device/hwmon/hwmon9'}

In [3]: amdgpu_stats.utils.get_core_stats('card0')
Out[3]: {'sclk': 640000000, 'mclk': 1000000000, 'voltage': 0.79, 'util_pct': 65}

In [4]: amdgpu_stats.utils.get_clock('core', format_freq=True)
Out[4]: '659 MHz' 

For more information on what the module provides, please see:

Feature requests are encouraged 😀

Requirements

Only Linux is supported. Information is completely sourced from interfaces in sysfs.

It may be necessary to update the amdgpu.ppfeaturemask parameter to enable metrics.

This is assumed present for control over the elements being monitored. Untested without.

See this Arch Wiki entry for context.