简体   繁体   中英

How to do remote profiling via YourKit command line?

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM