Enabling the YourKit Profiler with vFabric tc Server (2000743)
The YourKit profiler can be used to profile Java applications and Web applications running in vFabric tc Server.
This article provides steps to configure YourKit to profile a Web application deployed in vFabric tc Server.
Note: This article assumes that YourKit is licensed and installed on the target system.
Note: This article assumes that YourKit is installed in the /opt/yjp-9.5.4 directory. The exact installation path and version number may vary based on your YourKit installation.
To integrate the YourKit profiler with a tc Server instance:
- Open the bin/setenv.sh file for the tc Server instance using a text editor.
- Add a shell variable called YJP_HOME and set its value to the installation directory of YourKit.
- Add or edit (if it exists already) the shell variable JAVA_AGENTS, add the argument -agentpath, and point it to the location of the libyjpagent library file for your operating system and architecture.
It is also recommended to pass the disablestacktelemetry , disableexceptiontelemetry , builtinprobes=none , and delay=10000 options to the YourKit profiler. These options limit the performance impact of the profiler on tc Server and applications deployed to it.
In Linux 32bit Java
In Linux 64bit Java
- Verify the JAVA_OPTS variable and ensure that it contains a reference to the JAVA_AGENTS variable. Most newer versions of tc Server have this by default.
JAVA_OPTS="... $JAVA_AGENTS ..."
- Save and close the bin/setenv.sh file.
- Restart the tc Server instance. The first line of the logs/catalina.out file should appear similar to:
[YourKit Java Profiler 9.5.4] Loaded. Log file: /home/user/.yjp/log/7191.log
This indicates that the YourKit profiler has been enabled for the tc Server instance. If you do not see this line in the log file, check the changes made to the bin/setenv.sh file.
- Start the YourKit application. The Monitor Local Applications panel should now contain an entry for the tc Server instance. It is usually labeled as Tomcat.
- Click the link to start profiling an application deployed to the tc Server instance.
For more information, see Enabling profiling manually.
Note: The preceding link was correct as of February 23, 2012. If you find the link is broken, provide feedback and a VMware employee will update the link.