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

This commit is contained in:
Dylan Araps 2016-11-03 11:14:34 +11:00
parent 2c20ec3a16
commit 2b3940adb9

View file

@ -1073,7 +1073,11 @@ getmemory() {
"NetBSD"*) memtotal="$(($(sysctl -n hw.physmem64) / 1024 / 1024))" ;;
*) memtotal="$(($(sysctl -n hw.physmem) / 1024 / 1024))" ;;
esac
memused="$((memtotal - memfree))"
case "$distro" in
"OpenBSD"*) memused="$(($(vmstat | awk 'END {printf $4}') / 1024))" ;;
*) memused="$((memtotal - memfree))" ;;
esac
;;
"Solaris")