Docker Stats with Containers Names

There is a way to get container's names out of `docker stats`, and Docker Humble makes it ridicolously easy for you.

Docker Stats with Containers Names

When running plenty of containers you may wonder which one is killing your server memory or CPU.
Then your first step would be to run:

docker stats

That is the basic first step to know what’s going on… too bad it shows only container’s IDs which - if you ask me - is not very useful.

Today I resolved to see container’s names so I googled my problem only to find out that you can actually configure which format you want docker stats to speak the results:

docker stats $(docker ps --format={{.Names}})

Now we are getting somewhere! I thought.

One second later I realized I will never remember it so I added it as a utility to my Docker helper project Humble:

humble do stats

(If you are currently using Docker Humble please remember to update it: humble update-cli)