Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/hotafrika/gpuz-reader
- Owner: hotafrika
- Created: 2021-11-13T23:39:47.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-14T18:08:10.000Z (about 3 years ago)
- Last Synced: 2024-08-03T23:18:30.472Z (4 months ago)
- Topics: go, golang, gpuz, shared-memory
- Language: Go
- Homepage:
- Size: 2.93 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
- awesome-golang-repositories - gpuz-reader - Z sensors. It uses Shared Memory under the hood. (Repositories)
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 mainimport (
"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"))
}
```