fix: wrong IP value in some situations (#32)

This commit is contained in:
UUBulb
2024-06-25 22:08:28 +08:00
committed by GitHub
parent 81b774a7f0
commit fb86c89de7
2 changed files with 9 additions and 6 deletions
+3 -2
View File
@@ -4,11 +4,12 @@ package stat
// Original License: MIT
import (
"encoding/json"
"errors"
"os"
"os/exec"
"strconv"
"github.com/nezhahq/agent/pkg/util"
)
type ROCmSMI struct {
@@ -48,7 +49,7 @@ func gatherROCmSMI(ret []byte) ([]float64, error) {
var gpus map[string]GPU
var percentage []float64
err := json.Unmarshal(ret, &gpus)
err := util.Json.Unmarshal(ret, &gpus)
if err != nil {
return nil, err
}