From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 16 05:14:51 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 681DA37B401 for ; Wed, 16 Apr 2003 05:14:51 -0700 (PDT) Received: from vivaldi.meteo.fr (vivaldi.meteo.fr [137.129.28.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id 30BCF43FA3 for ; Wed, 16 Apr 2003 05:14:44 -0700 (PDT) (envelope-from igor.pokrovsky@cnrm.meteo.fr) Received: from cti825.cnrm.meteo.fr (localhost.meteo.fr [127.0.0.1]) MAA16869 for ; Wed, 16 Apr 2003 12:14:40 GMT Received: from xdata.cnrm.meteo.fr (xdata.cnrm.meteo.fr [137.129.150.2]) OAA07581; Wed, 16 Apr 2003 14:14:38 +0200 (MESTDST) Received: from exmatis1.cnrm.meteo.fr (exmatis1.cnrm.meteo.fr [137.129.157.46]) by xdata.cnrm.meteo.fr with ESMTP (8.9.3 (PHNE_24419)/8.7.1) id OAA21783; Wed, 16 Apr 2003 14:14:36 +0200 (METDST) Received: from exmatis1.cnrm.meteo.fr (localhost [127.0.0.1]) h3GCE6ZG000350; Wed, 16 Apr 2003 14:14:06 +0200 (CEST) (envelope-from pokrovsi@exmatis1.cnrm.meteo.fr) Received: (from pokrovsi@localhost) by exmatis1.cnrm.meteo.fr (8.12.9/8.12.9/Submit) id h3GCE63f000349; Wed, 16 Apr 2003 14:14:06 +0200 (CEST) Date: Wed, 16 Apr 2003 14:14:06 +0200 From: Igor Pokrovsky To: "Nickolay A. Kritsky" Message-ID: <20030416121406.GA229@exmatis1.cnrm.meteo.fr> Mail-Followup-To: Igor Pokrovsky , "Nickolay A. Kritsky" , freebsd-hackers@freebsd.org References: <1222010669.20030415223730@star.spb.ru> <20030416073329.GB298@exmatis1.cnrm.meteo.fr> <2377892423.20030416140852@star.spb.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2377892423.20030416140852@star.spb.ru> User-Agent: Mutt/1.4.1i X-Accept-Language: ru X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (cti825/CNRM) Organization: METEO FRANCE(CNRM) cc: Igor Pokrovsky cc: freebsd-hackers@freebsd.org Subject: Re: Kernel variables - where is TFM? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Igor Pokrovsky List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2003 12:14:51 -0000 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