Skip to content
Snippets Groups Projects
Commit 3eb811df authored by shammash's avatar shammash Committed by agata
Browse files

add script to export apc stats

parent a62fb5a5
Branches
Tags
No related merge requests found
<?php
function print_stat($key, $value) {
echo "apc.$key{service=php,instance=noblogs}: $value\n";
}
$cache = apc_cache_info('', true);
foreach ($cache as $key => $value) {
if ($key === "memory_type" or $key === "locking_type")
continue;
print_stat($key, $value);
}
$mem = apc_sma_info(true);
foreach ($mem as $key => $value) {
print_stat($key, $value);
}
/*
* Significant data:
* $cache['num_entries'] => number files
* $cache['mem_size'] => size cached files
* $cache['num_hits'] => hits
* $cache['num_misses'] => misses
* $cache['expunges'] => cache full count
*
* $mem['num_seg'] * $mem['seg_size'] => memory size
* $mem['avail_mem'] => free memory
*/
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment