not*_*ter 93
在 Ubuntu 上,我必须安装三个软件包:
apt-get install linux-tools-common linux-tools-generic linux-tools-`uname -r`
Run Code Online (Sandbox Code Playgroud)
Jam*_*dge 88
该perf实用程序可以在linux-tools
包中找到。
Mon*_*lal 34
确保为正确的内核版本安装此工具。如果你只是输入:
sudo apt-get install linux-tools
它将在您的机器中为最新的 Linux 版本安装它,如果您正在启动以前的版本(例如出于稳定性原因),它会出错。在我的情况下,它为 .45 而不是 .43 安装,我必须使用以下命令来安装它:
sudo apt-get install linux-tools-3.2.0.43
您可以通过键入以下内容找到您的内核版本:
uname -r
为了确保它正常工作,您可以尝试以下操作:
perf record /bin/ls
以防万一您要安装Zoom 工具,您需要安装 Perf 才能使用其所有实用程序。
小智 22
无论内核版本如何,都要获取最新版本的 perf(perf 版本与内核版本无关):
git clone --depth 1 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
cd linux/tools/perf
make
cp perf /usr/bin
Run Code Online (Sandbox Code Playgroud)
perf --version 检查当前版本
Ale*_*huk 11
sudo apt install linux-tools-common
Run Code Online (Sandbox Code Playgroud)
https://packages.ubuntu.com/eoan/linux-tools-common
sudo apt install linux-perf
Run Code Online (Sandbox Code Playgroud)
https://packages.debian.org/buster/linux-perf
在 14.04 中,linux-tools不存在不合格的包:
$ sudo apt-get install linux-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package linux-tools is a virtual package provided by:
linux-tools-virtual 3.13.0.36.43
linux-tools-lowlatency 3.13.0.36.43
linux-tools-generic-lts-trusty 3.13.0.36.43
linux-tools-generic-lts-saucy 3.13.0.36.43
linux-tools-generic 3.13.0.36.43
You should explicitly select one to install.
E: Package 'linux-tools' has no installation candidate
Run Code Online (Sandbox Code Playgroud)
相反,您可以安装列出的软件包之一,具体取决于您安装的内核。大多数用户会想要linux-tools-generic.
小智 5
在 ubuntu 上,“perf”是一个 shell 脚本,它调用内核特定的 perf 二进制文件。
但这实际上并不是必需的,perf 是兼容的。只需从 /usr/bin 中删除包装器并将任何性能二进制文件从 ./lib/linux-tools* 复制到其中。
| 归档时间: |
|
| 查看次数: |
185109 次 |
| 最近记录: |