How to do remote profiling via YourKit command line?

386 views Asked by At

I am trying to do remote profiling (since I don't have access to UI on the remote machine) via command line as mentioned in the below link

https://www.yourkit.com/docs/java/help/command_line_tool.jsp

I have started the application with profiler agent and I have done a CPU sampling.

root@platform1:/tmp/tuk/YourKit-JavaProfiler# java -jar lib/yjp-controller-api-redist.jar localhost 10002 start-sampling
CPU sampling started
root@platform1:/tmp/tuk/YourKit-JavaProfiler# java -jar lib/yjp-controller-api-redist.jar localhost 10002 stop-cpu-profiling
CPU profiling stopped

Can some let me know

  1. Where the sampling data is saved and how can I analyze it next?
  2. Is it possible to transfer the sampling date to my local so that I can analyze it via yourkit UI?
1

There are 1 answers

0
tuk On BEST ANSWER

This has been answered yourkit forum. Posting the answer below

Where the sampling data is saved and how can I analyze it next?

Please capture a snapshot after (or right before) stopping CPU profiling by using the command "capture-performance-snapshot".

Is it possible to transfer the sampling date to my local so that I can analyze it via yourkit UI?

Yes. Please transfer the snapshot file to your local machine for analysis. Snapshot files are created in /Snapshots by default, see https://www.yourkit.com/docs/java/help/snapshot_dir.jsp