Memory and Database Status
Memory
Max: $xwiki.maxMemory()
Free: $xwiki.freeMemory()
Total: $xwiki.totalMemory()
Active Connections
Active: $xwiki.store.store.nbConnections
Map Size: $xwiki.store.store.connections.size()
#foreach ($mconn in $xwiki.store.store.connections)
$mconn
#set($pconn = $mconn.connection)
Time: $mconn.date
The database connection was assigned in the following page:
$mconn.url
StackTrace:
$mconn.exception.getStackTraceAsString()
Closed: $pconn.isClosed() #if ( $pconn.closed==false)
Catalog: $!pconn.catalog
AutoCommit: $!pconn.autoCommit
ReadOnline: $!pconn.readOnly
Warnings: $!pconn.warnings #end
#end #set($provider = $xwiki.store.store.sessionFactory.connectionProvider) #set($pool = $xwiki.getPrivateField($provider,"connectionPool")) #if ($pool)
Current Pool
Before gc
Max Active: $pool.maxActive
Max Idle: $pool.maxIdle
Max Wait: $pool.maxWait
Active: $pool.numActive
Idle: $pool.numIdle
$xwiki.gc() $xwiki.gc() $xwiki.gc()
After gc
Max Active: $pool.maxActive
Max Idle: $pool.maxIdle
Max Wait: $pool.maxWait
Active: $pool.numActive
Idle: $pool.numIdle
#set($list = $xwiki.getPrivateField($pool,"_pool")) #foreach ($element in $list) #set($pconn = $xwiki.getPrivateField($element, "value")) #set($timea = $xwiki.currentDate.time) #set($timeb = $xwiki.getPrivateField($element, "tstamp"))
$pconn
#set($conn = $pconn.delegate.delegate)
CurrentTime: $timea
LastActiveTime: $timeb
$conn
Closed: $conn.isClosed() #if ( $conn.closed==false)
Catalog: $!conn.catalog
AutoCommit: $!conn.autoCommit
ReadOnline: $!conn.readOnly
Warnings: $!conn.warnings #end
#end #end