commands.sh

perf

linux

Framework for Linux performance counter measurements.

More info →

Options (1)

-p, --pidboolean

Record the profile of an existing process into `perf.data`

Example: sudo perf record {{[-p|--pid]}} {{pid}}

Examples (5)

Display basic performance counter stats for a command

perf stat gcc hello.c

Display system-wide real-time performance counter profile

Run a command and record its profile into `perf.data`

Record the profile of an existing process into `perf.data`

sudo perf record [-p|--pid] pid

Read `perf.data` (created by `perf record`) and display the profile

sudo perf report
made by @shridhargupta | data from tldr-pages