How to do remote profiling, if you have only console access to remote machine

Table of contents
Reading Time: < 1 minute

In this blog, I would explain how to do remote profiling on remote machine, if you are not a root user and you have only console access to remote machine.
I have used YourKit for profiling, which is one of the best and user friendly tool for profiling.

Please follow the steps, mentioned below, to step up yourkit on remote machine:-

1) Download tar.bz2 archive

2) Unpack:tar xfj .tar.bz2

3) Set Environment variable


4) Run below command and follow instruction

sh /bin/ -integrate

After running above command, you would get an agent path.

Add -agentpath: VM option to the command line of Java application, on which you want to do profiling.

5) Now with command line tool, you can start profiling.

java -jar /lib/yjp-controller-api-redist.jar

You will get a list of options. Pick an option from the list and run above command with that option. It will generate a snapshot.

Written by 

Ayush is the Sr. Lead Consultant @ Knoldus Software LLP. In his 10 years of experience he has become a developer with proven experience in architecting and developing web applications. Ayush has a Masters in Computer Application from U.P. Technical University, Ayush is a strong-willed and self-motivated professional who takes deep care in adhering to quality norms within projects. He is capable of managing challenging projects with remarkable deadline sensitivity without compromising code quality.