Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 626
Morph Avatar asked Jan 20 '26 05:01

Morph


1 Answers

'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.

like image 189
gaoithe Avatar answered Jan 21 '26 22:01

gaoithe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!