1

I can obtain a wonderful memory map of all processes with the Linux command

pmap $(ps -A | awk '{print $1}'|grep -v PID) | sort | grep \^0

It looks like

...
00007fd6dbf45000      4K rw---  /lib/libnss_compat-2.11.1.so 
00007fd6dbf46000   1524K r-x--  /lib/libc-2.11.1.so
00007fd6dc0c3000   2044K -----  /lib/libc-2.11.1.so  
...

All processes' memory maps are merged here. But I am missing the information where the kernel has its memory pages. Is there a similar tool for the "complete memory map"?

1

2 Answers 2

1

Your command doesn't make much sense. The addresses reported by pmap for each process are only valid in theses processes own address space, i.e. in their virtual memory. They will kind of "overlap" while technically they correspond to different pages. Some of them won't be in RAM but on disk.

The pages owned by the kernel use are on the other hand stored on physical memory.

2
  • thanks. So how can I get an overview what is stored in physical memory? Mar 18, 2014 at 11:24
  • cat /proc/meminfo will give you an physical memory usage overview.
    – jlliagre
    Mar 19, 2014 at 16:23
0

Better approach would be to use sysrq.

Run following and check your /var/log/messages.

# echo m > /proc/sysrq-trigger

This would give you zone wise memory dump. Checkout following url

https://www.kernel.org/doc/gorman/html/understand/understand005.html

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .