Re: examples of programmatic use of sysctl

From: Peter Jeremy <peterjeremy_at_optushome.com.au>
Date: Sat, 13 Oct 2007 10:28:55 +1000
On 2007-Oct-12 16:11:12 -0700, Jack Vogel <jfvogel_at_gmail.com> wrote:
>In my PTP/IEEE 1588 implementation I was considering using sysctl
>to pass data in and out of the driver and it needs to be from some app
>program not interactive.
>
>I was just wondering if anyone can point me at anything besides the
>sysctl command that is doing this?

If you mean exchanging data in general between userland and kernel
then rummaging though the source looking for sysctlbyname() (or
sysctl() or sysctlnametomib()) will turn up lots of hits.

Without knowing exactly what you are trying to achieve, I can't be
absolutely certain but potentially interesting places to look would be
conscontrol(8), dumpon(8), ipcs(1) etc.  Note that most of the *stat
commands, as well as ps, use sysctl rather than grovelling around in
/dev/kmem.

-- 
Peter Jeremy

Received on Fri Oct 12 2007 - 22:28:58 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:19 UTC