Fix free memory on OpenBSD

This commit is contained in:
Dylan 2016-01-18 17:21:32 +11:00
parent 148742e1fe
commit 10be9f4759

2
fetch
View file

@ -642,7 +642,7 @@ getmemory () {
*"BSD")
memtotal=$(dmesg | awk '/real mem/ {printf $5}')
memtotal=${memtotal/\(/}
memtotal=${memtotal/)MB/}
memtotal=${memtotal/MB\)/}
memfree=$(top -d 1 | awk '/Real:/ {print $6}')
memfree=${memfree/M/}
memused=$((memtotal - memfree))