Cart 0
No products in the cart.


How to use Perf Command explained through practical examples ?

In this tutorial, we covered how to use Perf command, provided practical examples and explained the syntax. With this knowledge, users can now measure CPU, memory and other hardware and software performance metrics. This can help users identify performance bottlenecks and correct issues.

 

How to fix Perf Command Not Found in Linux ?

The Perf command is a performance monitoring tool for Linux systems that can be used to collect and analyze data about the system’s performance. The command is commonly used to identify potential performance issues and bottlenecks.

Unfortunately, if you try to run the Perf command on your Linux system and get the error “Perf command not found”, it can be a bit of a headache to figure out how to resolve the issue.

Before you begin, make sure that you have root access to your Linux system.

 

1.  Check if the perf package is installed:

On Ubuntu / Debian:

$ sudo apt install linux-tools-common linux-tools-$(uname -r)

On RedHat / CentOS:

$ sudo yum install perf

 

2. Download package manually

If you are using an older version of Linux, you may need to install the package manually. Download the source code of the perf package from the official website and extract the archive.

 

3. Install Package

Change the working directory to the extracted folder and run the following commands:

$ make
$ sudo make install

 

4.  If the perf package is already installed and the Perf command is still not found, it may be a problem with the PATH environment variable.

To fix this, edit the ~/.bashrc file and add the following line:

export PATH=$PATH:/usr/local/bin

 

5. Reload .bashrc file

Finally, reload the ~/.bashrc file by running the command:

$ source ~/.bashrc

Now the Perf command should be accessible from the terminal.

 



icon

Sign up to Newsletter

...and receive a free support ticket.