Collecting Performance Data on Linux using PerfCollect and PerfView.

In a previous post on Linux Tracing I described how it was possible to collect traces of CPU samples on Linux machines and view them with PerfView.

Basically there is a Bash script called PerfCollect that turns on the Linux kernel's CPU sampling.   You also need to set some environment variables if you are running .NET Core Runtime scenarios so you get the names of the .NET methods.     All the information in that previous post is still relevant, but we have added some new capabilities.   In particular we have added the ability to get at EventSource Events.

Because this is an area of active development, the instructions embedded in PerfView itself can get out of date.   Thus we have put the PerfCollect Instructions up on GitHub so we can keep them up to date easily.   The main take-away of this blog is that you should use the instruction from the PerfCollect Instructions link if you are trying to collect performance data on Linux.

Vance