Memory [IRIX]: Added initial support

This commit is contained in:
Muhammad Herdiansyah 2017-05-16 14:58:47 +07:00
parent 928bb6296d
commit 2fcbc778f1

View file

@ -1295,6 +1295,13 @@ get_memory() {
mem_used="$((mem_total - mem_free))" mem_used="$((mem_total - mem_free))"
mem_label="MB" mem_label="MB"
;; ;;
"IRIX")
mem_stat=($(pmem | head -1))
mem_total="$((${mem_stat[3]} / 1024))"
mem_free="$((${mem_stat[5]} / 1024))"
mem_used="$((mem_total - mem_free))"
;;
esac esac
memory="${mem_used}${mem_label:-MiB} / ${mem_total}${mem_label:-MiB}" memory="${mem_used}${mem_label:-MiB} / ${mem_total}${mem_label:-MiB}"