Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Apr 2003 14:14:06 +0200
From:      Igor Pokrovsky <igor.pokrovsky@cnrm.meteo.fr>
To:        "Nickolay A. Kritsky" <nkritsky@star.spb.ru>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Kernel variables - where is TFM?
Message-ID:  <20030416121406.GA229@exmatis1.cnrm.meteo.fr>
In-Reply-To: <2377892423.20030416140852@star.spb.ru>
References:  <1222010669.20030415223730@star.spb.ru> <20030416073329.GB298@exmatis1.cnrm.meteo.fr> <2377892423.20030416140852@star.spb.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 16, 2003 at 02:08:52PM +0400, Nickolay A. Kritsky wrote:
> >> Hello freebsd-hackers,
> >> 
> >>   While browsing FreeBSD kernel sources I ocassionally stick in some
> >> strange words which I suppose are kernel-space global variables. For
> >> example: ticks, hz. Where can I find info about such variables? Please
> >> cc me in your reply, or reply me off-list because I am not subscribed
> >> to -hackers.
> 
> IP> sysctl -a | grep hz
> On my 4.6 system it gives me:
> kern.clockrate: { hz = 100, tick = 10000, tickadj = 5, profhz = 1024, stathz = 128 }
> What does that mean? hz is the IRQ0 frequency? Then, what is tick? and
> what is ticks (note the trailing `s') ?

Where did you find 'ticks'?

>From /usr/include/sys/time.h :

-- snip --
/*
 * Getkerninfo clock information structure
 */
struct clockinfo {
        int     hz;             /* clock frequency */
        int     tick;           /* micro-seconds per hz tick */
        int     tickadj;        /* clock skew rate for adjtime() */
        int     stathz;         /* statistics clock frequency */
        int     profhz;         /* profiling clock frequency */
};
-- snip --

> IP> sysctl(8)
> sysctl. Well, this is great, but here comes another question:
> in /usr/src/sys/netinet/tcp_syncache_c one can see:
> ;-----------------Begin clipboard--------------------------
> SYSCTL_INT(_net_inet_tcp, OID_AUTO, syncookies, CTLFLAG_RW,
>     &tcp_syncookies, 0, 
>     "Use TCP SYN cookies if the syncache overflows");
> ;-------------------End clipboard--------------------------
> Is it the place where sysctl is added to kernel state MIB? If yes, I
> assume that every sysctl can have a `description' (the last parameter
> in SYSCTL_INT macro). Is there an interface to read such descriptions?

The only place where you can see all descriptions AFAIK is
sysctl(3) (note '3', not '8')

-- 
Igor



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030416121406.GA229>