Question

How can I know if the standard kernel provided in my linux flavour has got DEBUG KERNEL ENABLED flags selected or not ??

I think DEBUG option should be enabled inorder to use tools like kprobe, systemtap ??

Was it helpful?

Solution

To find out how your kernel was configured, check in the /boot/ directory. Depending on how your distro does things, there might be a config-* file, which shows the kernel configuration options that were used to build the kernel. Look for the debug settings (eg CONFIG_DEBUG_KERNEL).

OTHER TIPS

Assuming the kernel has the "provide config via proc" you can check the configuration of the running kernel by looking at /proc/config.gz

gunzip -c /proc/config.gz | less

If it's RHEL / CentOS / Fedora:

Kernel configuration is inside the kernel-devel package.

The specific configuration used by Red Hat to build your distro's kernel is stored in /usr/src/kernels/version/.config.

In RHEL 5 you can also check all the drivers that are installed into server via the kernel by:

gunzip -c  /boot/symvers-2.6.18-274.3.1.el5.gz | less

Note, you can get the full path by:

rpm -ql kernel | grep -i symver*

Also lsmod | more should do as well. Hope this will help.

The standard kernel would probably NOT have been compiled with those flags enabled, since this would increase the size of the kernel. The overhead would be a disadvantage to most users.

You always have the option of recompiling your own custom version of the kernel, in which case you may select your own set of options.

You can list the modules compiled into the kernel with the lsmod command.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top