Configuring JProfiler for Oracle WebLogic 11g Application Server on Solaris

Ever wondered how to configure JProfiler 6 for Oracle WebLogic 11g application server? Here are the steps:


1. Download and install JProfiler 6. If you don't have the license, you can install the 10-day trial version. Follow the installation notes and start JProfiler. Assume the JProfiler installation path is <jprofiler-dir>, start the JProfiler by: 

# <jprofiler-dir>/bin/jprofiler

2.  Use the Integration Wizard to create a start script for WebLogic. Select Session -> Integration Wizard -> New Server Integration from the menu.

  • In the 'Choose Wizard' screen, select 'Oracle WebLogic Server 11g' from the drop down list;
  • In the 'Local or Remote' screen, select 'On this computer';
  • In the 'Profiled JVM' screen, choose the JVM used by your WebLogic server. In my case, I choose 'Sun JVM 1.6.0 hotspot';
  • In the 'Startup Mode' screen, select 'Startup immediately, connect later with the JProfiler GUI'; 
  • In the 'Locate Start Script' screen, select the location for startWebLogic.sh script, which is used to start your WebLogic instance;
  • Select default port which is 8849 in the 'Choose Profiling Port' screen;
  • Check modifications and click next.
  • g. Now the integration is completed. Select 'No, I will start the session later' and click finish.

3. Go to WebLogic bin directory, you will see a new start script named 'startWebLogic_jprofiler.sh' to be used for profiling is created by JProfiler. View the script you can see some lines are added by the integration wizard, such as 

 

JPROFILER_OPTIONS="-agentpath:/opt/jprofiler6/bin/solaris-sparcv9      \ /libjprofilerti.so=port=8849,nowait,id=115,config=/root/.jpr ofiler6/config.xml  
\ $JPROFILER_OPTIONS"   export JPROFILER_OPTIONS


Use this new start script to start your WebLogic server. You will see JProfiler prompts both on the commond line and in server startup log. 

4. Go to JProfiler, select 'Session' -> 'New Session' from the menu, input a session name, select 'Remote' for Session Type, which is used to profile your Java EE applications. Local session type is used for standalone applications. You can just use the default values for 'Remote Settings'. Customize the Filter, Profiling and Trigger Settings as you wish. Click ok, wait for a little while and you will see all the objects displayed! The default view is memory profiling, you can select heap walker, CPU view, thread view etc. Now you are done with JProfiler configuration and ready for profiling your application on WebLogic. 

Close JProfiler window and the WebLogic server will be still running but the profiling stops.

Running JProfiler during a run can slow down the server as it is very resource consuming. So it is not recommended to run JProfiler in production environments. You should run JProfiler only when it is necessary, e.g., when you suspect there are memory leaks or thread conflicts, or at the point you want to see what's happening. 

 

转自这里

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值