Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Jul 1998 20:51:31 +0200 (MET DST)
From:      Willem Jan  Withagen <wjw@surf.IAE.nl>
To:        mike@smith.net.au
Cc:        hackers@FreeBSD.ORG, wjw@digiware.nl
Subject:   Re: adding to sysctl env.
Message-ID:  <199807051851.UAA04997@surf.IAE.nl>
In-Reply-To: <199807051642.JAA05317@antipodes.cdrom.com>
References:  <199807042215.AAA00277@hobby.digiware.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <199807051642.JAA05317@antipodes.cdrom.com> you write:
>> Hi,
>> 
>> I'm trying to add things to the sysctl environment, and I thought to take
>> a simple step first:
>> 	make a debug.switch for the vlink module.
>> So I added:
>> ----
>> /* 
>>  *  For the vlink module debugging
>>  */   
>> static int vlinkxlatedebug = 0;
>> SYSCTL_INT(_debug, OID_AUTO, vlinkxlate, CTLFLAG_RW, &vlinkxlatedebug, 0,
>> "");
>> ----
>> expecting to see it apear in my sysctl -a output.
>> 
>> But guess what: I didn't. :-{
>
>It should have.  Make sure that the source file is actually being built 
>as part of the kernel.  You could be more paranoid and remove the 
>'static', then try
>
># nm /kernel | grep vlinkxlate
>
>in order to make sure that the symbol is present in the running kernel.

It is in the kernel, even the sysctl_entry:
f014b740 t _sysctl___debug_vlinkxlate

as are the variable and the function:

f014b7f0 T _vlink_xlate
f0276f80 d _vlinkxlatedebug

However it was a good hint:
wjw@hobby> nm /kernel | grep __debug
f011cd2c t ___set_sysctl__debug_sym_sysctl___debug
f014dd24 t ___set_sysctl__debug_sym_sysctl___debug_busyprt
f0120990 t ___set_sysctl__debug_sym_sysctl___debug_debugger_on_panic
f01e5290 t ___set_sysctl__debug_sym_sysctl___debug_doasyncfree
f010efe8 t ___set_sysctl__debug_sym_sysctl___debug_elf_trace
f011603c t ___set_sysctl__debug_sym_sysctl___debug_fdexpand
f01657c0 t ___set_sysctl__debug_sym_sysctl___debug_if_tun_debug
f01373d8 t ___set_sysctl__debug_sym_sysctl___debug_ttydebug
f0148cf8 t ___set_sysctl__debug_sym_sysctl___debug_vfscache
f011cd28 t ___set_sysctl__sym_sysctl___debug
f011cd04 t _sysctl___debug
f014dd00 t _sysctl___debug_busyprt
f0120960 t _sysctl___debug_debugger_on_panic
f01e5264 t _sysctl___debug_doasyncfree
f010efc0 t _sysctl___debug_elf_trace
f0116014 t _sysctl___debug_fdexpand
f0165794 t _sysctl___debug_if_tun_debug
f01373b0 t _sysctl___debug_ttydebug
f0148cd0 t _sysctl___debug_vfscache
f014b740 t _sysctl___debug_vlinkxlate
f0281a0c ? _sysctl__debug

But I'm for shure that there a lot more debug variables which aren't shown
wjw@hobby> sysctl -a | grep debug
debug.elf_trace: 0
debug.fdexpand: 0
debug.debugger_on_panic: 1
debug.ttydebug: 0
debug.vfscache: 1
debug.if_tun_debug: 0
debug.doasyncfree: 1

Which is also missing busyprt!
Obviously I'd atleast have to have an entry like:
___set_sysctl__debug_sym_sysctl___debug_vlinkxlate
And then still run the risk that it doesn't show 'cause it is treated like
busyprt

Which leads me to the following question:
Is there a large difference between sysctl on -stable and on -current?

Why: I just feel like ripping it out because in the long run I'll problably
have to do it anyways, since I need dynamic allocation for my vlink-stuff.

I'd then create a double linked chain (for top level) with double-linked 
subschains for all the sub.mib.levels. [my first hunch]


--WjW
-- 
Internet Access Eindhoven BV.,  voice: +31-40-2 393 393, data: +31-40-2 606 606
P.O. 928, 5600 AX Eindhoven, The Netherlands
Full Internet connectivity for only fl 12.95 a month.
Call now, and login as 'new'.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



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