Attaching To JVMs


  This dialog is shown when attaching to a locally running JVM or a JVM running on a remote machine with SSH access.
  After the running JVMs have been discovered, they are displayed in a table.

Some JVMs are marked with special backgrounds, either as

  • Profiled
    if the profiling agent has already been loaded. This may be because the profiling agent was specified on the command line or because you have already attached to that JVM before.
  • Offline
    if the application is already profiled in offline mode. To start and stop recording as well as save snapshots in offline profiling mode, use the jpcontroller command line executable.
  • Connected
    if the JVM is already connected to by another JProfiler GUI.
You can select any JVM that is not marked as offline or connected and start profiling.

Above the list of JVMs, you find a selector that allows you to modify the filter settings for the displayed JVMs. The list of JVMs supports quick search (just type into it), alternatively you can use the filter field at the bottom to restrict the displayed JVMs.

  The displayed name of a JVM is the main class of the profiled JVM together with its arguments. For launchers generated by exe4j or install4j, the executable name is displayed.

If you wish to set the displayed name yourself, for example because you have several processes with the same main class that would otherwise be undistinguishable, you can set the VM parameter -Djprofiler.displayName=[name]. If the name contains spaces, use single quotes: -Djprofiler.displayName='My name with spaces' and quote the entire VM parameter with double quotes if necessary. In addition to -Djprofiler.displayName JProfiler also recognizes -Dvisualvm.display.name.

  When attaching to local JVMs on Windows, only JVMs that are started by the currently logged in users are shown by default. Often it is required to profile a service that is started by the "Local System" account. In that case, you have to select the  toggle button in the upper right corner to add the service JVMs to the list. On Windows Vista and higher, a UAC dialog will be shown to elevate permissions (unless UAC has been disabled). This is required because otherwise those JVMs cannot be discovered and profiled.
  When attaching to remove JVMs, the SSH login user may not be the user that has started the JVM of interest. If there is a mismatch in the user, the JVM may not be listed or attaching may not succeed. The  switch user button allows you to enter a different user and authenticate either with su or sudo. After changing the user information, the list of running JVMs is refreshed.

Note that HPROF snapshots can only be taken for JVMs that were started with the SSH login user. HPROF snapshots require an intermediate file that is written with the access rights of the user that has started the JVM. For security reasons it is not possible to transfer file rights to the SSH login user for download. No such restriction exists for full profiling sessions.