Fixed OpenBSD mem_used value

This commit is contained in:
rage311 2018-01-16 12:46:25 -07:00
parent c81e01405e
commit 96676ca4d5

View file

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