From owner-freebsd-current@FreeBSD.ORG Fri Oct 14 12:53:24 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C39F91065677 for ; Fri, 14 Oct 2011 12:53:24 +0000 (UTC) (envelope-from nalitoja@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 27CD28FC18 for ; Fri, 14 Oct 2011 12:53:23 +0000 (UTC) Received: by bkbzx1 with SMTP id zx1so1859027bkb.13 for ; Fri, 14 Oct 2011 05:53:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mime-version:content-type; bh=UcHkY8j45OwV/8sQcAzGf62CbVerLf7dOCah6YRnBnE=; b=JrxQ/Nl24mW1GfVbTZ7VqNDaPx3kNXweNp7UPT+3QqHlupwv+MOY1OeAbKLorSs3gr bEXvS7JFNSRtt4nh77XR+iS1ynLryZ6q9sKFNLZfR7nXVwhkv4nCmNEaqqljX9LOnYOl 4nKCRxxMKYFAlPpN6Q8VceMrRkSJk2ID0eYwc= Received: by 10.204.152.201 with SMTP id h9mr6640779bkw.99.1318596803131; Fri, 14 Oct 2011 05:53:23 -0700 (PDT) Received: from nil (politkovskaja.torservers.net. [77.247.181.165]) by mx.google.com with ESMTPS id a27sm8352974bku.9.2011.10.14.05.52.46 (version=SSLv3 cipher=OTHER); Fri, 14 Oct 2011 05:53:22 -0700 (PDT) From: Nali Toja To: Alexander Best In-Reply-To: <20111014093406.GA13981@freebsd.org> (Alexander Best's message of "Fri, 14 Oct 2011 09:34:06 +0000") Date: Fri, 14 Oct 2011 12:52:03 +0000 Message-ID: <8662jrlor0.fsf@gmail.com> References: <20111014085609.GA3799@freebsd.org> <40448.1318582809@critter.freebsd.dk> <20111014092445.GA11785@freebsd.org> <20111014093406.GA13981@freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: Nikolay Denev , Poul-Henning Kamp , FreeBSD Current , Arnaud Lacombe Subject: Re: [RFC] Prepend timestamp in msgbuf X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Oct 2011 12:53:24 -0000 Alexander Best writes: >> On Fri Oct 14 11, Poul-Henning Kamp wrote: >> > In message <20111014085609.GA3799@freebsd.org>, Alexander Best writes: >> > >> > >1) would it be possible to prepend those timestamps to the actual console >> > >output and not only to the output of demsg? maybe via a sysctl toggle? >> > >> > The kernel does not know enough about timezones to emit anything >> > but UTC timestamps. >> >> hmm ok. >> >> > >> > >2) my dmesg output contains a lot of these entries: "<118>" >> > >> > These are magic markers for syslogd(8) specifying priority. >> >> it would be nice, if their output could be turned off via a dmesg flag imo. >> >> > >> > >3) roughly the first 30 lines of my dmesg output have the timestamp "[1.0]". >> > >would it be possible to have more accuracy there? >> > >> > No, because we don't know the time until we've found the RTC chip. >> >> maybe prepending the output with [??] instead of [1.0] would make more sense, >> so users knows that those timestamps are bogus. > > maybe the granularity of the timestamps could be limited to a static value? the > following output doesn't really look pretty: > > [7.729516] <118>/dev/ufs/varfs: clean, 879143 free (7407 frags, 108967 blocks, 0.7% fragmentation) > [7.891512] <118>Mounting local file systems:WARNING: TMPFS is considered to be a highly experimental feature in FreeBSD. > [8.33519] . > [9.440514] <118>Setting hostname: otaku. > [9.744516] wlan0: Ethernet address: 00:0f:b5:82:07:c8 > [9.850516] <118>Starting wpa_supplicant. > [10.335514] <118>Starting Network: lo0 ath0. > > so it would be nice, if trailing zeros got printed out, too. Why not make formatting similar to linux/xorg logs, e.g. [ 31.897] (**) Option "XkbLayout" "us" [ 31.897] (II) XINPUT: Adding extended input device "" (type: KEYBOARD, id 7) [ 11485.404] (II) 3rd Button detected: disabling emulate3Button [ 0.000000] Linux version 3.0-ARCH (tobias@T-POWA-LX) (gcc version 4.6.1 20110819 (prerelease) (GCC) ) #1 SMP PREEMPT Tue Aug 30 08:53:25 CEST 2011 [ 0.000000] Command line: root=/dev/disk/by-uuid/625db1f5-9b51-4d2d-acb7-6726f4d7e199 ro [...] [ 15.096862] NET: Registered protocol family 10 [ 16.792594] [drm] nouveau 0000:01:00.0: plugged DVI-I-2 [ 26.054186] eth0: no IPv6 routers present A way to convert those timestamps to localtime or time delta[1] post-mortem via dmesg(8) would be good, too. [1] like in tcpdump -ttt