From 0ea1eda2be0c252f05ce96bcd1974e32fd46ea58 Mon Sep 17 00:00:00 2001 From: Aaron Date: Fri, 12 Nov 2021 15:16:12 +1100 Subject: [PATCH] Update check_docker.sh The MemPerc awk field on my host is 7, not 8.. that was returning the amount of NET I/O in MB, instead of the Memory Percentage.. docker version 20.10.8, build 3967b7d from docker-ce/bionic --- check_docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_docker.sh b/check_docker.sh index e00698d..2e8324d 100755 --- a/check_docker.sh +++ b/check_docker.sh @@ -156,7 +156,7 @@ function getstats () { currentstats=`docker stats --no-stream | grep $cid | awk '{print $2}'` ;; MemPerc) - currentstats=`docker stats --no-stream | grep $cid | awk '{print $8}'` + currentstats=`docker stats --no-stream | grep $cid | awk '{print $7}'` ;; *) echo "Unknown argument: $typestats"