Trying to get this to work

This commit is contained in:
Ethan Edwards 2020-06-07 19:19:52 -04:00
parent 167260211a
commit eeff7ec82d
2 changed files with 4 additions and 4 deletions

View file

@ -18,7 +18,7 @@ get_percent()
Darwin)
# percent=$(ps -A -o %mem | awk '{mem += $1} END {print mem}')
used_mem=$(top -l 1 -s 0 | grep PhysMem | awk '{mem += $2} END {print mem}')
used_mem=$(top -l 1 -s 0 | grep PhysMem | awk '{print $2 $3}' | sed 's/used//g')
total_mem=$(system_profiler SPHardwareDataType | grep "Memory:" | awk '{print $2 $3}' | sed 's/used//g')
echo $used_mem/$total_mem\G\B
;;