rajarajan2809
rajarajan2809

Reputation: 338

perf on running process in Linux

For profiling, we can use perf in Linux. But all examples showing only executables.

In CentOS, is it possible to run perf tool on running process or daemon?

Upvotes: 5

Views: 5612

Answers (1)

gbajson
gbajson

Reputation: 1740

perf record and perf stat support the -p option which you can use to specify the PID of the process to attach to. For example , the command:

perf stat -p 3129

tells perf stat to attach to the currently running process with PID 3129.

Upvotes: 14

Related Questions