View Single Post
  #1  
Old 12th September 2008, 10:24
ascetic angel ascetic angel is offline
Junior Member
 
Join Date: Sep 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Kernel memory Usage

How to know the % physical memory used by the Linux Kernel and by individual module?
I'm in a scenario like... say, I want to know the amount of RAM used by IPv6 module. How do I do this? I've tried top, pmap, size, lsmod etc. But couldn't infer much.
top> wan't much useful to identify the module
pmap> didn't help either as it needs pid
size> (usage #size /lib/modules/2.6.25-14.fc9.i686/kernel/net/ipv6/sit.ko) couldn't infer the output
lsmod also give some size info, but is that RAM usage? does that include code+data+heap?
free, /proc/meminfo, slabtop none are helpful for me!
I want the kernel's % of RAM usage (when applications are running) but not the process' % of RAM usage.
I'm going insane in finding this!

Thanks in advance!

# lsmod
Module Size Used by
sit 12104 0

# size /lib/modules/2.6.25-14.fc9.i686/kernel/net/ipv6/sit.ko
text data bss dec hex filename
5052 4500 200 9752 2618 /lib/modules/2.6.25-14.fc9.i686/kernel/net/ipv6/sit.ko

lsmod says it's 12104 bytes, size says 9752 bytes!!!

# ls /lib/modules/2.6.25-14.fc9.i686/kernel/net/ipv6/sit.ko -l
-rwxr--r-- 1 root root 14828 2008-05-01 16:19 /lib/modules/2.6.25-14.fc9.i686/kernel/net/ipv6/sit.ko

as listed by ls, size on disk, of sit.ko module is 14828 bytes...!

Last edited by ascetic angel; 12th September 2008 at 11:37. Reason: Added some more info
Reply With Quote
Sponsored Links