If you want to trace applications not running on the same machine as eclipse follow the following steps:
Save the agent files to a folder from the Start vmlens view in eclipse as shown below:
Copy this folder to your remote machine and configure your application with an agent string pointing to the agent.jar in this folder:
-javaagent:<Path of agent.jar>/agent.jar
When you start your application the vmlens agent creates a folder vmlens
in the working directory of your application. After you stopped your application the agent stops and writes a file called finished
in the vmlens
folder. After the agent has written the file finished
you can import the folder vmlens
in eclipse:
Import the vmlens folder in the Start vmlens view in eclipse as shown below:
Now vmlens will analyze the execution trace of your application and open the vmlens perspective in eclipse showing you the results.
Please set the java heap size for eclipse in the eclipse.ini to a high enough value, for example -Xmx5g
In the default configuration, the agent starts collecting information with the start of your application. By enabling and applying Manually Start the agent
in the vmlens Start View before saving the agent files to a folder, you can start the agent manually:
To start the agent put a file called start in the vmlens
folder in the working directory of your application.
touch start
To stop the agent put a file called stop in the vmlens
folder in the working directory of your application.
touch stop
The agent will then stop and writes a file called finished
in the vmlens
folder.
In the default configuration, the agent writes the execution trace in a folder called vmlens
in the working directory of your application. To change this path, change the property eventDir
in the file called run.properties
in the folder wich contains the agent.jar file. In the default configuration, this property is set to ./vmlens/
eventDir=./vmlens/