Skip to contentSkip to conversation

where to export system tuneables, /proc/sys/kernel or /sys/?

DISCUSSION Chris Friesen 2 participants 2 messages Feb 7, 2005 – Feb 8, 2005

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
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