- Running the profiler
- Profiler activation
- Running applications with the profiler
- Connect to profiled application
- Troubleshoot connection problems
- Solving performance problems
- CPU profiling
- Deadlock detector
- Memory profiling
- Garbage collection
- Monitor profiling
- Exception profiling
- Probes: monitor events of various kinds
- Performance Charts
- Inspections: automatic recognition of typical problems
- Automatically trigger actions on event
- Summary, snapshot annotation, automatic deobfuscation
- IDE integration
- Time measurement (CPU time, wall time)
- Snapshot directory customization
- Export of profiling results to HTML, CSV, XML, plain text
- Profiler API
- Command line tool to control profiling
- FAQ: How to profile in my scenario?
- Profiling in Docker container
- Profiling in Amazon EC2 instance
Profiling in Amazon EC2 instance
1. Start application with the profiler agent
Start your Java application with the profiler agent using this instruction.
For communication with profiler UI profiler agent opens TCP port. To provide better security profiler agent will not accept remote connections by default. Although this can be changed, exposing profiler agent port is a bad idea. Secure network communication with SSH protocol can be a useful alternative.
2. Getting IP and key
In this example we will use SSH connection to the Amazon EC2 instance to profile a Java application. First you need to know a public IP address. Select your instance in EC2 Management Console and find the address at "IPv4 Public IP" in "Description" tab.
To get authentication key see "Key pair name" in "Description" tab and locate the corresponding key on your computer. We will use key pair aws-key-pair and aws-key-pair.pem file, which was generated by the Management Console.
Amazon Linux image, like in this example, has default user with the name ec2-user. If you have different image, please see its documentation or consult system administrator to obtain your authentication settings.
3. Profile Remote Application dialog
Use Profile remote Java EE server or application... action on Welcome screen or in "Tools" menu.
In the opened dialog enter public IP address noted above in the "Host or IP address" field.
Choose "Advanced" application discovery method and provide SSH user and SSH port in the corresponding fields.
Click on Authentication settings... and provide the private key.
Created connection will appear in the "Monitor Applications" list on Welcome screen.
4. Connect from Welcome Screen
In the first communication profiler will upload all necessary files, and you will see "Connecting..." message. This might take up to a few minutes depending on your network speed.
You will see applications running with the profiler agent marked with green circle. Click on the application name to connect and profile it.
Applications without the profiler agent are marked with orange circle. You can attach and profile the application, by clicking on its name. Please note that you will not see applications running under a different user, unless your start it with the profiler agent.
If you do not see your application it the list, please read Troubleshoot connection problems.