summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-10-13 21:03:48 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-10-13 21:03:48 +0000
commit609286643ce6bc2f99ace36266b5d6e36b91a7f8 (patch)
tree884681f805abd5d93c45545a67655fbf744135b8 /usr
parent1cb64928ea3842ce55311f7c48bcff59a9e2f8e7 (diff)
downloadpfsense-609286643ce6bc2f99ace36266b5d6e36b91a7f8.zip
pfsense-609286643ce6bc2f99ace36266b5d6e36b91a7f8.tar.gz
Memory meter changes.
Submitted-by: Dan Swartzendruber <dswartz_AT_druber.com>
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/includes/functions.inc.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/usr/local/www/includes/functions.inc.php b/usr/local/www/includes/functions.inc.php
index fca8335..1d7da59 100644
--- a/usr/local/www/includes/functions.inc.php
+++ b/usr/local/www/includes/functions.inc.php
@@ -128,13 +128,14 @@ function swap_usage()
function mem_usage()
{
- exec("/sbin/sysctl -n vm.stats.vm.v_active_count vm.stats.vm.v_inactive_count " .
- "vm.stats.vm.v_wire_count vm.stats.vm.v_cache_count vm.stats.vm.v_free_count", $memory);
+ exec("/sbin/sysctl -n vm.stats.vm.v_page_count vm.stats.vm.v_inactive_count " .
+ "vm.stats.vm.v_cache_count vm.stats.vm.v_free_count", $memory);
- $totalMem = $memory[0] + $memory[1] + $memory[2] + $memory[3] + $memory[4];
- $freeMem = $memory[4];
- $usedMem = $totalMem - $freeMem;
+ $totalMem = $memory[0];
+ $availMem = $memory[1] + $memory[2] + $memory[3];
+ $usedMem = $totalMem - $availMem;
$memUsage = round(($usedMem * 100) / $totalMem, 0);
return $memUsage;
}
+
OpenPOWER on IntegriCloud