Merge pull request #370 from coypoop/patch-1

netbsd specific stuff for grabbing memory size
This commit is contained in:
Dylan Araps 2016-10-16 20:15:48 +11:00 committed by GitHub
commit 9bc65656ed
1 changed files with 4 additions and 1 deletions

View File

@ -1172,7 +1172,10 @@ getmemory() {
*) memfree="$(($(vmstat | awk 'END{printf $5}') / 1024))" ;;
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))"
;;