From ca8cb78c295013fc603be2b1cbcf70479abf746a Mon Sep 17 00:00:00 2001 From: Vascolas007 Date: Mon, 12 Jan 2026 21:11:22 +0000 Subject: [PATCH] Jetson tegrastats regex pre jetpack5 (#1631) * feat:Adding regex catching groups for GPU temperature and power in pre jetpack 5 --- agent/gpu.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent/gpu.go b/agent/gpu.go index 06752cdb..81cb83db 100644 --- a/agent/gpu.go +++ b/agent/gpu.go @@ -136,10 +136,10 @@ func (gm *GPUManager) getJetsonParser() func(output []byte) bool { // use closure to avoid recompiling the regex ramPattern := regexp.MustCompile(`RAM (\d+)/(\d+)MB`) gr3dPattern := regexp.MustCompile(`GR3D_FREQ (\d+)%`) - tempPattern := regexp.MustCompile(`tj@(\d+\.?\d*)C`) + tempPattern := regexp.MustCompile(`(?:tj|GPU)@(\d+\.?\d*)C`) // Orin Nano / NX do not have GPU specific power monitor // TODO: Maybe use VDD_IN for Nano / NX and add a total system power chart - powerPattern := regexp.MustCompile(`(GPU_SOC|CPU_GPU_CV) (\d+)mW`) + powerPattern := regexp.MustCompile(`(GPU_SOC|CPU_GPU_CV)\s+(\d+)mW|VDD_SYS_GPU\s+(\d+)/\d+`) // jetson devices have only one gpu so we'll just initialize here gpuData := &system.GPUData{Name: "GPU"}