Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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"?

share|improve this question
    
Possible duplicate stackoverflow.com/questions/20480608/… –  Peter Lundgren Dec 17 '13 at 14:59

2 Answers 2

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.

share|improve this answer
    
thanks. So how can I get an overview what is stored in physical memory? –  Thorsten Staerk Mar 18 '14 at 11:24
    
cat /proc/meminfo will give you an physical memory usage overview. –  jlliagre Mar 19 '14 at 16:23

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.