Fixed OpenBSD mem_used value

This commit is contained in:
rage311 2018-01-16 12:46:25 -07:00
parent c81e01405e
commit 96676ca4d5
1 changed files with 3 additions and 2 deletions

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
;;