function print_db_pools($db_pools) { ob_start(); ?> <table class="data"> <tr> <th> </th> <th colspan='5' id='connections'><?php echo info("Connections", "Database_Connections"); ?> </th> <th colspan='2' id='config'><?php echo info("Config", "Database_Connections"); ?> </th> </tr> <tr> <th id='name'><?php echo gettext('Name'); ?> </th> <th id='active'><?php echo gettext('Active'); ?> </th> <th id='idle'><?php echo gettext('Idle'); ?> </th> <th id='created'><?php echo gettext('Created'); ?> </th> <th id='failed' colspan='2'><?php echo gettext('Failed'); ?> </th> <th id='max-connections'>max-connections</th> <th id='idle-time'>idle-time</th> </tr> <?php $row = 0; foreach ($db_pools as $pool) { ?> <tr class='<?php echo row_style($row++); ?> '> <td headers="name"><?php echo $pool->Name; ?> </td> <td headers="connections active"><?php echo $pool->ConnectionActiveCount; ?> </td> <td headers="connections idle"><?php echo $pool->ConnectionIdleCount; ?> </td> <td headers="connections created"><?php echo format_miss_ratio($pool->ConnectionCountTotal, $pool->ConnectionCreateCountTotal); ?> </td> <td headers="connections failed"><?php echo $pool->ConnectionFailCountTotal; ?> </td> <td headers="connections failed" class='<?php echo format_ago_class($pool->LastFailTime); ?> '> <?php echo format_ago($pool->LastFailTime); ?> </td> <td headers="config max-connections"><?php echo $pool->MaxConnections; ?> </td> <td headers="config idle-time"><?php echo sprintf("%.2fs", $pool->MaxIdleTime * 0.001); ?> </td> </tr> <?php } ?> </table> <?php return ob_get_clean(); }
} else { echo "<td></td>"; echo "<td></td>"; echo "<td></td>"; } $proxy_cache = $sub_mbean_server->lookup("resin:type=ProxyCache"); if ($proxy_cache) { echo "<td>"; echo format_miss_ratio($proxy_cache->HitCountTotal, $proxy_cache->MissCountTotal); echo "</td>"; } else { echo "<td></td>"; } $block_cache = $sub_mbean_server->lookup("resin:type=BlockManager"); if ($block_cache) { echo "<td>" . format_miss_ratio($block_cache->HitCountTotal, $block_cache->MissCountTotal) . "</td>"; } else { echo "<td></td>"; } $thread_pool = $sub_server->ThreadPool; if ($thread_pool) { /* echo "<td>" . $thread_pool->ThreadActiveCount . "</td>"; echo "<td>" . $thread_pool->ThreadIdleCount . "</td>"; */ echo "<td>" . $thread_pool->ThreadCount . "</td>"; } else { /* echo "<td></td>"; echo "<td></td>"; */
<th><?php echo info("Block cache miss ratio"); ?> :</th> <td><?php echo format_miss_ratio($block_cache->HitCountTotal, $block_cache->MissCountTotal); ?> </td> </tr> <!-- XXX: show how cacheable apps are: cacheable/non-cacheable --> <tr> <th>Invocation miss ratio:</th> <td><?php echo format_miss_ratio($server->InvocationCacheHitCountTotal, $server->InvocationCacheMissCountTotal); ?> </td> </tr> </table> <?php if ($proxy_cache) { $cacheable = $proxy_cache->getCacheableEntries(15); echo "<h3>Cacheable Pages</h3>"; echo "<table class='data'>"; echo "<tr><th>Count</th><th>url</th></tr>\n"; foreach ($cacheable as $item) { echo "<tr>"; echo "<td>{$item->hitCount}</td><td>{$item->url}</td>";
echo $client->State; ?> "><?php echo $client->State; ?> </td> <td><?php echo $client->ConnectionActiveCount; ?> </td> <td><?php echo $client->ConnectionIdleCount; ?> </td> <td><?php echo format_miss_ratio($client->ConnectionKeepaliveCountTotal, $client->ConnectionNewCountTotal); ?> </td> <td><?php echo sprintf("%.2f", $client->ServerCpuLoadAvg); ?> </td> <td><?php echo sprintf("%.2f", $client->LatencyFactor); ?> </td> <!-- XXX: <td><?php echo $client->LastFailTime; ?> </td>