Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Checking Linux Kernel Debugging option

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 ??

like image 725
codingfreak Avatar asked Dec 30 '22 10:12

codingfreak


2 Answers

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
like image 186
stsquad Avatar answered Dec 31 '22 22:12

stsquad


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).

like image 30
caf Avatar answered Dec 31 '22 23:12

caf