I am on a shared host and I am only allowed to use so much RAM. How can I find out how much I am currently using ? I know top and free and ps and some other tools, but they usually only display memory for the entire system, not user-specific. There is also this SF post which gives me the impression measuring memory usage is not a s trivial as it seems.
Maybe some esoteric ps switch plus some shell scripting ? I am reasonably sure I am not the first one with that issue, so there is probably a straight-forward solution, just can't seem to find it...
The following should show the total resident set size (non-swapped physical memory) in KB.
If you need the virtual memory size, try: