From owner-freebsd-questions@freebsd.org Sat Mar 12 14:01:49 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DD79ACD145 for ; Sat, 12 Mar 2016 14:01:49 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1686863 for ; Sat, 12 Mar 2016 14:01:47 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id u2CE0bxu058319; Sun, 13 Mar 2016 01:00:38 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Sun, 13 Mar 2016 01:00:37 +1100 (EST) From: Ian Smith To: Michael Grimm cc: Erich Dollansky , freebsd-questions@freebsd.org Subject: Re: reported timestamps during boot process? In-Reply-To: Message-ID: <20160313001612.B61428@sola.nimnet.asn.au> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2016 14:01:49 -0000 In freebsd-questions Digest, Vol 614, Issue 7, Message: 17 On Sat, 12 Mar 2016 09:18:35 +0100 From: Michael Grimm wrote: > Erich Dollansky wrote: > > Michael Grimm wrote: > > >> Is there a way to investigate the boot process by means of reported > >> timestamps in some logfile? dmesg doesn't seem to be the tool of > >> choice. > > > you might find some hints in /var/log/messages. > > Nope. It looks to me [1] that, whilst booting, kernel messages are > written to that file in one batch after syslogd has been fired up. > Timestamps of those messages are all showing the very same second. > [1] is that correct? That's correct, everything is buffered in memory before that. 'rcorder /etc/rc.d/*' shows syslogd being started after lots of other services, after FILESYSTEMS are up and, in case of remote logging, NETWORKING. > Linux' dmesg has such a feature [2] I am looking for: > > | -d, --show-delta > | > | Display the timestamp and the time delta spent between > | messages. If used together with ?notimee then only the time > | delta without the timestamp is printed. > [2] http://man7.org/linux/man-pages/man1/dmesg.1.html You could call that feature-rich or bloated, depending on inclination :) I rather doubt that would apply to boot messages anyway. Looking at the boot messages (here kern.log.0) on an admittedly much older Linux 2.6.18 system, all 236 lines have just the same timestamp, just as on FreeBSD, but of course you could test that on some Linux system's boot messages. I don't know whether message storage has any internal microtime stamp you could use for this, but suspect that would take quite some kernel hackery, before userland patches to view them. Maybe ask on hackers@ ? cheers, Ian