From 9ac5212231ce74ce30d6d73390bafab512320261 Mon Sep 17 00:00:00 2001 From: Phu Ninh <18023194+phongphuhanam@users.noreply.github.com> Date: Wed, 15 Dec 2021 14:24:37 +0900 Subject: [PATCH] fix gram_percentage.sh when showing ram usage of multi GPUs --- scripts/gram_percentage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gram_percentage.sh b/scripts/gram_percentage.sh index 93dd7a7..269c260 100755 --- a/scripts/gram_percentage.sh +++ b/scripts/gram_percentage.sh @@ -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() {