I need to get the entire count of RAM being used on a command line. I can get individual process RSS usage using

ps -o rss= -p #{pid}

How do I get all the memory usage for the entire system on the command line?

  • A vote up from SO – Thomas Ayoub Apr 7 '14 at 16:42
  • 1
    To sum up all RSS from ps You can type: ps ax -o rss= | awk '{s+=$1}END{print s}' – Mateusz Szlosek Apr 8 '14 at 6:55
  • Thanks, though i think this may be missing some. When I run that and convert to GB google.com/… I get 4.127 GB though activity monitor shows 6.28 GB used – Schneems Apr 8 '14 at 15:46

You must log in to answer this question.

Browse other questions tagged .