From ec4951b73250fe1075a53dc1cc2b82cda467d89b Mon Sep 17 00:00:00 2001 From: Mikel Olasagasti Uranga Date: Thu, 26 Mar 2015 19:03:11 +0100 Subject: [PATCH] Add wasted memory to the graph, now the sum is always the total assigned memory --- plugins/php/php_opcache | 5 ++++- plugins/php/php_opcache.php | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) mode change 100644 => 100755 plugins/php/php_opcache diff --git a/plugins/php/php_opcache b/plugins/php/php_opcache old mode 100644 new mode 100755 index ce9a795c..04af966e --- a/plugins/php/php_opcache +++ b/plugins/php/php_opcache @@ -37,7 +37,7 @@ graph_title OPCache Memory usage graph_args -l 0 --base 1024 graph_vlabel Memory usage graph_category php-opcache -graph_order mem_used mem_free +graph_order mem_used mem_free mem_wasted graph_total Total mem_free.label Memory Free mem_free.draw STACK @@ -45,6 +45,9 @@ mem_free.min 0 mem_used.label Memory Used mem_used.draw AREA mem_used.min 0 +mem_wasted.label Memory Wasted +mem_wasted.draw STACK +mem_wasted.min 0 EOM exit 0 diff --git a/plugins/php/php_opcache.php b/plugins/php/php_opcache.php index 2d92f993..c23d62b0 100644 --- a/plugins/php/php_opcache.php +++ b/plugins/php/php_opcache.php @@ -9,6 +9,7 @@ if (function_exists('opcache_get_status')) $output = array( 'mem_used.value' => $data['memory_usage']['used_memory'], 'mem_free.value' => $data['memory_usage']['free_memory'], + 'mem_wasted.value' => $data['memory_usage']['wasted_memory'], ); } else