Giter VIP home page Giter VIP logo

rpms's Introduction

rpms

Renoir power metrics server


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

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.).

How to install

Manual

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).

AUR package

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

How to build

  • 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

How to use

The program needs to be run with root permissions. I recommend running it as a systemd service.

HTTP endpoints

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.

Arguments

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)

Dependencies / Prerequisites

  • ryzen_smu - Linux kernel driver that exposes access to the SMU (System Management Unit) for AMD processors

Currently supported 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


Available metrics

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

Thanks to

  • 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 :)

rpms's People

Contributors

moson-mo avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.