Subject: Re: Difference display sysctl
To: kamel derouiche <derouiche_dz@yahoo.fr>
From: Pavel Cahyna <pavel.cahyna@st.mff.cuni.cz>
List: tech-userlevel
Date: 02/17/2005 10:14:42
On Wed, 16 Feb 2005 21:18:33 +0100, kamel derouiche wrote:
>
>>If you are asking about the different sysctl's
>> between different operating
>> systems, this is a very broad question and too many
>> to cover easily.
>
> oui,
>
> Comme je travail seulement sur NetBSD/i386. je n'est
> aucun idée sur l'implentation et la sortie de
> sysctl(8) sur d'autre système:Linux,FreeBSD,
> IRIX,etc...
>
> je voudrais savoir est ce que sysctl(3) et sysctl.h
> diffère selon les architectures
sysctl is a feature of 4.4BSD. On systems derived from
it, such as FreeBSD, NetBSD, OpenBSD and Darwin/Mac OS X, the
implementation will be similar I guess, only the API for converting names
(MIBs) such as "kern.mbuf.nmbclusters" to numbers (OIDs) such as 1.39.3
is absent from OpenBSD.
On Linux, sysctl is implemented with a special subdirectory (/proc/sys)
inside the /proc file system. Every sysctl node corresponds to a file in
this filesystem. Numbers are formatted as text. There is no sysctl(3)
function - the sysctl(8) utility simply reads the filesystem.
On IRIX, there is a sysctl(3) function like that on 4.4BSD, but it offers
only a very limited number of MIBs.
BTW, there are nice online manual pages at
http://www.freebsd.org/cgi/man.cgi and SGI also has online man pages at
http://www.sgi.com/developers/resources/tech_pubs.html
Bye Pavel