From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 5 08:51:24 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 3C34816A4E1 for ; Sat, 5 Aug 2006 08:51:24 +0000 (UTC) (envelope-from joao.barros@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.183]) by mx1.FreeBSD.org (Postfix) with ESMTP id D888943D4C for ; Sat, 5 Aug 2006 08:51:22 +0000 (GMT) (envelope-from joao.barros@gmail.com) Received: by py-out-1112.google.com with SMTP id c59so58659pyc for ; Sat, 05 Aug 2006 01:51:22 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Uuop/++hAQ9Y8oX4fwqUkKu20Y7rd4pywG0g1oBb+uzzN148/j/AmLXTlIr7cJs6f9fS99u56zWZ/pS63TZJf7ZdBlDQKnj7rVa4ORXXNY31g/PTF1n/b/idaS+B7+NLMBkxhgeJFzN+IilsZrF8aZy42w16JL0KawabxKj+E0s= Received: by 10.35.87.8 with SMTP id p8mr6921707pyl; Sat, 05 Aug 2006 01:51:22 -0700 (PDT) Received: by 10.35.112.18 with HTTP; Sat, 5 Aug 2006 01:51:22 -0700 (PDT) Message-ID: <70e8236f0608050151p5582e45ck5b9a5c4f2145c7fa@mail.gmail.com> Date: Sat, 5 Aug 2006 09:51:22 +0100 From: "Joao Barros" To: "Gleb Smirnoff" In-Reply-To: <70e8236f0608041642v5c7a85a9u4e4422bb6f08822f@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <70e8236f0608030735m519d880fgebeca7108b859244@mail.gmail.com> <20060804150302.GD96644@cell.sick.ru> <70e8236f0608040848x304a671cle6d490f43735737b@mail.gmail.com> <20060804182123.GH96644@cell.sick.ru> <70e8236f0608041642v5c7a85a9u4e4422bb6f08822f@mail.gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: [PATCH] add header "pppoe:" in ng_pppoe.c printfs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2006 08:51:24 -0000 On 8/5/06, Joao Barros wrote: > On 8/4/06, Gleb Smirnoff wrote: > > On Fri, Aug 04, 2006 at 04:48:49PM +0100, Joao Barros wrote: > > J> On 8/4/06, Gleb Smirnoff wrote: > > J> >On Thu, Aug 03, 2006 at 03:35:04PM +0100, Joao Barros wrote: > > J> >J> Being this a cryptic message to say the least and to probably save > > J> >J> someone some time when presented with this message I attach a patch > > J> >J> that adds the header "pppoe:" in every printf that didn't have it, > > J> >J> making it consistent with the rest of the file. > > J> > > > J> >I've attached a patch that cleans a bit logging in ng_pppoe. It changes > > J> >all printf(9) to log(9). The latter is better since it spams console > > J> >less, if event occurs many times per second. Also I've made the messages > > J> >more clear - prepended node ID where possible, function name when it > > J> >starts with ng_pppoe, or just "ng_pppoe". > > J> > > > J> >Can you please try out this patch and tell whether you like it. If you > > J> >do I will commit it soon. > > J> > > J> Hi, > > J> > > J> I've looked at the patch and it looks ok. > > J> It serves the purpose: make the messages more clear with the added > > J> bonus of more info. > > J> Thanks for taking the time to look into this :-) > > > > Since I don't use ng_pppoe now much, I'd appreciate if you > > do at brief test of this patch, before I commit it. > > > > I patched and recompiled the kernel. > After booting I notice that no messages from ppp are logged by syslog > (messages|ppp.log) > If I restart ppp the messages are all logged. > I can't say if this was happening because after setting ppp up I > didn't reboot the machine. > I didn't browse the startup scripts but maybe syslog is not started > before pppoe. > > Now it will take more than 17 hours for the session limit to be > exceeded and only then I can say how your patch worked out. I'll make > an update then. Ok, here's the new output just before the connection was dropped (earlier than usual): Aug 5 07:28:50 ultra5 kernel: ng_pppoe[5]: session in wrong state Aug 5 07:28:50 ultra5 last message repeated 3 times Looks fine to me :-) -- Joao Barros