![]() The utility yjp-controller-api-redist.jaris available in /lib, because we will be using this utility frequently, lets change working dir. Now our agent is attached to the process, and we need to start profiling. Please specify comma-separated list of startup options, or press Enter for default options profiling Ready for attach.Įnter PID of the application you want to attach (0 to exit) and press Enter: Log file: /root/.yjp/log/profiler-ui-362.log Watch the output below, it shows all processes, and asks which pid you want to use, I entered 1 for pid, and used default port with just pressing Enter. Use attach.sh in /usr/local/YourKit-JavaProfiler-2018.04/bin/attach.sh The next step is to attach the yourkit profiler agent to running JVM, you need to know the processid of running JVM, usually its 1 when its tomcat-only container. Inflating: /usr/local/YourKit-JavaProfiler-2018.04/jre64/release This command will download the yourkit binaries on the machine, inflate the same to /usr/local directory and remove the binary downloaded to free up the space. Run below command with appropriate binary url inside docker bash to do the wget -P /tmp/ & Next step is to download and inflate the yourkit binaries into the container. This will open bash console to the container. we will use docker exec command to do the same. Once we have the docker containerid, the next step is to get into the container bash. I have used this frequently on XO containers, so I will use container names from XO.įirst of all we need to find the container where the application is e docker ps command to get it.ĬONTAINER ID IMAGE COMMAND CREATED STATUS PORTSĬ892579bed1f /crossover/xo-tomcat:95 "/scripts/docker-ent…" About an hour ago Up About an hour 10.69.11.214:20314->8080/tcpįrom the output, you can easily find that the container id c892579bed1f is the one we need to use for further steps. In this document, we will see how to inflate yourkit onto docker container and get the snapshot. Thankfully you do not need a license to profile an application, but you need license just to view/analyze the results, so you are saved from registering headache. In such situation, the option is to profile the application on the docker container itself, and copy the snapshot onto local machine to analyze. ![]() It becomes even difficult when the server is run inside docker container, because most of the times these containers are configured not to expose any port other than the designated ports like 8080 Where the primary usage of this profiler is to profile the usecase on your local machine, there are situations where you need profile remotely running java severs. Yourkit is the very commonly used profiler across performance teams for all java related profiling.
0 Comments
Leave a Reply. |