示例#1
0
$collations = Sql::pSelectMapped('SHOW VARIABLES LIKE "%collation%"');
foreach ($collations as $ch_name => $val) {
    echo $ch_name . ' = ' . $val . '<br/>';
}
echo '<br/>';
// show MySQL query cache settings
$data = Sql::pSelectMapped('SHOW VARIABLES LIKE "%query_cache%"');
if ($data['have_query_cache'] == 'YES') {
    echo '<h2>Query cache settings</h2>';
    echo 'Type: ' . $data['query_cache_type'] . '<br/>';
    //valid values: ON, OFF or DEMAND
    echo 'Size: ' . formatDataSize($data['query_cache_size']) . ' (total size)<br/>';
    echo 'Limit: ' . formatDataSize($data['query_cache_limit']) . ' (per query)<br/>';
    echo 'Min result unit: ' . formatDataSize($data['query_cache_min_res_unit']) . '<br/>';
    echo 'Wlock invalidate: ' . $data['query_cache_wlock_invalidate'] . '<br/><br/>';
    // current query cache status
    $data = Sql::pSelectMapped('SHOW STATUS LIKE "%Qcache%"');
    echo '<h2>Query cache status</h2>';
    echo 'Hits: ' . formatNumber($data['Qcache_hits']) . '<br/>';
    echo 'Inserts: ' . formatNumber($data['Qcache_inserts']) . '<br/>';
    echo 'Queries in cache: ' . formatNumber($data['Qcache_queries_in_cache']) . '<br/>';
    echo 'Total blocks: ' . formatNumber($data['Qcache_total_blocks']) . '<br/>';
    echo '<br/>';
    echo 'Not cached: ' . formatNumber($data['Qcache_not_cached']) . '<br/>';
    echo 'Free memory: ' . formatDataSize($data['Qcache_free_memory']) . '<br/>';
    echo '<br/>';
    echo 'Free blocks: ' . formatNumber($data['Qcache_free_blocks']) . '<br/>';
    echo 'Lowmem prunes: ' . formatNumber($data['Qcache_lowmem_prunes']);
} else {
    echo '<h2>MySQL query cache is disabled</h2>';
}
示例#2
0
                 break;
             default:
                 die('unknown processqueue type: ' . $row['orderType']);
         }
         $creator = new User($row['creatorId']);
         echo $row['timeCreated'] . ' added by ' . $creator->render() . '<br/><br/>';
         echo 'Attempts: ' . $row['attempts'] . '<br/><br/>';
         if ($row['orderType'] != TASK_CONVERT_TO_DEFAULT) {
             if ($row['referId']) {
                 echo ahref('queue/status/' . $row['referId'], 'Show file status') . '<br/>';
             }
             $file = FileInfo::get($row['referId']);
             if ($file) {
                 echo '<h3>Source file:</h3>';
                 echo 'Mime: ' . $file['fileMime'] . '<br/>';
                 echo 'Size: ' . formatDataSize($file['fileSize']) . '<br/>';
             }
         }
         if ($row['orderStatus'] == ORDER_COMPLETED) {
             echo '<b>Order completed</b><br/>';
             echo 'Exec time: ' . round($row['timeExec'], 3) . 's<br/>';
         }
         echo '</div>';
     }
 } else {
     echo 'Queue is empty.<br/>';
 }
 if (!isset($_GET['completed'])) {
     echo '<a href="?completed">Show completed queue items</a>';
 } else {
     echo '<a href="?">Show pending queue items</a>';