從零開始學習docker(二十二)容器監控

docker ps

能夠知道後臺有哪些容器在運行。git

docker ps -a

能夠知道後臺有哪些容器在運行。包括退出的容器。docker

docker top CONTAINER_ID

能夠知道container中的一些進程。相似於系統中的top命令。curl

docker stats

實時打印每一個容器在系統的資源佔用狀況。包括CPU,內存等。工具

圖形化界面監控工具

weavescope安裝:url

sudo curl -L git.io/scope -o /usr/local/bin/scope
chmod a+x /usr/local/bin/scope

運行scope launch便可。spa

若是要監聽多個docker host。code

那麼運行scope launch ip1 ip2 便可。在ip2的機器上也執行這個命令。進程

相關文章
相關標籤/搜索