Wednesday, December 15, 2010

Profiling with YourKit

To install yourKit, download the bz2 and untar it -
tar xjvf yjp-9.0.7-linux.tar.bz2

If you want to profile a web application running on say Tomcat,
1. You should upload the yourkit to one of the accessible folders on the server.
2. your catalina.sh or setenv.sh should have:
# enable YourKit java profiling.
CATALINA_OPTS_YJP="-agentpath:/home/tom8080/yjp-9.0.9/bin/linux-x86-64/libyjpagent.so"
When you start the application, in the logs yjp will log a line saying on which port it is listening. Use that port when connecting from the local box UI.

Start the application

Connect and then start profiling. End and save to get the snapshot.

No comments:

Post a Comment