Ubuntu – /proc/XXX/smaps does not exist

memoryUbuntu

I am trying to debug what is going on on an ubuntu server. I tried to use my good old friend smem but it does not display anything, even if run as root. strace shows the culprit:

open("/proc/32376/smaps", O_RDONLY)     = -1 ENOENT (No such file or directory)

I started to scream and kick. Hopefully, the server is not located in my office or it would have suffered some serious damage.

Maybe someone knows why the smaps files do not exist on this box ? (I am running a 2.6.38 kernel on a 64bit box so, it should be here, really)

Mathieu

Best Answer

From the proc(5) manpage:

This file is only present if the CONFIG_MMU kernel configuration option is enabled.

Check the kernel configuration to see if this option is enabled (look for a config- file in /boot/ or for /proc/config.gz):

% grep CONFIG_MMU /boot/config-$(uname -r)\
CONFIG_MMU=y
CONFIG_MMU_NOTIFIER=y