summaryrefslogtreecommitdiff
path: root/libs/memory.php
diff options
context:
space:
mode:
authorShevAbam <shevabam@gmail.com>2014-06-18 10:15:18 +0200
committerShevAbam <shevabam@gmail.com>2014-06-18 10:15:18 +0200
commit3f6a49bae3ec616469f21dfbbbaff052055b0c0e (patch)
treec59f35c5a6b84b05a2bacd61e4c9655cfb554688 /libs/memory.php
parent20705a550df5b13a544dc0865c6aef16e64c99d9 (diff)
- System : fix to get the distro name
- Services : fix on service names with accent - Services : ability to specify a host for each service - Network usage : fix to retrieve the name of the network interfaces - Memory : the cached and buffers memory are added to free memory now - Load Average : taking into account the number of cores - Disk usage : new option to hide tmpfs mountpoints - General : remove all PHP short tags
Diffstat (limited to 'libs/memory.php')
-rw-r--r--libs/memory.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/memory.php b/libs/memory.php
index 27a783e..67fee34 100644
--- a/libs/memory.php
+++ b/libs/memory.php
@@ -2,13 +2,13 @@
require 'Utils/Misc.class.php';
// Free
-if (!($free = shell_exec('grep MemFree /proc/meminfo | awk \'{print $2}\'')))
+if (!($free = shell_exec('/usr/bin/free -to | grep Mem: | awk \'{print $4+$6+$7}\'')))
{
$free = 0;
}
// Total
-if (!($total = shell_exec('grep MemTotal /proc/meminfo | awk \'{print $2}\'')))
+if (!($total = shell_exec('/usr/bin/free -to | grep Mem: | awk \'{print $2}\'')))
{
$total = 0;
}