From 7e30ea04db2863a5e417c4a722698956e8381996 Mon Sep 17 00:00:00 2001 From: alanweinstock Date: Thu, 27 Feb 2025 15:53:58 -0800 Subject: [PATCH] fixed nvidia-smi output breaking check --- functions | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/functions b/functions index cce04c1..d2a5056 100644 --- a/functions +++ b/functions @@ -1586,13 +1586,20 @@ get_power_info() { get_nvidia_power() { if command -v nvidia-smi >/dev/null 2>&1; then # Get power usage for all NVIDIA GPUs - local gpu_count=$(nvidia-smi --query-gpu=count --format=csv,noheader,nounits) + local gpu_count=$(nvidia-smi --query-gpu=count --format=csv,noheader,nounits | head -n 1) local total_gpu_power=0 - for ((i=0; i