olaresd: add node pressure status (#1735)

This commit is contained in:
eball
2025-08-22 00:11:21 +08:00
committed by GitHub
parent 55c04e26d6
commit 245e794075
4 changed files with 45 additions and 2 deletions

View File

@@ -5,6 +5,8 @@ package utils
import (
"fmt"
"io"
"log"
"strings"
"github.com/jaypipes/ghw"
@@ -13,7 +15,7 @@ import (
)
func GetGpuInfo() (*string, error) {
gpu, err := ghw.GPU()
gpu, err := ghw.GPU(ghw.WithAlerter(log.New(io.Discard, "", 0))) // discard warnings
if err != nil {
klog.Errorf("Error getting GPU info: %v", err)
return nil, err