Morph
Morph

Reputation: 173

How can I show only the allocated resources in Docker container?

Just a simple question I googled for a while but found no answer: How can I display only the allocated resources (cpu cores / memory) inside of a Docker container using top / htop and so on?

Kind regards and a nice weekend :)

~ Morph

Upvotes: 3

Views: 2399

Answers (1)

gaoithe
gaoithe

Reputation: 4368

'docker stats' shows cpu/mem/net io usage.

https://docs.docker.com/v1.8/reference/commandline/stats/

'docker ps -s' shows size of containers.

Docker - How to analyze a container's disk usage?

Memory and disk are shared between docker containers so you can expect to see memory and disk use inside a container to show shared resource size + individual container resource size.

Upvotes: 4

Related Questions