From nobody@FreeBSD.org  Thu Oct  8 11:57:01 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 48E4A106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  8 Oct 2009 11:57:01 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 385758FC18
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  8 Oct 2009 11:57:01 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n98Bv0QO085707
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 8 Oct 2009 11:57:00 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n98Bv0Ds085674;
	Thu, 8 Oct 2009 11:57:00 GMT
	(envelope-from nobody)
Message-Id: <200910081157.n98Bv0Ds085674@www.freebsd.org>
Date: Thu, 8 Oct 2009 11:57:00 GMT
From: Alexander Zagrebin <alexz@visp.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Wrong behavior of KTR_VERBOSE
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         139425
>Category:       kern
>Synopsis:       [kernel] [patch] Wrong behavior of KTR_VERBOSE
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 08 12:00:11 UTC 2009
>Closed-Date:    
>Last-Modified:  Thu Oct 08 14:29:10 UTC 2009
>Originator:     Alexander Zagrebin
>Release:        FreeBSD 8.0-RC1
>Organization:
>Environment:
FreeBSD xxxxxxx 8.0-RC1 FreeBSD 8.0-RC1 #5: Fri Oct  2 23:10:02 MSD 2009     alex@xxxxxxx:/usr/src/sys/i386/compile/KERNEL  i386
>Description:
ktr(4) says, that KTR_VERBOSE option only sets the default value for the debug.ktr.verbose environment variable.
But really debug.ktr.verbose is not available without this option.
So behavior of the KTR_VERBOSE differs from behavior, described in the manual page.
>How-To-Repeat:
Add "options KTR" to the kernel config; recompile kernel; reboot

# sysctl debug.ktr.verbose
sysctl: unknown oid 'debug.ktr.verbose'

Add "options KTR_VERBOSE" to the kernel config; recompile kernel; reboot

# sysctl debug.ktr.verbose
debug.ktr.verbose: 0
>Fix:
It depends :)
Or /usr/src/sys/kern/kern_ktr.c or ktr(4) manual page have to be fixed

May be:

--- kern_ktr.c.orig     2009-09-30 09:31:37.000000000 +0400
+++ kern_ktr.c  2009-10-08 15:52:02.000000000 +0400
@@ -124,9 +124,11 @@

 #ifdef KTR_VERBOSE
 int    ktr_verbose = KTR_VERBOSE;
+#else
+int    ktr_verbose = 0;
+#endif
 TUNABLE_INT("debug.ktr.verbose", &ktr_verbose);
 SYSCTL_INT(_debug_ktr, OID_AUTO, verbose, CTLFLAG_RW, &ktr_verbose, 0, "");
-#endif

 #ifdef KTR_ALQ
 struct alq *ktr_alq;


>Release-Note:
>Audit-Trail:
>Unformatted:
