Trying to get this to work
This commit is contained in:
parent
167260211a
commit
eeff7ec82d
2 changed files with 4 additions and 4 deletions
|
@ -18,7 +18,7 @@ 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 '{print $2 $3}' | sed 's/used//g')
|
||||||
total_mem=$(system_profiler SPHardwareDataType | grep "Memory:" | 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
|
echo $used_mem/$total_mem\G\B
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue