Profiling Remote and Local Application Server using JProfiler
JProfiler can be used to profile local(where application server and JProfiler both run on the same system) or remote application servers. JProfiler is a licensed product and it comes with a free trial version also.
Prerequisite
1. Application Server should be up and running.
2. JProfiler installed and up and running.
3. Should have JProfiler agent archive file.
4. If profiling remote application server then port should be open.
A) Profiling Local Application Server
1. Start local application server (JBoss/Weblogic, etc which run in JVM)
2. Open JProfiler
3. Click on the start center
4. Goto Quick attach
5. All running JVM's will be listed in the list box - > Select running Jboss\Weblogic application server to be profiled as shown below
6. Click on start
7. Select sampling
8. Click OK
9. Click on CPU views->Click on Call tree -> Press record (as shown in the below screenshot)
Now Profiler is all set to capture the JVM's transactions.
10. Access the application from the browser, JProfiler will keep recording all the operations performed on that server.
B) Profiling Remote Application Server
1. Start the remote application server (Any server running in JVM e.g. JBoss\Weblogic, etc).
2. Extract the JProfiler agent archive (This agent file will be in the JProfiler installation directory) somewhere on the machine where the application server is installed.
3. In the JProfiler agent installation directory call bin/jpenable and select the JVM you want to profile. Double click on jpenable.exe
4. It will ask “Do you want to search for JVMs running as service?”
Enter “y”
5. This will list all the running JVMs on the system. Since we are running JPenable on the system which has the application server running then it will be listed.
6. Select the application server's JVM as shown in the screenshot
Enter the number as required. In this case, enter “4” for WebLogic server
7. Now for GUI mode enter “1”
8. Enter the profiling port as suggested or any free and open port number.
This will start the Profiling agent on port 8954. It is a kind of listener where the JProfiler will connect to.
9. Now go to JProfiler and open it.
10. Goto start center->Open quick attach tab->select “On another computer”
Enter IP address of the application server
Enter Port(port which was used earlier to start JProfiler agent)
11. Click on start.
12. Select Sampling for summary profiling or Instrumentation for detailed profiling
13. Tip: To find a bottleneck, use sampling, not instrumentation (Instrumentation makes the server slow as it allows to do modification in the class files at runtime).
14. To start Profiling
Click on “CPU Views” then “Call Tree” and click on the record button.
15. Now the JProfiler is ready to capture the data.
16. Access the application from the browser and the JProfiler will keep recording all the operations performed on the Application server.
17. The recording can be as a snapshot and later on retrieved in the JProfiler back.
18. JProfiler also shows the summary of J2EE components running on the application server like JMS, EJB, running threads, JDBC info, etc.
17. The recording can be as a snapshot and later on retrieved in the JProfiler back.
18. JProfiler also shows the summary of J2EE components running on the application server like JMS, EJB, running threads, JDBC info, etc.
Comments
Post a Comment