Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hotafrika/gpuz-reader

Golang library for collecting metrics from GPU-Z sensors. It uses Shared Memory under the hood.
https://github.com/hotafrika/gpuz-reader

go golang gpuz shared-memory

Last synced: 29 days ago
JSON representation

Golang library for collecting metrics from GPU-Z sensors. It uses Shared Memory under the hood.

Awesome Lists containing this project

README

        

### GPU-Z shared memory reader

This repo is used for getting data and sensors values from running GPU-Z utility by shared memory.

**Running GPU-Z is required** while using this code.

### Example of usage

```go
package main

import (
"fmt"
"log"

"github.com/hotafrika/gpuz-reader"
)

func main() {
sm := gpuz.DefaultSharedMemory()
stat, err := sm.GetStat()
if err != nil {
log.Fatalln(err)
}
fmt.Println(stat.GetAvailableRecords())
fmt.Println(stat.GetAvailableSensors())
fmt.Println(stat.GetRecord("CardName"))
fmt.Println(stat.GetSensor("GPU Load"))
fmt.Println(stat.GetSensorValue("GPU Temperature"))
}
```