Commit 9bc65656 authored by Dylan Araps's avatar Dylan Araps Committed by GitHub

Merge pull request #370 from coypoop/patch-1

netbsd specific stuff for grabbing memory size
parents b937782e 04685755
...@@ -1172,7 +1172,10 @@ getmemory() { ...@@ -1172,7 +1172,10 @@ getmemory() {
*) memfree="$(($(vmstat | awk 'END{printf $5}') / 1024))" ;; *) memfree="$(($(vmstat | awk 'END{printf $5}') / 1024))" ;;
esac esac
memtotal="$(($(sysctl -n hw.physmem) / 1024 / 1024))" case "$distro" in
"NetBSD"*) memtotal="$(($(sysctl -n hw.physmem64) / 1024 / 1024))" ;;
*) memtotal="$(($(sysctl -n hw.physmem) / 1024 / 1024))" ;;
esac
memused="$((memtotal - memfree))" memused="$((memtotal - memfree))"
;; ;;
......
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