I am using Docker to run some containerized apps. I am interested in measuring how much resources they consume (as far as regarding CPU and Memory usage).
Is there any way to measure the resources consumed by Docker containers like RAM & CPU usage?
Thank you.
You can get this from
docker stats
e.g:Also, you can read resource metrics directly from cgroups. See example below (I am running on
Debian Jessie
anddocker 1.2
)Update: See @Adrian Mouat's answer below as docker now supports
docker stats
!There isn't a way to do this that's built into docker in the current version. Future versions will support this via an api or plugin.
It does look like there's an lxc project that you should be able to use to track CPU and Memory.