Commit 2b13b8a9 authored by Muhammad Herdiansyah's avatar Muhammad Herdiansyah

Memory: Added support for AIX

parent d896c299
...@@ -1218,6 +1218,13 @@ get_memory() { ...@@ -1218,6 +1218,13 @@ get_memory() {
mem_used="$(sysinfo -mem | awk -F '\\/|)' '{print $2; exit}')" mem_used="$(sysinfo -mem | awk -F '\\/|)' '{print $2; exit}')"
mem_used="$((${mem_used/max} / 1024 / 1024))" mem_used="$((${mem_used/max} / 1024 / 1024))"
;; ;;
"AIX")
mem_stat=($(svmon -G -O unit=MB))
mem_total="${mem_stat[11]/.*}"
mem_free="${mem_stat[16]/.*}"
mem_used="$((mem_total - mem_free))"
;;
esac esac
memory="${mem_used}MB / ${mem_total}MB" memory="${mem_used}MB / ${mem_total}MB"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment