realized the command i was trying to use was depreciated

This commit is contained in:
Ethan Edwards 2020-06-07 19:08:55 -04:00
parent 4cf72d94c3
commit 8ba9b20152

View file

@ -19,8 +19,8 @@ get_percent()
Darwin) Darwin)
# percent=$(ps -A -o %mem | awk '{mem += $1} END {print mem}') # 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 '{mem += $2} END {print mem}')
total_mem=$(hwprefs memory_size | sed 's/ //g; s/B//g;') total_mem=$(system_profiler SPHardwareDataType | grep "Memory:" | awk '{mem += $2} END {print mem}')
echo $used_mem/$total_mem echo $used_mem/$total_mem\G\B
;; ;;
CYGWIN*|MINGW32*|MSYS*|MINGW*) CYGWIN*|MINGW32*|MSYS*|MINGW*)