Forked from renepenner/docker_memory_usage_all_container
Last active
August 29, 2015 14:17
-
-
Save viktorsteinwand/3ae4bae6a49c8d06b422 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
memory_usage=0; for line in `docker ps | awk '{print $1}' | grep -v CONTAINER`; do docker ps | grep $line | awk '{printf $NF" "}' && echo $(( `cat /sys/fs/cgroup/memory/docker/$line*/memory.usage_in_bytes` / 1024 / 1024 ))MB ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment