Memory [HP-UX]: Add partial support

This commit is contained in:
Muhammad Herdiansyah 2017-07-04 19:36:29 +07:00
parent d233e5bb2e
commit 9b51f9f528

View file

@ -1356,6 +1356,13 @@ get_memory() {
mem_free="$((mem_stat[5] / 1024))"
mem_used="$((mem_total - mem_free))"
;;
"HP-UX")
# Partial support. Again, hppa and IA64 have a different
# command of how to access this. And they need root for
# some rason.
mem_free="$(($(vmstat | awk 'NR==3{printf $5}') / 1024))"
;;
esac
memory="${mem_used}${mem_label:-MiB} / ${mem_total}${mem_label:-MiB}"