Reading currently running kernel configuration

Hi!

Is it possible to read configuration options for currently running kernel (without having the configuration file)? I need to find out if kernel was compiled with for example smp option.

Thanks in advance,

pbd
 
In addition to that, there are some commands to find out what's in your kernel:

strings /boot/kernel/kernel
dmesg -a

There's also a kernel option to include the entire kernel config file in the kernel itself, but I'm drawing a pre-coffee blank atm.
 
trev said:
Code:
options INCLUDE_CONFIG_FILE

Thanks everybody. Where can I find the configuration, if I build kernel with this option? Is it just included in plain text in the kernel file?
 
A simple
Code:
> kldstat -v
will give you an idea of what devices are in the kernel, though if all you really want is to know if smp is on
Code:
> sysctl kern.smp
kern.smp.forward_roundrobin_enabled: 1
kern.smp.forward_signal_enabled: 1
kern.smp.topology: 0
kern.smp.cpus: 2
kern.smp.disabled: 0
kern.smp.active: 1
kern.smp.maxcpus: 32
kern.smp.maxid: 1
should suffice.
 
Back
Top