Docker Container CPU usage Monitoring

眉间皱痕 提交于 2021-02-11 17:55:38

问题


As per the documentation of docker. We can get CPU usage of docker container with docker stats command. The column CPU % will give the percentage of the host’s CPU the container is using.

Let say I limit the container to use 50% of hosts single CPU. I can specify 50% single CPU core limit by --cpus=0.5 option as per https://docs.docker.com/config/containers/resource_constraints/

How can we get the CPU% usage of container out of allowed CPU core by any docker command? E.g. Out of 50% Single CPU core, 99% is used.

Is there any way to get it with cadvisor or prometheus?

来源:https://stackoverflow.com/questions/63813491/docker-container-cpu-usage-monitoring

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!