I am running a web application that is deployed on remote machine server and I have the IP address and URL of this application. When I hit the URL with a browser, the application displays.
I now have to profile that web application, as I need to find out why it is running so slow.
I tried using JProfiler, have not been successful. Could someone please advise how to configure JProfiler for remote profiling?
To start JProfiler, execute bin/jprofiler in the extracted directory. On Linux/Unix, the file jprofiler. desktop can be used to integrate the JProfiler executable into your window manager. For example, on Ubuntu you can drag the desktop file into the launcher side bar in order to create a permanent launcher item.
JProfiler is a Java profiler tool and is useful for developers/testers as it can be used to analyze performance bottlenecks, memory leaks, CPU loads, and to resolve threading issues. JProfiler works both as a stand-alone application and as a plug-in for the Eclipse software development environment.
On different platforms, the JProfiler executable is located in different directories. On Windows, it's bin\jprofiler.exe , on Linux or Unix bin/jprofiler and on macOS there is a special helper shell script Contents/Resources/app/bin/macos/jprofiler.sh in the JProfiler application bundle for the IDE integrations.
The easiest way to profile a remote JVM on a system without a GUI is this:
Tip: To find a bottleneck, use sampling not instrumentation.
Update for JProfiler 10.0+
Since JProfiler 10.0, there is a remote attach feature that does not require any of the above steps, you just need SSH credentials to the remote machine.
SSH connections are made directly by JProfiler, you don't have to set up the SSH tunnel yourself. It's also possible to configure multi-hop tunnels.
JProfiler will automatically download the required agent package, upload it to the remote machine and use its command line tools to gather the information that you see in the attach dialog. The agent package is cached, so this is only done once.
Because you have to authenticate as the same user that has started the JVM that you want to profile, it is possible to switch the user for the remote attach. For example, you can sudo to the root user to attach to a service that was started as root.
All the JVMs started by the selected user are shown and you can either start a full profiling session or just take a low-overhead HPROF heap dump and open it in JProfiler.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With