is it possible to run linux perf tool inside docker container

Deadly 提交于 2019-12-06 04:35:56

问题


I tried giving the below command from container and found the below issue, may be because of "-moby" kernel version. Can't we get a docker image without word "-moby" coming in linux kernel version.

I tried installing linux perf tool on VM having ubuntu and it worked.

#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>

回答1:


just do

apt-get install linux-tools-generic

and make a symbolic link to /usr/bin/perf. (in my case):

ln -s /usr/lib/linux-tools/3.13.0-141-generic/perf /usr/bin/perf

it worked for me!



来源:https://stackoverflow.com/questions/46674444/is-it-possible-to-run-linux-perf-tool-inside-docker-container

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!