Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

How do I install the perf monitoring tool?

share|improve this question
What exactly do you want to monitor? – ddeimeke Jun 23 '11 at 7:31
@ddeimeke that seems like an irrelevant question. – dbliss Oct 16 at 17:20

6 Answers 6

up vote 23 down vote accepted

The perf utility can be found in the linux-tools package.

share|improve this answer
You also probably want to install linux-tools-generic since it includes kernel modules that perf interacts with. – Allen Sep 6 '14 at 21:59

Make sure you are installing this tool for the right Kernel release. If you just type:

sudo apt-get install linux-tools

It will install it for the latest Linux release in your machine and in case you are booting a previous version (say for stability reason), it will err. In my case it installed for .45 instead of .43 and I had to use the following command to install it:

sudo apt-get install linux-tools-

You can find your Kernel release by typing : uname -r

To make sure it's working right you can try this: perf record /bin/ls

Just in case you are going to install Zoom tool, you need to have Perf installed for being able to use all its utilities.

share|improve this answer

On Ubuntu 14.04 I had to install three packages:

apt-get install linux-tools-common linux-tools-generic linux-tools-`uname -r`
share|improve this answer
When I tried it, just using sudo apt-get install linux-tools-common linux-tools-generic (skipping the part, which depends on the kernel version) was sufficient. – Martin R. Jun 29 at 22:17
@Martin-R linux-tools-generic always points at the tools for the most up to date kernel version. When running an older kernel (e.g. a server with a couple months uptime) if you want perf without rebooting to the newer kernel you have to explicitly install the tools paired with that kernel (hence the uname -r shell expansion). – notpeter Jun 30 at 6:09

In 14.04, the linux-tools package does not exist unqualified:

$ 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:
You should explicitly select one to install.

E: Package 'linux-tools' has no installation candidate

Instead, you can install one of the packages listed, depending upon the kernel you have installed. Most users will want linux-tools-generic.

share|improve this answer

I installed Linux 3.17.2 on my machine and tried

sudo apt-get install linux-tools-3.17.2

it showed that linux-tools is not present. In this case, download the required linux kernel version, go to linux->tools->perf :

cd linux/tools/perf

and then run make command :


and then run make install command:

make install

and then reboot. You just installed perf manually.

share|improve this answer

Running the following two commands will do it!

sudo apt-get install linux-tools-common 
sudo apt-get install linux-tools
share|improve this answer
Doesn't work. I'm using 12.04. I get the error perf not found for kernel 3.2.0-60. You may need to install linux-tools-3.2.0-60-generic – Rishi Dua Mar 10 '14 at 18:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.