You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
547 B
PHP
9 lines
547 B
PHP
<?
|
|
$opcache = opcache_get_status();
|
|
$used = $opcache['memory_usage']['used_memory'];
|
|
$free = $opcache['memory_usage']['free_memory'];
|
|
$total_req = $opcache['opcache_statistics']['blacklist_misses'] + $opcache['opcache_statistics']['misses'] + $opcache['opcache_statistics']['hits'];
|
|
$hits_pct = round($opcache['opcache_statistics']['opcache_hit_rate'], 2, PHP_ROUND_HALF_UP);
|
|
$miss_pct = round($opcache['opcache_statistics']['misses'] / $total_req * 100, 2, PHP_ROUND_HALF_UP);
|
|
echo $used."\r\n".$free."\r\n".$hits_pct."\r\n".$miss_pct;
|
|
?>
|