API
-
- Posts: 11
- Joined: Thu Apr 29, 2010 3:07 pm
API
Hello,
I'm trying to use YourKit .NET 4.5 / 5 API but the profiler UI needs to be launched in order to start CPU profiling (Exception "to use the profiler API, run the application with YourKit Profiler")
I'd like to know if it's possible to use the API as a standalone, separately from the yourkit profiler application ? The purpose would be to profile an application calling methods of the API just to get snapshots and process it manually.
Thank you.
I'm trying to use YourKit .NET 4.5 / 5 API but the profiler UI needs to be launched in order to start CPU profiling (Exception "to use the profiler API, run the application with YourKit Profiler")
I'd like to know if it's possible to use the API as a standalone, separately from the yourkit profiler application ? The purpose would be to profile an application calling methods of the API just to get snapshots and process it manually.
Thank you.
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: API
Hello,
Perhaps I do not properly understand your question, so please provide more detail if my answer is not relevant.
You can redistribute files ynpagent.dll, YourKit.Profiler.Api.dll and YourKit.Profiler.Api.xml. Please find license in <Profiler Installation Directory>\license-redist.txt
To use the API, you need YourKit.Profiler.Api.dll (see Help: http://www.yourkit.com/docs/net50/help/api.jsp )
To enable profiling without installing the profiler in full, you need the profiler agent ynpagent.dll. You should register it and enable profiling for applications you need, as described here: http://www.yourkit.com/docs/net50/help/ ... manual.jsp
Best regards,
Anton
Perhaps I do not properly understand your question, so please provide more detail if my answer is not relevant.
You can redistribute files ynpagent.dll, YourKit.Profiler.Api.dll and YourKit.Profiler.Api.xml. Please find license in <Profiler Installation Directory>\license-redist.txt
To use the API, you need YourKit.Profiler.Api.dll (see Help: http://www.yourkit.com/docs/net50/help/api.jsp )
To enable profiling without installing the profiler in full, you need the profiler agent ynpagent.dll. You should register it and enable profiling for applications you need, as described here: http://www.yourkit.com/docs/net50/help/ ... manual.jsp
Best regards,
Anton
-
- Posts: 11
- Joined: Thu Apr 29, 2010 3:07 pm
Re: API
Hello,
Thanks for the answer.
I
- installed Yourkit Profiler 5
- registered ynpagent.dll : Regsvr32.exe <path>/ynpagent.dll
- set environment variables as described in the manual
but i still get an exception "To use the profiler API, run the application with YourKit Profiler" when i do a new Controller(); Did i miss something ?
Something else : Can snapshots be read only by yourkit profiler application or is it possible to extract information manually from it ?
Thanks for the answer.
I
- installed Yourkit Profiler 5
- registered ynpagent.dll : Regsvr32.exe <path>/ynpagent.dll
- set environment variables as described in the manual
but i still get an exception "To use the profiler API, run the application with YourKit Profiler" when i do a new Controller(); Did i miss something ?
Something else : Can snapshots be read only by yourkit profiler application or is it possible to extract information manually from it ?
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: API
Hello,
Do you have a 64-bit Windows?
If yes, please ensure you properly registered the DLL. For detail, please see http://www.yourkit.com/docs/net50/help/ ... remote.jsp (part "2. Register the DLL on the remote machine")
Run the following command (assume <profiler installation directory>\bin is the current directory):
profiler.exe -export snapshot_file_path target_directory_path
Note: target directory must exist.
Do you have a 64-bit Windows?
If yes, please ensure you properly registered the DLL. For detail, please see http://www.yourkit.com/docs/net50/help/ ... remote.jsp (part "2. Register the DLL on the remote machine")
Please consider offline export feature.Can snapshots be read only by yourkit profiler application or is it possible to extract information manually from it ?
Run the following command (assume <profiler installation directory>\bin is the current directory):
profiler.exe -export snapshot_file_path target_directory_path
Note: target directory must exist.
-
- Posts: 11
- Joined: Thu Apr 29, 2010 3:07 pm
Re: API
No, i have a 32-bit windows.Anton Katilin wrote: Hello,
Do you have a 64-bit Windows?
If yes, please ensure you properly registered the DLL. For detail, please see http://www.yourkit.com/docs/net50/help/ ... remote.jsp (part "2. Register the DLL on the remote machine")
Anton Katilin wrote: Please consider offline export feature.
Run the following command (assume <profiler installation directory>\bin is the current directory):
profiler.exe -export snapshot_file_path target_directory_path
Note: target directory must exist.
Thanks, works perfectly.
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: API
Which GUID have you specified?
Please ensure that you use ynpagent.dll and guid.txt from exactly the same version/build.
Please ensure that you use ynpagent.dll and guid.txt from exactly the same version/build.
-
- Posts: 11
- Joined: Thu Apr 29, 2010 3:07 pm
Re: API
Hello,
Another problem, i'm trying to profile a remote ASP.net application (set to work on Framework 2.0) but only standalone applications are detected.
There is no log corresponding to an ASP.net application in <user home directory>\.ynp\log\
The remote server runs on Windows 2003 server and IIS 6.0. Profiling works fine with standalone applications.
Do you know where the problem could come from ? I checked the documentation but couldn't find any solution.
Thank you.
Another problem, i'm trying to profile a remote ASP.net application (set to work on Framework 2.0) but only standalone applications are detected.
There is no log corresponding to an ASP.net application in <user home directory>\.ynp\log\
The remote server runs on Windows 2003 server and IIS 6.0. Profiling works fine with standalone applications.
Do you know where the problem could come from ? I checked the documentation but couldn't find any solution.
Thank you.
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: API
Hello,
Please ensure you use build 5.0.1:
http://www.yourkit.com/dotnet/download/
There were bug fixes since 5.0.0 which might affect.
Best regards,
Anton
Please ensure you use build 5.0.1:
http://www.yourkit.com/dotnet/download/
There were bug fixes since 5.0.0 which might affect.
Best regards,
Anton
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: API
Logs are created in service user's home directory.
Thus, it can be C:\WINDOWS\system32\config\systemprofile\.ynp or C:\Windows\ServiceProfiles\NetworkService\.ynp
If the location is different, please try searching for .ynp directory on local disk(s).
Thus, it can be C:\WINDOWS\system32\config\systemprofile\.ynp or C:\Windows\ServiceProfiles\NetworkService\.ynp
If the location is different, please try searching for .ynp directory on local disk(s).
Could you please clarify: do you connect to that remote machine via "File | Connect to Remote Application...", but it says no application is found?The remote server runs on Windows 2003 server and IIS 6.0. Profiling works fine with standalone applications.
-
- Posts: 11
- Joined: Thu Apr 29, 2010 3:07 pm
Re: API
- Logs for standalone applications running on the remote machine are created in C:\WINDOWS\system32\config\systemprofile\.ynp\log, yes.Anton Katilin wrote: Logs are created in service user's home directory.
Thus, it can be C:\WINDOWS\system32\config\systemprofile\.ynp or C:\Windows\ServiceProfiles\NetworkService\.ynp
If the location is different, please try searching for .ynp directory on local disk(s).
- In C:\Documents and Settings\<user directory>\.ynp\log there is nearly only logs about a "DllHost.exe".
- Nothing about ASP.net applications.
[/quote]Anton Katilin wrote: Could you please clarify: do you connect to that remote machine via "File | Connect to Remote Application...", but it says no application is found?
Yes i connect to the remote machine via "Connect to Remote Application". It search and find only standalone applications running on the remote machine.
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: API
Could you please also check C:\Documents and Settings\NetworkService\.ynp
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: API
That means that most likely profiler agent is not loaded.
Could you please check ynpagent.dll access rights. Does it have read and execute rights from the service user?
Could you please check ynpagent.dll access rights. Does it have read and execute rights from the service user?