Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Nov 2013 11:43:50 +0100
From:      Polytropon <freebsd@edvax.de>
To:        mexas@bris.ac.uk
Cc:        freebsd-questions@freebsd.org
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>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
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, ...



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20131106114350.2b6b8015.freebsd>