# on Ubuntucurl-shttps://s3.amazonaws.com/download.draios.com/DRAIOS-GPG-KEY.public|apt-keyadd-curl-s-o/etc/apt/sources.list.d/draios.listhttp://download.draios.com/stable/deb/draios.listapt-getupdateapt-get-yinstalllinux-headers-$(uname-r)apt-get-yinstallsysdig# on REHLrpm--importhttps://s3.amazonaws.com/download.draios.com/DRAIOS-GPG-KEY.publiccurl-s-o/etc/yum.repos.d/draios.repohttp://download.draios.com/stable/rpm/draios.reporpm-ihttp://mirror.us.leaseweb.net/epel/6/i386/epel-release-6-8.noarch.rpmyum-yinstallkernel-devel-$(uname-r)yum-yinstallsysdig# on MacOSbrewinstallsysdig
示例
# Refer https://www.sysdig.org/wiki/sysdig-examples/.# View the top network connectionssudosysdig-pc-ctopconns# View the top network connections inside the wordpress1 containersudosysdig-pc-ctopconnscontainer.name=wordpress1# Show the network data exchanged with the host 192.168.0.1sudosysdigfd.ip=192.168.0.1sudosysdig-s2000-A-cecho_fdsfd.cip=192.168.0.1# List all the incoming connections that are not served by apache.sudosysdig-p"%proc.name %fd.name""evt.type=accept and proc.name!=httpd"# View the CPU/Network/IO usage of the processes running inside the container.sudosysdig-pc-ctopprocs_cpucontainer.id=2e854c4525b8sudosysdig-pc-ctopprocs_netcontainer.id=2e854c4525b8sudosysdig-pc-ctopfiles_bytescontainer.id=2e854c4525b8# See the files where apache spends the most time doing I/Osudosysdig-ctopfiles_timeproc.name=httpd# Show all the interactive commands executed inside a given container.sudosysdig-pc-cspy_users# Show every time a file is opened under /etc.sudosysdigevt.type=openandfd.name# View the list of processes with container contextsudocsysdig-pc