2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

Merge pull request #605 from mikelolasagasti/php-opcache-add-wasted-memory

Add wasted memory to the graph
This commit is contained in:
Stig Sandbeck Mathisen 2015-03-26 21:00:11 +01:00
commit feef1d04d1
2 changed files with 5 additions and 1 deletions

5
plugins/php/php_opcache Normal file → Executable file
View File

@ -37,7 +37,7 @@ graph_title OPCache Memory usage
graph_args -l 0 --base 1024 graph_args -l 0 --base 1024
graph_vlabel Memory usage graph_vlabel Memory usage
graph_category php-opcache graph_category php-opcache
graph_order mem_used mem_free graph_order mem_used mem_free mem_wasted
graph_total Total graph_total Total
mem_free.label Memory Free mem_free.label Memory Free
mem_free.draw STACK mem_free.draw STACK
@ -45,6 +45,9 @@ mem_free.min 0
mem_used.label Memory Used mem_used.label Memory Used
mem_used.draw AREA mem_used.draw AREA
mem_used.min 0 mem_used.min 0
mem_wasted.label Memory Wasted
mem_wasted.draw STACK
mem_wasted.min 0
EOM EOM
exit 0 exit 0

View File

@ -9,6 +9,7 @@ if (function_exists('opcache_get_status'))
$output = array( $output = array(
'mem_used.value' => $data['memory_usage']['used_memory'], 'mem_used.value' => $data['memory_usage']['used_memory'],
'mem_free.value' => $data['memory_usage']['free_memory'], 'mem_free.value' => $data['memory_usage']['free_memory'],
'mem_wasted.value' => $data['memory_usage']['wasted_memory'],
); );
} }
else else