From owner-freebsd-bugs@FreeBSD.ORG Wed Jun 13 03:10:05 2007 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7B63216A478 for ; Wed, 13 Jun 2007 03:10:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 6426013C489 for ; Wed, 13 Jun 2007 03:10:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l5D3A4qo026418 for ; Wed, 13 Jun 2007 03:10:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l5D3A4YS026416; Wed, 13 Jun 2007 03:10:04 GMT (envelope-from gnats) Resent-Date: Wed, 13 Jun 2007 03:10:04 GMT Resent-Message-Id: <200706130310.l5D3A4YS026416@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ben Wilber Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 93A0616A400 for ; Wed, 13 Jun 2007 03:01:58 +0000 (UTC) (envelope-from bw@yui.desync.com) Received: from yui.desync.com (yui.desync.com [64.157.15.117]) by mx1.freebsd.org (Postfix) with ESMTP id 4836213C468 for ; Wed, 13 Jun 2007 03:01:58 +0000 (UTC) (envelope-from bw@yui.desync.com) Received: from yui (localhost [127.0.0.1]) by yui (8.14.1/8.14.1) with ESMTP id l5BF0erV032121 for ; Mon, 11 Jun 2007 15:00:40 GMT (envelope-from bw@yui) Received: (from bw@localhost) by yui (8.14.1/8.14.1/Submit) id l5BF0Z8p032120; Mon, 11 Jun 2007 15:00:35 GMT (envelope-from bw) Message-Id: <200706111500.l5BF0Z8p032120@yui> Date: Mon, 11 Jun 2007 15:00:35 GMT From: Ben Wilber To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/113639: -CURRENT logs too much TCP information X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ben Wilber List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jun 2007 03:10:05 -0000 >Number: 113639 >Category: kern >Synopsis: -CURRENT logs too much TCP information >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Jun 13 03:10:03 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Ben Wilber >Release: FreeBSD 7.0-CURRENT amd64 >Organization: >Environment: System: FreeBSD yui 7.0-CURRENT FreeBSD 7.0-CURRENT #3: Fri Jun 8 01:01:22 UTC 2007 bw@yui:/usr/obj/usr/src/sys/IKARI amd64 >Description: The recent logging changes in the TCP stack send too much information to syslog by default. On high-traffic machines or in denial of service situations, this logging saturates the disks and CPU. >How-To-Repeat: Install recent -CURRENT, tail syslog. >Fix: My crunch time solution was to add a net.inet.tcp.verbose sysctl. --- sys/netinet/tcp_subr.c.old Sun May 27 17:02:54 2007 +++ sys/netinet/tcp_subr.c Mon Jun 11 14:57:44 2007 @@ -2064,6 +2064,11 @@ CTLTYPE_STRUCT|CTLFLAG_WR|CTLFLAG_SKIP, NULL, 0, sysctl_drop, "", "Drop TCP connection"); +static int tcp_verbose = 0; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, verbose, CTLFLAG_RW, + &tcp_verbose, 0, + "Send additional TCP information to syslog"); + /* * Generate a standardized TCP log line for use throughout the * tcp subsystem. Memory allocation is done with M_NOWAIT to @@ -2088,6 +2093,9 @@ ip6 = (struct ip6_hdr *)ip6hdr; #endif /* INET6 */ ip = (struct ip *)ip4hdr; + + if (!tcp_verbose) + return (NULL); /* * The log line looks like this: >Release-Note: >Audit-Trail: >Unformatted: