Docker has a feature to easily get the resource usage for the containers that it manages. The following recipe shows you how to use it.
Getting container resource usage using the stats feature
Getting ready
You will need a Docker host that can be accessed via the Docker client. Also, start a few containers to get some stats.
How to do it...
Follow these steps:
- Run the following command to get stats from one or more containers:
$ docker stats [OPTIONS] [CONTAINERS]
For example, if we have two containers with the names some-mysql and backstabbing_turing, then run...