In this lab, I will run sysdig to monitor containers stats.
The sysdig will running in a container.
1. Runngin the sysdig in the conainer
[peter@peter-KVM ~]$ eval $(docker-machine env host1) [peter@peter-KVM ~ [host1]]$ [peter@peter-KVM ~ [host1]]$ docker container run -itd --rm --name sysdig --privileged=true \ > --volume=/var/run/docker.sock:/host/var/run/docker.sock \ > --volume=/dev:/host/dev \ > --volume=/proc:/host/proc:ro \ > --volume=/boot:/host/boot:ro \ > --volume=/lib/modules:/host/lib/modules:ro \ > --volume=/usr:/host/usr:ro \ > sysdig/sysdig 94c2816e995024539f102f928a991b934c9ba79d497d984d44502c27cd421bc0 [peter@peter-KVM ~ [host1]]$
2. Into the the container
[peter@peter-KVM ~ [host1]]$ docker container exec -it sysdig
3. Running this command "csysdig". We can use F2 to selet and use "q" to quit and then "exit" to logout this container.
root@94c2816e9950:/# csysdig
最初發表 / 最後更新: 2019.06.20 / 2019.06.20
0 comments:
張貼留言