Skip to content

Instantly share code, notes, and snippets.

Stu Thompson stuinzuri

Block or report user

Report or block stuinzuri

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pmoust
pmoust / container-memory.sh
Created May 28, 2014
List memory usage per Docker container
View container-memory.sh
#!/bin/sh
# Lists memory usage per Docker container
#
# FORMAT:
#
# IMAGE:TAG MEMORY_USAGE CONTAINER ID
for i in `find /sys/fs/cgroup/memory/docker/* -type d`; do
CONTAINER_ID=`echo $i | awk -F'/' '{print $7}'`
MEMORY_USAGE=$((`cat $i/memory.usage_in_bytes`/1024/1024))
You can’t perform that action at this time.