Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm skeptical about your little script (though I too have a lot of heavy apps open all the time and almost never reboot, and certainly have never, ever had any memory-related problems whatsoever).

My MBP has 8 GBs of RAM, and this is what Activity Monitor tells me:

   Free: 2.19 GB
   Wired: 1.01 GB
   Active: 3.70 GB
   Inactive: 1.08 GB
   Used: 5.80 GB
but, you scripts gives me:

   2598.480 MB
Why is that? Isn't Active kinda analogous to -o rss?


I think that's because 'ps -x' command only gives your own processes and not all processes. Add '-a' option to show stats for all processes.


You're right, typo. It's supposed to be -ax.


The script is wrong, it simply adds the RSS of processes together, but physical pages are shared between many processes.

Active is not like RSS, what Activity Monitor calls real memory is RSS.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: