fix gpu reporting issue #195
This commit is contained in:
parent
b346d10306
commit
83a05e1a36
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ get_gpu()
|
|||
{
|
||||
gpu=$(get_platform)
|
||||
if [[ "$gpu" == NVIDIA ]]; then
|
||||
usage=$(nvidia-smi | grep '%' | awk '{ sum += $13 } END { printf("%d%%\n", sum / NR) }')
|
||||
usage=$(nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits | awk '{ sum += $0 } END { printf("%d%%\n", sum / NR) }')
|
||||
else
|
||||
usage='unknown'
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue