Fix memused on FreeBSD
This commit is contained in:
parent
6107b29f50
commit
48787b3684
1 changed files with 1 additions and 1 deletions
2
fetch
2
fetch
|
@ -629,7 +629,7 @@ getmemory () {
|
|||
|
||||
*"BSD")
|
||||
memtotal=$(dmesg | awk '/real mem/ {printf $5}')
|
||||
memused=$(top -d1 | awk '/Real:/ {print $3}')
|
||||
memused=$(top -d1 | awk '/Mem:/ {print $4}')
|
||||
memtotal=${memtotal/()MB/}
|
||||
memused=${memused/M/}
|
||||
memory="${memused}MB / ${memtotal}MB"
|
||||
|
|
Loading…
Reference in a new issue