From: Jeff Dike <jdike@ka...> - 2002-03-07 20:15:14
> Doesn't the RSS include shared memory segments as well?
Yup. That's why adding up RSS won't work.
> I assume these are the maps that the UML kernel sets up for the UML
> kernel's processes.
Yup, but those may not be resident. /proc/<pid>/maps shows you the maximum
memory that a process could possible being using at that moment.
> So when you get down to the bottom of this how do you tell how much
> memory a user-mode-linux instance is really using?
Mount tmpfs on /tmp. Write down the free space in /tmp before booting UML.
Boot UML, get it to whatever you consider its steady state to be. Write down
the /tmp free space again. Subtract the two. That will be pretty close.