where to export system tuneables, /proc/sys/kernel or /sys/?
I'm doing some kernel work that will export tuneables to userspace. In 2.4 I would have used /proc/sys/kernel, but now there is /sys, which was supposed to be for system information.
However, a bit of poking around in /sys didn't reveal any obvious place to put it. Is current practice to still put this sort of thing in /proc?
Thanks,
Chris
Followup to: <[email protected]> By author: Chris Friesen <[email protected]> In newsgroup: linux.dev.kernel
Quoted 8 lines
I'm doing some kernel work that will export tuneables to userspace. In 2.4 I would have used
/proc/sys/kernel, but now there is /sys, which was supposed to be for system information.However, a bit of poking around in /sys didn't reveal any obvious place to put it. Is current practice to still put this sort of thing in /proc?
/proc/sys/kernel, using the sysctl internals, yes.
Note that the use of the sysctl(2) system call is highly deprecated, but the /proc/sys filesystem tree is not; the reason is that the numeric API used by the former is unstable.
-hpa