Kernel variables - where is TFM?

Nickolay A. Kritsky nkritsky at star.spb.ru
Wed Apr 16 03:09:26 PDT 2003


Hello Igor,

First, thanks for the reply. But I still have some questions.

Wednesday, April 16, 2003, 11:33:29 AM, you wrote:

IP> On Tue, Apr 15, 2003 at 10:37:30PM +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') ?
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?

-- 
Best regards,
;  Nickolay A. Kritsky
; SysAdmin STAR SPb
; mailto:nkritsky at star.spb.ru




More information about the freebsd-hackers mailing list