From a2e9c7c0d75f5f4af06afa4c734cfad0f85b6aad Mon Sep 17 00:00:00 2001 From: Dylan Date: Fri, 29 Jan 2016 12:17:16 +1100 Subject: [PATCH] OS X: Added wired memory to memory usage --- fetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fetch b/fetch index 5385fcc9..b53af5e1 100755 --- a/fetch +++ b/fetch @@ -934,9 +934,10 @@ getmemory () { "Mac OS X") memtotal=$(printf "%s\n" "$(sysctl -n hw.memsize)"/1024^2 | bc) + memwired=$(vm_stat | awk '/wired/ { print $4 }') memactive=$(vm_stat | awk '/active / { printf $3 }') memcompressed=$(vm_stat | awk '/occupied/ { printf $5 }') - memused=$(((${memactive//.} + ${memcompressed//.}) * 4 / 1024)) + memused=$(((${wiredmem//.} + ${memactive//.} + ${memcompressed//.}) * 4 / 1024)) memory="${memused}MB / ${memtotal}MB" ;;