From owner-freebsd-questions@FreeBSD.ORG Wed Nov 6 10:53:26 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F308FDE2 for ; Wed, 6 Nov 2013 10:53:25 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B71CE23FD for ; Wed, 6 Nov 2013 10:53:25 +0000 (UTC) Received: from r56.edvax.de (port-92-195-117-74.dynamic.qsc.de [92.195.117.74]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 564BB3CD40; Wed, 6 Nov 2013 11:44:01 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id rA6AhoFk003290; Wed, 6 Nov 2013 11:43:50 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Wed, 6 Nov 2013 11:43:50 +0100 From: Polytropon To: mexas@bris.ac.uk Subject: Re: ktrace help Message-Id: <20131106114350.2b6b8015.freebsd@edvax.de> In-Reply-To: <201311060915.rA69FvRp075387@mech-cluster241.men.bris.ac.uk> References: <201311060915.rA69FvRp075387@mech-cluster241.men.bris.ac.uk> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Nov 2013 10:53:26 -0000 On Wed, 06 Nov 2013 01:16:02 -0800 (PST), Anton Shterenlikht wrote: > I suspect that nginx causes my box to reboot. > I don't get a panic or anything in the logs, > just a reboot. So I wanted to see what nginx > is doing prior to reboot with ktrace. > > I launch ktrace as "ktrace nginx", > and I see that ktrace.out has some data. > However, after reboot, it's empty: > > -rw------- 1 root wheel 0 Nov 6 09:04 ktrace.out > > Is this expected? Not intended, but can maybe be explained: The ktrace.out file is continuously written to, but at the time the system crashes and reboots, the data is lost because the file system is terribly interrupted in an inconsistent state. When the system boots up again, the damaged file is restored, but the data isn't associated anymore (and therefore lost). I don't know in how far it would be possible to have ktrace's output rerouted to a different kind of storage (e. g. a slower NFS share or a pipe that a different host / machine is listening to over the network)... In that case, all output that is lucky of being transmitted can be captured and won't be lost when the accidental reboot appears. By the way, this is an excellent example of a use case for a sufficiently fast and buffered dotmatrix line printer. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...