YourKit Manually Configure Target JVM for Remote Profiling: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(10 intermediate revisions by the same user not shown)
Line 6: Line 6:


* [[YourKit_Operations#Manually_Configure_Target_JVM_for_Remote_Profiling|YourKit Operations]]
* [[YourKit_Operations#Manually_Configure_Target_JVM_for_Remote_Profiling|YourKit Operations]]
* [[YourKit_Concepts#Remote_Profiling|YourKit Concepts]]


=Overview=
=Overview=
Line 11: Line 12:
Start the JVM with the following configuration:
Start the JVM with the following configuration:


  java ... -agentpath:<profiler-agent-path>[=options] ...
  java ... -agentpath:<''profiler-agent-path''>[=''options''] ...


Linux example
Linux example


  java ... -agentpath:<profiler directory>/bin/linux-x86-64/libyjpagent.so
  java ... -agentpath:<''profiler-directory''>/bin/linux-x86-64/libyjpagent.so
 
To check that Java can load the profiler agent, run:
 
java -agentpath:<''profiler-agent-path''>=help
 
Once the target VM has been instrumented and it is listening on a profiler-dedicated port, the profiler UI can connect to it over a variety of means (directly, by [[YourKit_Operations#Connect_to_a_Remote_Instrumented_JVM_via_SSH|initiating a SSH connection from the profiler UI]], by [[YourKit_Operations#Connect_to_a_Remote_Instrumented_JVM_via_an_SSH_Tunnel|using a SSH tunnel]], etc.)
 
=Options=
 
Example:
 
java ... -agentpath:<''profiler-agent-path''>=port=8080,alloceach=10,allocsizelimit=4096 ...
 
Startup options: {{External|https://www.yourkit.com/docs/java/help/startup_options.jsp}}
 
==port==
 
The port the profiler agent listens on for communication with the profiler UI. By default, the port is chosen automatically, starting with 10001. The first port free in the 10001..10010 range is used.
 
==dir==
 
dir=<''dir-for-snapshots-absolute-path''>
 
A custom directory for snapshots. The default value, if not set is $USER/Snapshots.
 
Note the user running the JVM must have write permission into that directory.
 
==telemetrylimit==
 
Configures the size of the [[YourKit_Concepts#Profiler_Agent_Buffer|profiler agent's buffer]].
 
==disablealloc==
 
See [[YourKit_Concepts#Object_Allocation_Recording|Object Allocation Recording]].
 
==disableall==
 
See [[YourKit_Concepts#Object_Allocation_Recording|Object Allocation Recording]].

Latest revision as of 01:38, 12 June 2018

External

Internal

Overview

Start the JVM with the following configuration:

java ... -agentpath:<profiler-agent-path>[=options] ...

Linux example

java ... -agentpath:<profiler-directory>/bin/linux-x86-64/libyjpagent.so

To check that Java can load the profiler agent, run:

java -agentpath:<profiler-agent-path>=help

Once the target VM has been instrumented and it is listening on a profiler-dedicated port, the profiler UI can connect to it over a variety of means (directly, by initiating a SSH connection from the profiler UI, by using a SSH tunnel, etc.)

Options

Example:

java ... -agentpath:<profiler-agent-path>=port=8080,alloceach=10,allocsizelimit=4096 ...

Startup options:

https://www.yourkit.com/docs/java/help/startup_options.jsp

port

The port the profiler agent listens on for communication with the profiler UI. By default, the port is chosen automatically, starting with 10001. The first port free in the 10001..10010 range is used.

dir

dir=<dir-for-snapshots-absolute-path>

A custom directory for snapshots. The default value, if not set is $USER/Snapshots.

Note the user running the JVM must have write permission into that directory.

telemetrylimit

Configures the size of the profiler agent's buffer.

disablealloc

See Object Allocation Recording.

disableall

See Object Allocation Recording.