Friday, April 17, 2015

How to detect memory leak in the linux kernel 2.6.29



Is there a way to find out if Linux kernel is leaking memory by running some commands? I am almost positive that the linux kernel is leaking memory. However, the top and free -k do not reveal much. Is there a way that I can look at how much memory kernel has allocated and hopefully some kind of a memory map too?
Thanks for any inputs


Answer




Try looking at /proc/meminfo:



$ cat /proc/meminfo


The resulting fields are described in the kernel documentation.



If you see Slab or KernelStack growing over time then maybe you're on to something. However, if the big consumers are AnonPages, Mapped and Shmem then it's a userspace issue not a kernel issue.


No comments:

Post a Comment