mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-22 19:49:54 +00:00
Fix free memory on OpenBSD
This commit is contained in:
2
fetch
2
fetch
@@ -642,7 +642,7 @@ getmemory () {
|
|||||||
*"BSD")
|
*"BSD")
|
||||||
memtotal=$(dmesg | awk '/real mem/ {printf $5}')
|
memtotal=$(dmesg | awk '/real mem/ {printf $5}')
|
||||||
memtotal=${memtotal/\(/}
|
memtotal=${memtotal/\(/}
|
||||||
memtotal=${memtotal/)MB/}
|
memtotal=${memtotal/MB\)/}
|
||||||
memfree=$(top -d 1 | awk '/Real:/ {print $6}')
|
memfree=$(top -d 1 | awk '/Real:/ {print $6}')
|
||||||
memfree=${memfree/M/}
|
memfree=${memfree/M/}
|
||||||
memused=$((memtotal - memfree))
|
memused=$((memtotal - memfree))
|
||||||
|
|||||||
Reference in New Issue
Block a user