Fully featured low overhead profiler for Java EE and Java SE platforms.
Easy to use performance and memory .NET profiler for Windows and Linux.
Performance monitoring and profiling of Jenkins, Bamboo, TeamCity, Gradle, Maven, Ant and JUnit.

Manually enable profiling of local applications

The following describes how to manually enable profiling of local applications.

Note that in most cases, it is profile local applications using the profiler UI. Should you need to profile remote applications, read here.

1. Make sure the profiler is installed

On Windows the profiler installer not only creates necessary files, but also registers the profiler agent DLL.

2. Set up a profiling environment

Specify the following environment variables for the process you want to profile:

Windows

Variable Value
COR_PROFILER {E5A4ADC4-C749-400D-B066-6AC8C1D3790A}
COR_ENABLE_PROFILING 1
CORECLR_PROFILER {E5A4ADC4-C749-400D-B066-6AC8C1D3790A}
CORECLR_ENABLE_PROFILING 1

Linux (glibc)

Variable Value
CORECLR_PROFILER {E5A4ADC4-C749-400D-B066-6AC8C1D3790A}
CORECLR_ENABLE_PROFILING 1
CORECLR_PROFILER_PATH_64 <profiler directory>/bin/linux-x86-64/libynpagent.so

Alpine Linux (musl)

Variable Value
CORECLR_PROFILER {E5A4ADC4-C749-400D-B066-6AC8C1D3790A}
CORECLR_ENABLE_PROFILING 1
CORECLR_PROFILER_PATH_64 <profiler directory>/bin/linux-musl-x86-64/libynpagent.so

Pay attention that GUID starts with { and ends with }.

You can change profiler startup options by setting YNP_STARTUP_OPTIONS variable.

Special notes on profiling a Windows service can be found here.

3. Run the application

If profiling was properly enabled, the profiled application should start with the profiler agent.

To ensure it has started with the profiler, check whether log file has been created:
<user home>/.ynp/log/<session name>-<PID>.log

4. Connect to the application

The profiled application should appear on the Welcome screen of the profiler. If it does not, please refer to profiling troubleshooting.

Connect to the profiled application to obtain profiling results.

YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By browsing our website, you consent to our use of cookies and other tracking technologies in accordance with the Privacy Policy.