Checking the Linux kernel debugging option

How can I find out if the standard kernel provided in my linux flavor is selected, the DEBUG KERNEL ENABLED flags or not?

I think the DEBUG option should be turned on to use tools like kprobe, systemtap ??

+4
source share
5 answers

To find out how your kernel is configured, check the /boot/ directory. Depending on how your distribution does something, there might be a config-* file that shows the kernel configuration parameters that were used to build the kernel. Find the debug settings (e.g. CONFIG_DEBUG_KERNEL ).

+2
source

Assuming the kernel has "provide configuration through proc", you can check the configuration of a working kernel by looking at /proc/config.gz

 gunzip -c /proc/config.gz | less 
+6
source

If it is RHEL / CentOS / Fedora:

The kernel configuration is inside the kernel-devel package .

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

+1
source

In RHEL 5, you can also check all the drivers installed on the server through the kernel:

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

Please note: you can get the full path:

 rpm -ql kernel | grep -i symver* 

Also lsmod | more lsmod | more should do. Hope this helps.

+1
source

A standard kernel would probably NOT be compiled with these flags enabled, as this would increase the size of the kernel. Overhead will be a disadvantage for most users.

You always have the opportunity to recompile your own version of the kernel, in which case you can choose your own set of parameters.

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

0
source

All Articles