summaryrefslogtreecommitdiff
path: root/libs/memory.php
diff options
context:
space:
mode:
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;
}