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 698b457bf9
Merge pull request #18 from joshlay/utils_docstring_vars
remove deprecated vars from utils.py docstring
2023-04-26 23:25:12 -05:00
.github/workflows Create pylint.yml 2023-04-23 17:02:45 -05:00
docs move doc files where RTD can hopefully find them 2023-04-25 22:09:52 -05:00
screens recommit 0.1.2 bits, merging to master 2023-04-23 17:45:36 -05:00
src/amdgpu_stats remove deprecated vars from utils.py docstring 2023-04-26 23:24:16 -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 v0.1.9: (card) configurable funcs 2023-04-26 23:00:51 -05:00
README.md v0.1.9: (card) configurable funcs 2023-04-26 23:00:51 -05:00
requirements.txt add requirements.txt w/ tested versions 2023-04-21 11:57:37 -05:00
todo.md vram note 2023-04-24 22:14:38 -05:00

amdgpu_stats

A simple Python module/TUI (using Textual) that shows AMD GPU statistics

Screenshot of main screen

The GPU and temperature nodes (edge/junction/etc.) are discovered automatically.

Please see the module section or the docs for information on usage as an import in other tooling

Tested only on RX6000 series cards; APUs and more may be supported. Please file an issue if finding incompatibility!

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.

Installation / Usage

pip install amdgpu-stats

Once installed, run amdgpu-stats in your terminal of choice

Module

Rudimentary support as a module exists; functions / variables offered can be found in amdgpu_stats.utils

Demonstration:

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('card0', 'core', format_freq=True)
Out[4]: '659 MHz' 

Feature requests are encouraged :)

Documentation

For more information on the module, see: