1. Overview

DB 상태 출력하는 WLST Script



2. Descriptions

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# 출처:  http://middlewaremagic.com/weblogic/?p=4917

#############################################################################
#
# @author Copyright (c) 2010 - 2011 by Middleware Magic, All Rights Reserved.
#
#############################################################################
 
connect('weblogic','weblogic','t3://localhost:7001')
allServers=domainRuntimeService.getServerRuntimes();
if (len(allServers) > 0):
  for tempServer in allServers:
    jdbcServiceRT = tempServer.getJDBCServiceRuntime();
    dataSources = jdbcServiceRT.getJDBCDataSourceRuntimeMBeans();
    if (len(dataSources) > 0):
        for dataSource in dataSources:
            print 'ActiveConnectionsAverageCount      '  , dataSource.getActiveConnectionsAverageCount()
            print 'ActiveConnectionsCurrentCount      '  , dataSource.getActiveConnectionsCurrentCount()
            print 'ActiveConnectionsHighCount         '  , dataSource.getActiveConnectionsHighCount()
            print 'ConnectionDelayTime                '  , dataSource.getConnectionDelayTime()
            print 'ConnectionsTotalCount              '  , dataSource.getConnectionsTotalCount()
            print 'CurrCapacity                       '  , dataSource.getCurrCapacity()
            print 'CurrCapacityHighCount              '  , dataSource.getCurrCapacityHighCount()
            print 'DeploymentState                    '  , dataSource.getDeploymentState()
            print 'FailedReserveRequestCount          '  , dataSource.getFailedReserveRequestCount()
            print 'FailuresToReconnectCount           '  , dataSource.getFailuresToReconnectCount()
            print 'HighestNumAvailable                '  , dataSource.getHighestNumAvailable()
            print 'HighestNumUnavailable              '  , dataSource.getHighestNumUnavailable()
            print 'LeakedConnectionCount              '  , dataSource.getLeakedConnectionCount()
            print 'ModuleId                           '  ,  dataSource.getModuleId()
            print 'Name                               '  ,  dataSource.getName()
            print 'NumAvailable                       '  , dataSource.getNumAvailable()
            print 'NumUnavailable                     '  , dataSource.getNumUnavailable()
            print 'Parent                             '  ,  dataSource.getParent()
            print 'PrepStmtCacheAccessCount           '  , dataSource.getPrepStmtCacheAccessCount()
            print 'PrepStmtCacheAddCount              '  , dataSource.getPrepStmtCacheAddCount()
            print 'PrepStmtCacheCurrentSize           '  , dataSource.getPrepStmtCacheCurrentSize()
            print 'PrepStmtCacheDeleteCount           '  , dataSource.getPrepStmtCacheDeleteCount()
            print 'PrepStmtCacheHitCount              '  , dataSource.getPrepStmtCacheHitCount()
            print 'PrepStmtCacheMissCount             '  , dataSource.getPrepStmtCacheMissCount()
            print 'Properties                         '  ,  dataSource.getProperties()
            print 'ReserveRequestCount                '  , dataSource.getReserveRequestCount()
            print 'State                              '  ,  dataSource.getState()
            print 'Type                               '  ,  dataSource.getType()
            print 'VersionJDBCDriver                  '  , dataSource.getVersionJDBCDriver()
            print 'WaitingForConnectionCurrentCount   '  , dataSource.getWaitingForConnectionCurrentCount()
            print 'WaitingForConnectionFailureTotal   '  , dataSource.getWaitingForConnectionFailureTotal()
            print 'WaitingForConnectionHighCount      '  , dataSource.getWaitingForConnectionHighCount()
            print 'WaitingForConnectionSuccessTotal   '  , dataSource.getWaitingForConnectionSuccessTotal()
            print 'WaitingForConnectionTotal          '  , dataSource.getWaitingForConnectionTotal()
            print 'WaitSecondsHighCount               '  , dataSource.getWaitSecondsHighCount()