[英]is it possible to run linux perf tool inside docker container
我尝试从容器中给出以下命令,发现以下问题,可能是因为“-moby”内核版本。 我们不能在 linux 内核版本中获得一个没有“-moby”字样的 docker 镜像。
我尝试在具有 ubuntu 的 VM 上安装 linux perf 工具并且它工作正常。
#docker run -t -i ubuntu:14.04 /bin/bash
root@214daea94f4f:/# perf
WARNING: perf not found for kernel 4.9.41
You may need to install the following packages for this specific kernel:
linux-tools-4.9.41-moby
linux-cloud-tools-4.9.41-moby
You may also want to install one of the following packages to keep up to date:
linux-tools-moby-lts-<series>
linux-cloud-tools-moby-lts-<series>
就做
apt-get install linux-tools-generic
并建立到 /usr/bin/perf 的符号链接。 (在我的情况下):
ln -s /usr/lib/linux-tools/3.13.0-141-generic/perf /usr/bin/perf
它对我有用!
在 debian buster-slim 中,我使用了:
apt-get install linux-perf
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.