Docker Stats with Containers Names

how to show containers names with docker stats

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.

docker stats output

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.

humble do stats output

One second later I realised I will never remember it so I added it as 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)