We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d16deb3 commit b6cbfa7Copy full SHA for b6cbfa7
check_docker.sh
@@ -153,10 +153,10 @@ function getstats () {
153
else
154
case "$typestats" in
155
CPUPerc)
156
- currentstats=`docker stats --no-stream | grep $cid | awk '{print $2}'`
+ currentstats=`docker stats --no-stream --format "table {{.Name}}\t{{.CPUPerc}}" $cid | tail -n1 | awk '{print $2}'`
157
;;
158
MemPerc)
159
- currentstats=`docker stats --no-stream | grep $cid | awk '{print $8}'`
+ currentstats=`docker stats --no-stream --format "table {{.Name}}\t{{.MemUsage}}" $cid | tail -n1 | awk '{print $2}'`
160
161
*)
162
echo "Unknown argument: $typestats"
0 commit comments