Finding memory use in procfs?

Greetings again. I want to see how much memory is being used by the current process. That doesn't seem to be one of the items in /proc/curproc/status, and I'm not sure if I can read /proc/curproc/map correctly to see how much memory total is being used. Is this available in some consistent place (other than top(1))?
 
I'm traveling and don't have a Linux box available to confirm this, but does procstat -r <PID> show you what you need? General procstat(1) is the tool to get information about processes that you would get through /proc on Linux.
 
I'm assuming "Linux" is a typo because the forum is for FreeBSD (and there is no procstat on Linux). Still, I'm not seeing a value in
procstat -r
that is "the total memory used by this process".
 
Sorry about that, I've answered a couple questions on a FreeBSD equivalent for what is in a Linux /proc and my mind stuck "Linux" into your questions as I read it. The procstat -r <PID> shows RSS which matches RES in top. Are you just looking for what's under the size column? There might be a ps(1) flag for that.
 
Back
Top