3 ms·
I kinda «never» use strace, even after learning about it «annoyingly late». I find myself often in a container which has zero tools / no access to run strace/pe
by pletnes 4y ago
I kinda «never» use strace, even after learning about it «annoyingly late». I find myself often in a container which has zero tools / no access to run strace/perf/… or on a win10/mac laptop with no strace. Would be great if someone made a general solution to this «too locked down container» problem.
- blueflow 4y agostrace is useless for containers, you cant attach across container boundaries, and usually you can't install it into the container, either. Which is really sad because its such an useful tool.
- goombacloud 4y agoNot really, you can start it from the host and trace any container process you like. On Linux the processes are in one large tree and the host has IDs for all container processes. Inside the container you may have different IDs if a pid namespace is used but from the outside these processes are in the host's process tree and have regular IDs.
- crdotson 4y agoAnd “pstree -n PID” can help a lot with this.
- goombacloud 4y agoYou don't need to be in the container and trace from there, you can run strace outside of the container (you just have to make sure that the process ID you use is the one as seen from the host).
- pletnes 4y agoNot in managed kubernetes / container service cloud thing. And on docker desktop on mac/win it’s at least some hassle to get into that hidden VM (but let me know if I’m wrong) On linux-no-vm-bs it’s fine, sure!
- goombacloud 4y agoYou can spawn a (priv) container with the host PID namespace and then trace from there.