1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 02:33:18 +00:00

nvidia_gpu_: fix utilization when using 570.x driver

The utilization used to be on a line beginning with "Gpu", but has since
been capitalized to "GPU". There's already several other instances of
that in the nvidia-smi output, so narrow down the search by returning
only the line after "Utilization".
This commit is contained in:
Matt Merhar 2025-03-02 17:50:09 -05:00
parent 2212acdc16
commit 259489bb77

View file

@ -265,7 +265,7 @@ case $name in
valueGpus=$(echo "$smiOutput" | grep "Power Draw" | cut -d ':' -f 2 | cut -d ' ' -f 2)
;;
utilization)
valueGpus=$(echo "$smiOutput" | grep "Gpu" | cut -d ':' -f 2 | cut -d ' ' -f 2)
valueGpus=$(echo "$smiOutput" | grep -A 1 "Utilization" | grep -i "GPU" | cut -d ':' -f 2 | cut -d ' ' -f 2)
;;
rx)
rxGpus=$(echo "$smiOutput" | grep "Rx Throughput" | cut -d ':' -f 2 | cut -d ' ' -f 2)