fix gram_percentage.sh when showing ram usage of multi GPUs

This commit is contained in:
Phu Ninh 2021-12-15 14:24:37 +09:00
parent 8f52392712
commit 9ac5212231

View file

@ -18,7 +18,7 @@ print_gram_percentage() {
echo "No GPU"
return
fi
echo "$loads" | awk -v format="$gram_percentage_format" '{used+=$1; tot+=$2} END {printf format, 100*$1/$2}'
echo "$loads" | awk -v format="$gram_percentage_format" '{used+=$1; tot+=$2} END {printf format, 100*used/tot}'
}
main() {