fix gpu power monitor

This commit is contained in:
Guido Kraemer 2023-04-26 16:21:38 +02:00
parent 0f345b2ded
commit d7fce8ee74
Failed to extract signature

View file

@ -27,7 +27,7 @@ get_gpu()
{
gpu=$(get_platform)
if [[ "$gpu" == NVIDIA ]]; then
usage=$(nvidia-smi --query-gpu=power.draw,power.limit --format=csv,no header,nounits | awk '{ draw += $0; max +=$2 } END { printf("%dW/%dW\n", draw, max) }')
usage=$(nvidia-smi --query-gpu=power.draw,power.limit --format=csv,noheader,nounits | awk '{ draw += $0; max +=$2 } END { printf("%dW/%dW\n", draw, max) }')
else
usage='unknown'