From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 8 12:13:19 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5186E1065675 for ; Sun, 8 Jun 2008 12:13:19 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.183]) by mx1.freebsd.org (Postfix) with ESMTP id 08D118FC1B for ; Sun, 8 Jun 2008 12:13:18 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: by wa-out-1112.google.com with SMTP id j4so1293200wah.3 for ; Sun, 08 Jun 2008 05:13:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=mIPfVv07+7TnhiQBY7cY9DxSil/VAlosHZfOsj57pcg=; b=ESdVRl6DKYkOr9QHtx/c6SHi9InRApUnAP9fEr6vZUnCqudiWOw9tMp0qSWuMDin/L 57fN7oitinzy3Ra3Zj5z8oboU5B+TdCGPIc5JClYyarAWLYAN9rzGWhryh0URDDUUYG2 DbS0cXKj3jzb786nPRUW1ItdK3aeC2Cf0y+iI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=iJnlrcSnsaVEX2SUjp9Ngj8nkDFL+S1dH9YzpDpH3PhLxN1JYgJSKawRwNHD2xb7Gi 0llykLSX5OGzdGueIcJr/UPbvZkZbVvj9iTlAQIv0KgPcJMxtrj41hpQbq1JxOAjoSBH t+HI8ZnrmPkHWxBBTbFqlsMb8XJ3u3TcRmFe4= Received: by 10.114.124.1 with SMTP id w1mr2198092wac.73.1212927198838; Sun, 08 Jun 2008 05:13:18 -0700 (PDT) Received: by 10.114.80.5 with HTTP; Sun, 8 Jun 2008 05:13:18 -0700 (PDT) Message-ID: <2e77fc10806080513wa73444ep50162e1d5f45f15@mail.gmail.com> Date: Sun, 8 Jun 2008 15:13:18 +0300 From: "Niki Denev" Sender: ndenev@gmail.com To: freebsd-hackers@freebsd.org In-Reply-To: <20080608115919.GE67629@server.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <2e77fc10806080024s19951abbnf31913d5579f4535@mail.gmail.com> <20080608115919.GE67629@server.vk2pj.dyndns.org> X-Google-Sender-Auth: 6ea3e157d8f496f3 Subject: Re: timestamping for kernel messages (like Solaris and Linux) 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: Sun, 08 Jun 2008 12:13:19 -0000 On Sun, Jun 8, 2008 at 2:59 PM, Peter Jeremy wrote: > On 2008-Jun-08 10:24:53 +0300, Niki Denev wrote: >>Has anyone thought about implementing an option >>to prepend all kernel console messages with timestamps, >>like Linux and Solaris do? > > The only time I've seen Solaris do this is when the console message > is syslog'd - which FreeBSD also does. > >>Is it just a matter of hacking up the kernel printf() implementation? > > Pretty much. > >>Any possible caveats? > > The kernel works in UTC only and has only a very restricted ability > to translate between epoch seconds and a human-readable date/time > (it's currently only used to talk to the RTC). > I'm looking at a Linux machine right now, and it looks like they use the time since boot (actually uptime) for the timestamps. Anyways, does this sound like something that FreeBSD should have? It could be useful in some situations, like embedded applications without running syslog, full /var partitions, etc. -- Niki