如何对docker容器使用strace进行debug?

命令如下:

alias cstrace='cstrace(){PID=$(cpid "$1");shift;sudo strace -tt -T -f -s 200 -p "${PID}" $@};cstrace $@'

使用方法

假设docker容器名叫test

cstrace test

猜你喜欢

转载自www.cnblogs.com/futuretea/p/11996952.html