Pivotal Knowledge Base


Enabling the YourKit Profiler with vFabric tc Server (2000743)

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:
  1. Open the bin/setenv.sh file for the tc Server instance using a text editor.
  2. Add a shell variable called YJP_HOME and set its value to the installation directory of YourKit.

    For example:


  3. 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.

    For example:

    In Linux 32bit Java


    In Linux 64bit Java


  4. 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.

    For example:

    JAVA_OPTS="... $JAVA_AGENTS ..."

  5. Save and close the bin/setenv.sh file.
  6. 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.
  7. 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. 
  8. 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.
©VMware 2013


Powered by Zendesk