Solved sysctl: tunable values are set in …

Use sysctl command to enable or disable (after booting into system)

Code:
sysctl kern.smp.disabled
sysctl kern.smp.disabled=0
sysctl kern.smp.disabled=1
Where, 0 - off / false and 1 - on / true. To make it permanent …

I did expect the command to fail, I did not expect this:

Code:
root@mowa219-gjp4-8570p-freebsd:~ # sysctl kern.smp.disabled=1
sysctl: oid 'kern.smp.disabled' is a read only tunable
sysctl: Tunable values are set in /boot/loader.conf
root@mowa219-gjp4-8570p-freebsd:~ #

As far as I know, /etc/sysctl.conf should be preferred. True or false?

loader.conf

sysctl.conf
 
some can only be set before the kernel boots (loader.conf), some only after the kernel boots, some in both places
look at -W and -T flags of sysctl(8)
 
Thanks.

I just discovered that yesterday, I had a misleading test result with this particular tunable in /etc/sysctl.conf (not in /boot/loader.conf)
  • the tunable was in the wrong file
  • despite the wrong placement, I did get the required effect – symmetric multiprocessor support was disabled
htop(1) presented just one CPU.

smp(4)



I could share a likely explanation for the misleading result, but readers might not understand the explanation, so I'll keep it to myself and mark this topic Solved.
 
Back
Top