Archived
1
1
Fork 0

v0.1.9: (card) configurable funcs

This commit is contained in:
Josh Lay 2023-04-26 23:00:51 -05:00
parent 57fa9b904a
commit 798154faac
Signed by: jlay
GPG key ID: B265E45CACAD108A
2 changed files with 10 additions and 13 deletions

View file

@ -4,11 +4,9 @@ A simple Python module/TUI _(using [Textual](https://textual.textualize.io/))_ t
![Screenshot of main screen](https://raw.githubusercontent.com/joshlay/amdgpu_stats/master/screens/main.png "Main screen") ![Screenshot of main screen](https://raw.githubusercontent.com/joshlay/amdgpu_stats/master/screens/main.png "Main screen")
![Screenshot of log screen](https://raw.githubusercontent.com/joshlay/amdgpu_stats/master/screens/logging.png "Logging screen")
The GPU and temperature nodes (`edge`/`junction`/etc.) are discovered automatically. The GPU and temperature nodes (`edge`/`junction`/etc.) are discovered automatically.
Statistics are not logged; only toggling Dark/light mode and the stat names / source files. Please see [the module section](#module) or [the docs](https://amdgpu-stats.readthedocs.io/en/latest/) 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! Tested _only_ on `RX6000` series cards; APUs and more _may_ be supported. Please file an issue if finding incompatibility!
@ -35,18 +33,17 @@ Demonstration:
``` ```
In [1]: import amdgpu_stats.utils In [1]: import amdgpu_stats.utils
In [2]: print(amdgpu_stats.utils.get_core_stats()) In [2]: amdgpu_stats.utils.AMDGPU_CARDS
{'sclk': 0, 'mclk': 1000000000, 'voltage': 0.01, 'util_pct': 0} Out[2]: {'card0': '/sys/class/drm/card0/device/hwmon/hwmon9'}
In [3]: print(amdgpu_stats.utils.get_power_stats()) In [3]: amdgpu_stats.utils.get_core_stats('card0')
{'limit': 281, 'average': 35, 'capability': 323, 'default': 281} Out[3]: {'sclk': 640000000, 'mclk': 1000000000, 'voltage': 0.79, 'util_pct': 65}
In [4]: print(amdgpu_stats.utils.get_temp_stats()) In [4]: amdgpu_stats.utils.get_clock('card0', 'core', format_freq=True)
{'edge': 33, 'junction': 36, 'mem': 42} Out[4]: '659 MHz'
In [5]: print(amdgpu_stats.utils.get_fan_stats())
{'fan_rpm': 0, 'fan_rpm_target': 0}
``` ```
Feature requests [are encouraged](https://github.com/joshlay/amdgpu_stats/issues) :)
## Documentation ## Documentation
For more information on the module, see: For more information on the module, see:

View file

@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "amdgpu-stats" name = "amdgpu-stats"
version = "0.1.8" version = "0.1.9"
description = "A simple module/TUI (using Textual) that provides AMD GPU statistics" description = "A simple module/TUI (using Textual) that provides AMD GPU statistics"
authors = ["Josh Lay <pypi@jlay.io>"] authors = ["Josh Lay <pypi@jlay.io>"]
repository = "https://github.com/joshlay/amdgpu_stats" repository = "https://github.com/joshlay/amdgpu_stats"