1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Merge pull request #1124 from BANKA2017/fix-function-used-memory

Fix: function usedMemory
This commit is contained in:
Bill Zimmerman 2022-02-20 15:39:47 +01:00 committed by GitHub
commit 43ba0db577
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,7 +42,7 @@ class Sysinfo
public function usedMemory() public function usedMemory()
{ {
$used = shell_exec("free -m | awk '/Mem:/ { total=$2 ; used=$3 } END { print used/total*100}'"); $used = shell_exec("free -m | awk 'NR==2{ total=$2 ; used=$3 } END { print used/total*100}'");
return floor($used); return floor($used);
} }