Chapter 10. Getting started with perf


As a system administrator, you can use the perf tool to collect and analyze performance data of your system. The perf user-space tool interfaces with the kernel-based subsystem Performance Counters for Linux (PCL).

perf uses the Performance Monitoring Unit (PMU) to measure, record, and monitor a variety of hardware and software events. perf also supports tracepoints, kprobes, and uprobes.

10.1. Installing perf

You must install the perf user-space tool to start using the perf tool.

Procedure

  • Install the perf tool:

    # dnf install perf

10.2. Common perf commands

You can use the following commonly used perf commands to collect and analyze performance data.

perf stat
Provides overall statistics for common performance events, including instructions run and clock cycles used. Options allow for selection of events other than the default measurement events.
perf record
Records performance data into a file, perf.data, which can be later analyzed by using the perf report command.
perf report
Reads and displays the performance data from the perf.data file created by the perf record command.
perf list
Lists the events available on a particular machine. These events vary based on performance monitoring hardware and software configuration of the system.
perf top
Performs a similar function to the top utility. It generates and displays a performance counter profile in real time.
perf trace
Performs a similar function to the strace tool. It monitors the system calls used by a specified thread or process and all signals received by that application.
perf help
Displays a complete list of the perf commands.
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2026 Red Hat
Back to top