Memory: [BSD] Remove Free from output

This commit is contained in:
Dylan Araps 2016-12-05 10:55:56 +11:00
parent 4c860aaea4
commit 242b2bd589
1 changed files with 5 additions and 1 deletions

View File

@ -1083,7 +1083,11 @@ get_memory() {
# Mem free # Mem free
case "$distro" in case "$distro" in
"NetBSD"*) mem_free="$(($(awk -F ':|kB' '/MemFree:/ {printf $2}' /proc/meminfo) / 1024))" ;; "NetBSD"*) mem_free="$(($(awk -F ':|kB' '/MemFree:/ {printf $2}' /proc/meminfo) / 1024))" ;;
"FreeBSD"* | "DragonFly"*) mem_free="$(top -d 1 | awk -F ',' '/^Mem:/ {print $5}')";; "FreeBSD"* | "DragonFly"*)
mem_free="$(top -d 1 | awk -F ',' '/^Mem:/ {print $5}')"
mem_free="${mem_free/M Free}"
;;
"OpenBSD"*) ;; "OpenBSD"*) ;;
*) mem_free="$(($(vmstat | awk 'END{printf $5}') / 1024))" ;; *) mem_free="$(($(vmstat | awk 'END{printf $5}') / 1024))" ;;
esac esac