Merge pull request #196 from darko1002001/master
fix gpu reporting issue #195
This commit is contained in:
commit
6333a3d52c
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ get_gpu()
|
||||||
{
|
{
|
||||||
gpu=$(get_platform)
|
gpu=$(get_platform)
|
||||||
if [[ "$gpu" == NVIDIA ]]; then
|
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
|
else
|
||||||
usage='unknown'
|
usage='unknown'
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue