New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker top for host level metrics #8875
Comments
Isn't this largely solved (minus the cli-aspect) by cadvisor? |
Kind of. Thats a lot of infrastructure to run just to debug a host though.
|
I'm working on something similar -- in exploration phase so no proposals yet. I'm considering adding a Still shaping the idea here. Is this close to what you're thinking? |
kind of. The problem we have right now is that we are using docker for development environments with a tool we help maintain called spoon. Sometimes these development environments can run out of control and its really difficult to figure out which container is causing hte problem when there are 40+ running with similar processes. So what I would like to do is aggregate the top information from /containers//top and have an endpoint at /containers/top which does that. This way I can easily see which container is using all the memory on a host or all the cpu. |
So this does what I am asking... docker ps | cut -d' ' -f 1 | grep -v CONTAINER | xargs -I{} /bin/sh -c 'docker top {} aux | tail -n +2' |
This is proposing to add per container metrics, based on cgroups, as well as docker engine metrics about Docker's internal health and job management. This will either solve or at least provide a basis to address moby#8875, moby#1091, moby#4530, moby#5473, moby#8842 Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
This is proposing to add per container metrics, based on cgroups, as well as docker engine metrics about Docker's internal health and job management. This will either solve or at least provide a basis to address moby#8875, moby#1091, moby#4530, moby#5473, moby#8842 Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
With #9984 merged you can get an aggregate view of how much cpu, memory, io, etc containers are running by doing: docker stats insurgency1 insurgency2 insurgency3 minecraft-family redis
CONTAINER CPU % MEM USAGE/LIMIT MEM % NET I/O
insurgency1 3.62% 244.4 MB/2.099 GB 11.64% 0 B/0 B
insurgency2 4.65% 135.6 MB/2.099 GB 6.46% 0 B/0 B
insurgency3 3.65% 79.18 MB/2.099 GB 3.77% 0 B/0 B
minecraft-family 14.13% 408.6 MB/2.099 GB 19.47% 0 B/0 B
redis 0.17% 6.558 MB/67.11 MB 9.77% 648 B/648 B |
So I was wondering what the community thought about the idea of docker top returning the top metrics for all running containers on a host? This would be a great way to debug issues where a docker host is running out of memory and you want to find the offending container.
Seems like the first place to start would be to have an api endpoint that returns the data then implement it for the CLI. The endpoint could just be /containers/top.
Thoughts?
The text was updated successfully, but these errors were encountered: