A service that creates an HTTP/REST endpoint allowing to query power / performance metrics for AMD Renoir processors.
Note that the following kernel module needs to be installed ryzen_smu
Installation instructions can be found there...
Purpose is to make power/performance metrics available in an easy manner.
Metrics can be queried via simple HTTP calls.
You can ,for example, use it in the famous conky system monitoring tool by doing some curl calls...
Or create your own web application with some graphs.
A simple example of a client application can be found here: rpmui
Also see Examples for some other examples (cony, terminal, etc.).
Binaries are available from the releases page.
If you have go installed on your machine, you can install with go install github.com/moson-mo/rpms
Once installed you can create a systemd service to run system-startup (see rpms.service).
If you're using Arch or an Arch-based Distribution, there is an AUR package available.
Use your favorite AUR helper to install.
F.e.: yay -S rpms
- Install go from your package manager or download it from the Golang site.
- Download with
go get github.com/moson-mo/rpms
- Change to package dir:
cd $(go env GOPATH)/src/github.com/moson-mo/rpms/
- Build with
go build
The program needs to be run with root permissions. I recommend running it as a systemd service.
Endpoint | Method | Description |
---|---|---|
/pmtab | GET | Returns full pm table in json format. Use URL parameter ?format=plain to get a plain text version. |
/pmval?metric=xyz | GET | Returns plain text value for a certain metric. Example: /pmval?metric=SOCKET POWER Use /pmtab to get a full list of available metrics. |
Argument | Type | Description |
---|---|---|
-acao | string | Sets the Access-Control-Allow-Origin header if you want to allow querying the API from a webserver. The default value is null to allow queries from local resources like an html file. (default null ) |
-address | string | The network address for the HTTP server. Define any to listen on all interfaces. (default 127.0.0.1 ) |
-interval | duration | Query interval for reading data from the PM table. (default 1s ) |
-port | int | Port number for the REST API server. (default 8090 ) |
- ryzen_smu - Linux kernel driver that exposes access to the SMU (System Management Unit) for AMD processors
- Ryzen 7 (8-core) Renoir APU's - 4xx0 U/G/H/HS series
Please contribute and help to support more models: Ryzen 3 (4 core) and Ryzen 5 (6-core) Renoir would really be interesting.
Simply create a data dump of the pm table: Please post here
The PM table has a huge amount of different metrics available.
For example:
- CPU speed / frequency (per core)
- CPU power consumption (total / per core)
- CPU voltage (per core)
- CPU temperature (core, socket, gfx)
- CPU temperature limits (core, socket, gfx)
- CPU power limits (STAPM, SLOW, FAST...)
- CPU usage (total / per core)
- GPU speed / frequency
- GPU power consumption
- GPU voltage
- GPU temperature
- GPU usage
and tons of other things... check tables.go for a list
- Leonardo Gates for the work on the Ryzen SMU driver module
- sbski for his reverse engineering work on the PM tables
- The people contributing with PM table data dumps
- The ones I forgot to mention here :)