使用 perf 从主机分析容器内的进程
我在 CentOS 7 上运行 docker 容器。 如果在主机节点上的 PID 上运行 perf,我会收到有关未找到符号的错误。这似乎是因为它在主机节点的文件系统上查找相对于容器的文件路径。
如果我将所需的二进制文件复制到主机节点上的预期路径,则 perf 从主机节点工作,因为它可以找到与容器中的二进制文件匹配的相同符号(尽管不可能在主机上创建等效路径来匹配)全部)。
是否有更好/更干净的方法来针对 CentOS 7 主机的容器中运行的进程运行 perf?
I am running docker containers on CentOS 7.
If run perf on the PID on the host node I get an error about symbols not being found. This seems to be because it looks for the path of the file relative to the container but on the host node's filesystem.
If I copy the required binary files to the expected path on the host node then perf works from the host node since it can find the same symbols that match the binary files in the container (though it's not possible to create equivalent paths on host to match all).
Is there a better/cleaner way to run perf against a process running in a container with a CentOS 7 host?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论