On Sat, Dec 13, 2003 at 12:54:19PM -0500, Rik van Riel wrote: > On Fri, 12 Dec 2003, Mike Fedyk wrote: > > > VmallocUsed is being reported in /proc/meminfo in 2.6 now. > > > > Is VmallocUsed contained within any of the other memory reported below? > > No. OK, thanks. > > > How can I get VmallocUsed from userspace in earlier kernels (2.[024])? > > You can't. OK, 2.6 only then... > > > And the same questions with PageTables too. :) > > Same answers ;) > > Maybe I should send marcelo a patch to export the PageTables > number in /proc somewhere ? Yes! Please do. /proc/meminfo hopefully. :) > > Are Dirty: and Writeback: counted in Inactive: or are they seperate? > > They're unrelated statistics to active/inactive and will > overlap with active/inactive. Do they count anonymous memory, or are they strictly dirty/writeback pagecache? > > > Does Mapped: include all files mmap()ed, or only the executable ones? > > Mapped: includes all mmap()ed pages, regardless of executable > status. Is mmap() always pagecache backed, or can it be backed with anonymous memory? IE, can I subtract mapped from pagecache? I have this excerpt from a perl script (attached) that feeds data into lrrd, a rrd-tool based graphing system. "apps.value" is basically everything that's not counted in /proc/meminfo (except for free, of course), and on 2.4 and below, it ends up showing a larger number than should be correct, since pagetables, and several other types of memory overhead are not reported. print "apps.value ", $mems{MemTotal}-$mems{MemFree}-$mems{Buffers}-$mems{Cached}-$mems{Slab}, "\n"; print "free.value ", $mems{MemFree}, "\n"; print "buffers.value ", $mems{Buffers}, "\n"; print "cached.value ", $mems{Cached}, "\n"; print "swap.value ", $mems{SwapTotal}-$mems{SwapFree}, "\n"; print "slab.value ", $mems{Slab}, "\n"; check out http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=223346 for one of the enhancements I'm making to the graphs. I'd love to find a more accurate way to get the amount of memory used for apps, short of reading the output of ps and doing calculations on RSS, VIRTUAL, and SHARED... Thanks, Mike