Commit 2b3940ad authored by Dylan Araps's avatar Dylan Araps

Memory: [OpenBSD] Fix OpenBSD memory usage - @Head-on-a-Stick (Closes #413)

parent 2c20ec3a
...@@ -1073,7 +1073,11 @@ getmemory() { ...@@ -1073,7 +1073,11 @@ getmemory() {
"NetBSD"*) memtotal="$(($(sysctl -n hw.physmem64) / 1024 / 1024))" ;; "NetBSD"*) memtotal="$(($(sysctl -n hw.physmem64) / 1024 / 1024))" ;;
*) memtotal="$(($(sysctl -n hw.physmem) / 1024 / 1024))" ;; *) memtotal="$(($(sysctl -n hw.physmem) / 1024 / 1024))" ;;
esac esac
memused="$((memtotal - memfree))"
case "$distro" in
"OpenBSD"*) memused="$(($(vmstat | awk 'END {printf $4}') / 1024))" ;;
*) memused="$((memtotal - memfree))" ;;
esac
;; ;;
"Solaris") "Solaris")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment