Created
October 14, 2016 06:42
-
-
Save mikechau/e9a32f9e2a7bd456ebfe1a6dea1cf22f 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
# http://www.commandlinefu.com/commands/view/13708/show-memory-usage-of-all-docker-lxc-containers | |
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