How to install "perf" monitoring tool?

How do I install the perf monitoring tool?


Solution 1:

On Ubuntu I had to install three packages:

apt-get install linux-tools-common linux-tools-generic linux-tools-`uname -r`

Solution 2:

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