diff --git a/index.php b/index.php index 63f9576..1923978 100644 --- a/index.php +++ b/index.php @@ -45,6 +45,7 @@ if ($highlightValueMemoryUsage >= 80) { } elseif ($threshold >= 60) { $threshold = ' mid'; } +$totalFilesCached = count($opcache_status['scripts']); if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest' @@ -55,25 +56,40 @@ if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) 'used_memory' => memsize($opcache_status['memory_usage']['used_memory']), 'free_memory' => memsize($opcache_status['memory_usage']['free_memory']), 'wasted_memory' => memsize($opcache_status['memory_usage']['wasted_memory']), - 'wasted_percentage' => round($opcache_status['memory_usage']['current_wasted_percentage'], 2) . '%' + 'wasted_percentage' => round($opcache_status['memory_usage']['current_wasted_percentage'], 2) . '%', + 'files_cached' => $totalFilesCached ); echo json_encode($data); exit; } +$host = (function_exists('gethostname') + ? gethostname() + : (php_uname('n') + ?: (empty($_SERVER['SERVER_NAME']) + ? $_SERVER['HOST_NAME'] + : $_SERVER['SERVER_NAME'] + ) + ) +); + +$validPages = array('overview', 'files'); +$page = (empty($_GET['page']) || !in_array($_GET['page'], $validPages) + ? 'overview' + : $_GET['page'] +); + ?>
- - - - + + -% memory usage
-% hit rate
-used memory:
-free memory:
-wasted memory: (%)
-General info | |
---|---|
Zend OPcache | -- |
PHP | -- |
Host | -- |
Server Software | -- |
Start time | -- |
Last reset | -never' - : date_format(date_create("@{$opcache_status['opcache_statistics']['last_restart_time']}"), 'Y-m-d H:i:s')); ?> | -
Directives | |
---|---|
- | true' : 'false') - : $v); ?> | -
+ Overview + File usage +
% memory usage
+% hit rate
+used memory:
+free memory:
+wasted memory: (%)
+number of cached files:
+Script | -Details | -
---|---|
- '; - echo join(DIRECTORY_SEPARATOR, array_slice($parts, $settings['compress_path_threshold'])); - if (count($parts) > $settings['compress_path_threshold']) { - echo DIRECTORY_SEPARATOR; - } - echo "{$base}"; - } else { - echo htmlentities($s['full_path'], ENT_COMPAT, 'UTF-8'); - } - ?> - |
-
- hits: ,
- memory: |
-
General info | |
Zend OPcache | ++ |
PHP | ++ |
Host | ++ |
Server Software | ++ |
Start time | ++ |
Last reset | +never' + : date_format(date_create("@{$opcache_status['opcache_statistics']['last_restart_time']}"), 'Y-m-d H:i:s')); ?> | +
Directives | |
---|---|
+ | true' : 'false') + : $v); ?> | +
Script | +Details | +
---|---|
+ '; + echo join(DIRECTORY_SEPARATOR, array_slice($parts, $settings['compress_path_threshold'])); + if (count($parts) > $settings['compress_path_threshold']) { + echo DIRECTORY_SEPARATOR; + } + echo "{$base}"; + } else { + echo htmlentities($s['full_path'], ENT_COMPAT, 'UTF-8'); + } + ?> + |
+
+ hits: ,
+ memory: |
+