From 2b13b8a9cd060cf8dd391c8f363fbbbedbd50ffa Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Wed, 4 Jan 2017 12:45:33 +0700 Subject: [PATCH] Memory: Added support for AIX --- neofetch | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/neofetch b/neofetch index 23a296c0..cded7796 100755 --- a/neofetch +++ b/neofetch @@ -1218,6 +1218,13 @@ get_memory() { mem_used="$(sysinfo -mem | awk -F '\\/|)' '{print $2; exit}')" 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 memory="${mem_used}MB / ${mem_total}MB"