Este contenido no está disponible en el idioma seleccionado.
Chapter 18. Getting started with perf
As a system administrator, you can use the perf tool to collect and analyze performance data of your system.
18.1. Introduction to perf Copiar enlaceEnlace copiado en el portapapeles!
The perf user-space tool interfaces with the kernel-based subsystem Performance Counters for Linux (PCL). perf is a powerful tool that 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.
18.2. Installing perf Copiar enlaceEnlace copiado en el portapapeles!
This procedure installs the perf user-space tool.
Procedure
Install the
perftool:dnf install perf
# dnf install perfCopy to Clipboard Copied! Toggle word wrap Toggle overflow
18.3. Common perf commands Copiar enlaceEnlace copiado en el portapapeles!
perf stat- This command provides overall statistics for common performance events, including instructions executed and clock cycles consumed. Options allow for selection of events other than the default measurement events.
perf record-
This command records performance data into a file,
perf.data, which can be later analyzed using theperf reportcommand. perf report-
This command reads and displays the performance data from the
perf.datafile created byperf record. perf list- This command lists the events available on a particular machine. These events will vary based on performance monitoring hardware and software configuration of the system.
perf top-
This command performs a similar function to the
toputility. It generates and displays a performance counter profile in realtime. perf trace-
This command performs a similar function to the
stracetool. It monitors the system calls used by a specified thread or process and all signals received by that application. perf help-
This command displays a complete list of
perfcommands.