weblogic控制台数据源监控项中Connection Delay Time值计算方式

作者:  Admin     发布时间:  2015-05-12 12:55:04     点击:      分类:  原创文章

1. Connection Delay Time解释:

Connection Delay Time
The average amount of time, in milliseconds, that it takes to create a physical connection to the database.
The value is calculated as summary of all times to connect divided by the total number of connections.
MBean Attribute:
JDBCDataSourceRuntimeMBean.ConnectionDelayTime

2. How WebLogic Server record this "Connection Delay Time"

Internally, weblogic record two statistics, one is named createTime, for "cumulative creation time for successfully created resources" and one is createCount, for "number of successful resource creations" and the connection delay time = (createTime/createCount)
Each time WebLogic tried to create a new connection to Database, WebLogic will record two time
connBeganAt and connEndedAt between connBeganAt and connEndedAt , Only one thing is done, that is connect to database
and for this one connection createTime = connEndedAt – connBeganA

3. 测试记录:

1) 部署测试应用包(rac.war);

2) 部署测试JDBC 数据源 (JDBC Data Source-0 ),其中数据JNDI名称(jdbc/oracle);

3) 测试JDBC 数据源 (JDBC Data Source-0 )连接数配置:


4) 测试创建一个数据连接:


5) 查看标准输出日志,日志显示连接创建成功;


6) 查看部署测试JDBC 数据源 (JDBC Data Source-0 )Weblogic Server日志文件(AdminServer.log);

####<2014-1-17 上午041717 CST> <Info> <pgDbg#> <tzycsqtkq-PC> <AdminServer> <[ACTIVE] ExecuteThread: ‘0’ for queue: ‘weblogic.kernel.Default (self-tuning)’> <<WLS Kernel>> <> <> <1389903437365> <BEA-000000> <Crt: total createCount=1,total createTime=205,curr conn create time=205>

####<2014-1-17 上午041717 CST> <Info> <Common> <tzycsqtkq-PC> <AdminServer> <[ACTIVE] ExecuteThread: ‘0’ for queue: ‘weblogic.kernel.Default (self-tuning)’> <<WLS Kernel>> <> <> <1389903437365> <BEA-000628> <Created "1" resources for pool "JDBC Data Source-0", out of which "1" are available and "0" are unavailable.>

####<2014-1-17 上午042204 CST> <Info> <pgDbg#> <tzycsqtkq-PC> <AdminServer> <[ACTIVE] ExecuteThread: ‘0’ for queue: ‘weblogic.kernel.Default (self-tuning)’> <weblogic> <> <> <1389903724076> <BEA-000000> <delay = 205/1:205>

7) 登入Weblogic管理控制台,查看数据源(JDBC Data Source-0 )监控项中Connection Delay Time显示值:205


8) 再次测试创建一个数据连接:


9) 查看标准输出日志,日志显示连接创建成功;


10) 查看部署测试JDBC 数据源 (JDBC Data Source-0 )Weblogic Server日志文件(AdminServer.log);

####<2014-1-17 上午043402 CST> <Info> <pgDbg#> <tzycsqtkq-PC> <AdminServer> <[ACTIVE] ExecuteThread: ‘0’ for queue: ‘weblogic.kernel.Default (self-tuning)’> <<anonymous>> <> <> <1389904442117> <BEA-000000> <Crt: total createCount=2,total createTime=348,curr conn create time=143>

####<2014-1-17 上午043402 CST> <Info> <Common> <tzycsqtkq-PC> <AdminServer> <[ACTIVE] ExecuteThread: ‘0’ for queue: ‘weblogic.kernel.Default (self-tuning)’> <<anonymous>> <> <> <1389904442122> <BEA-000628> <Created "1" resources for pool "JDBC Data Source-0", out of which "1" are available and "0" are unavailable.>

####<2014-1-17 上午043531 CST> <Info> <pgDbg#> <tzycsqtkq-PC> <AdminServer> <[ACTIVE] ExecuteThread: ‘0’ for queue: ‘weblogic.kernel.Default (self-tuning)’> <weblogic> <> <> <1389904531868> <BEA-000000> <delay = 348/2:174>

11) 登入Weblogic管理控制台,查看数据源(JDBC Data Source-0 )监控项中Connection Delay Time显示值:174


 




Leave a Reply

评论:(您还可以输入120个字)

提交
<<<更多评论>>>