mirror of
https://github.com/KittyKatt/screenFetch.git
synced 2026-04-24 03:00:16 -04:00
Merge pull request #174 from jepugs/master
Fixed total memory detection on OpenBSD.
This commit is contained in:
@@ -995,7 +995,7 @@ detectmem () {
|
||||
used_mem=$(($round_mem - $avail_mem))
|
||||
usedmem=$(($used_mem / ($human * $human) ))
|
||||
elif [ "$distro" == "OpenBSD" ]; then
|
||||
totalmem=$(top -1 1 | awk '/Real:/ {k=split($3,a,"/");print a[k] }' | tr -d 'M')
|
||||
totalmem=`dmesg | grep 'real mem' | cut -d' ' -f5 | tr -d '()MB'`
|
||||
usedmem=$(top -1 1 | awk '/Real:/ {print $3}' | sed 's/M.*//')
|
||||
elif [ "$distro" == "NetBSD" ]; then
|
||||
phys_mem=$(awk '/MemTotal/ { print $2 }' /proc/meminfo)
|
||||
|
||||
Reference in New Issue
Block a user