Skip to content

Instantly share code, notes, and snippets.

@petermodzelewski
Created February 12, 2015 20:09
Show Gist options
  • Save petermodzelewski/1567a711a9f26a5764a7 to your computer and use it in GitHub Desktop.
Save petermodzelewski/1567a711a9f26a5764a7 to your computer and use it in GitHub Desktop.
Stats of running containers started by docker-compose in docker 1.5
sudo docker-compose ps | grep Up | awk '{print $1}' | tr "\\n" " " | xargs --no-run-if-empty sudo docker stats
@dmowcomber
Copy link

alternatively you could use just the docker command like this to get the same output

docker stats --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.MemPerc}}\t{{.NetIO}}\t{{.BlockIO}}\t{{.PIDs}}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment