mirror of
https://github.com/fankes/beszel.git
synced 2025-10-20 10:19:27 +08:00
progress on gpu metrics
This commit is contained in:
@@ -24,6 +24,7 @@ type Agent struct {
|
||||
sensorsContext context.Context // Sensors context to override sys location
|
||||
sensorsWhitelist map[string]struct{} // List of sensors to monitor
|
||||
systemInfo system.Info // Host system info
|
||||
gpuManager *GPUManager // Manages GPU data
|
||||
}
|
||||
|
||||
func NewAgent() *Agent {
|
||||
@@ -74,6 +75,13 @@ func (a *Agent) Run(pubKey []byte, addr string) {
|
||||
a.initializeNetIoStats()
|
||||
a.dockerManager = newDockerManager()
|
||||
|
||||
// initialize GPU manager
|
||||
if gm, err := NewGPUManager(); err != nil {
|
||||
slog.Error("GPU manager", "err", err)
|
||||
} else {
|
||||
a.gpuManager = gm
|
||||
}
|
||||
|
||||
// if debugging, print stats
|
||||
if a.debug {
|
||||
slog.Debug("Stats", "data", a.gatherStats())
|
||||
|
Reference in New Issue
Block a user