Docker Docker 监控工具

Docker 监控工具

[root@localhost ~]# docker pull docker.io/google/cadvisor
Using default tag: latest
Trying to pull repository docker.io/google/cadvisor ... 
latest: Pulling from docker.io/google/cadvisor
Digest: sha256:9e347affc725efd3bfe95aa69362cf833aa810f84e6cb9eed1cb65c35216632a
[root@localhost ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
centos68 ssh aa5a446c8f42 36 minutes ago 725.3 MB
centos68 latest b69741841e36 39 minutes ago 643.5 MB
docker.io/centos latest ff426288ea90 3 weeks ago 207.2 MB
docker.io/google/cadvisor latest 75f88e3ec333 8 weeks ago 62.18 MB
[root@localhost ~]# docker run -itd -p 8080:8080 docker.io/google/cadvisor
f2dbab0058f628078add0b1076019d6a22aa0f49e3c22a50a673798bbb64754c
[root@localhost ~]# docker ps 
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f2dbab0058f6 docker.io/google/cadvisor "/usr/bin/cadvisor -l" 10 seconds ago Up 9 seconds 0.0.0.0:8080->8080/tcp admiring_tesla
f8df7c178b2e centos68:ssh "/bin/sh -c 'ip addr " 33 minutes ago Up 33 minutes 22/tcp compassionate_stonebraker

# 浏览器访问主机 8080端口

# 点击 Docker Containers 报错 暂未解决

failed to get docker info: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

[root@localhost ~]# docker images
REPOSITORY                  TAG                 IMAGE ID            CREATED             SIZE
centos68                    ssh                 aa5a446c8f42        50 minutes ago      725.3 MB
centos68                    latest              b69741841e36        53 minutes ago      643.5 MB
docker.io/centos            latest              ff426288ea90        3 weeks ago         207.2 MB
docker.io/google/cadvisor   latest              75f88e3ec333        8 weeks ago         62.18 MB
[root@localhost ~]# ps -ef | grep docker
root      31688      1  0 06:33 ?        00:03:36 /usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/dockerdocker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd --userland-proxy-path=/usr/libexec/docker/docker-proxy-current --selinux-enabled --log-driver=journald --signature-verification=false --storage-opt dm.basesize=20G -b=br0
root      31694  31688  0 06:33 ?        00:00:05 /usr/bin/docker-containerd-current -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --shim docker-containerd-shim --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --runtime docker-runc --runtime-args --systemd-cgroup=true
root      40057  31694  0 16:40 ?        00:00:00 /usr/bin/docker-containerd-shim-current f8df7c178b2e39142c7d02ca7b69362cfeef8d1232f8f043fe3de421a42a9c11 /var/run/docker/libcontainerd/f8df7c178b2e39142c7d02ca7b69362cfeef8d1232f8f043fe3de421a42a9c11 /usr/libexec/docker/docker-runc-current
root      40244  31688  0 17:13 ?        00:00:03 /usr/libexec/docker/docker-proxy-current -proto tcp -host-ip 0.0.0.0 -host-port 8080 -container-ip 192.168.1.3 -container-port 8080
root      40249  31694  0 17:13 ?        00:00:00 /usr/bin/docker-containerd-shim-current f2dbab0058f628078add0b1076019d6a22aa0f49e3c22a50a673798bbb64754c /var/run/docker/libcontainerd/f2dbab0058f628078add0b1076019d6a22aa0f49e3c22a50a673798bbb64754c /usr/libexec/docker/docker-runc-current
root      40383  33321  0 17:25 pts/1    00:00:00 grep --color=auto docker
[root@localhost ~]# ps -ef | grep sock
root 31694 31688 0 06:33 ? 00:00:05 /usr/bin/docker-containerd-current -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --shim docker-containerd-shim --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --runtime docker-runc --runtime-args --systemd-cgroup=true
root 40393 33321 0 17:33 pts/1 00:00:00 grep --color=auto sock

 

发表评论

zh_CNChinese
zh_CNChinese