memory [openbsd]: Fix crash

This commit is contained in:
Dylan Araps 2017-12-25 19:25:54 +11:00
parent a53cbdbc14
commit 5ffd5149b4

View file

@ -1411,7 +1411,7 @@ get_memory() {
# Mem used. # Mem used.
case "$kernel_name" in case "$kernel_name" in
"OpenBSD"*) mem_used="$(($(vmstat | awk 'END{printf $4}') / 1024))" ;; "OpenBSD"*) mem_used="$(($(vmstat | awk -F ' |M' 'END{printf $4}') / 1024))" ;;
*) mem_used="$((mem_total - mem_free))" ;; *) mem_used="$((mem_total - mem_free))" ;;
esac esac
;; ;;