Fixed memory used

This commit is contained in:
Emmanuel Geoffray 2017-12-07 20:49:12 +01:00 committed by GitHub
parent 674c38a54e
commit 4325f9a9cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ function DisplaySystem(){
// mem used
$memused_status = "primary";
exec("free -m | awk '/Mem:/ { total=$2 } /buffers\/cache/ { used=$3 } END { print used/total*100}'", $memarray);
exec("free -m | awk '/Mem:/ { total=$2 ; used=$3 } END { print used/total*100}'", $memarray);
$memused = floor($memarray[0]);
if ($memused > 90) { $memused_status = "danger"; }
elseif ($memused > 75) { $memused_status = "warning"; }