Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Aug 2002 09:19:44 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        Alexander Leidinger <Alexander@Leidinger.net>, <arch@FreeBSD.ORG>
Subject:   Re: timestamping kernel messages 
Message-ID:  <20020821085414.O25287-100000@gamplex.bde.org>
In-Reply-To: <24056.1029843322@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 20 Aug 2002, Poul-Henning Kamp wrote:

> In message <20020820133215.0545063d.Alexander@Leidinger.net>, Alexander Leidinger wr
> >what do you think about using timestamps in kernel messages?

I think this would be useful for some cases (mainly when syslogd is blocked
or not running).

> I think we need to revamp the console/logging system in toto.
>
> I think we should have a pseudo-device for console/log use, which stores
> thing in a circular buffer.
>
> Syslogd would then retreive stuff from that buffer, somewhat like what
> it does today.
>
> For tty console usage, we should have a kernel thread which picks things out
> of the buffer and prints it on the chosen console, and putting a timestamp
> on it would be a Good Thing.

This would only help for broken console drivers.  Non-broken ones must be
able to do output at almost any time, including in the middle of message
buffer pointer update (which should be locked somehow), since they may be
invoked then when the code is traced using ddb.

I wouldn't want to do the buffering in a device driver.  The current
message buffer has never been locked correctly for writing despite it
being very simple and low level.  But read accesses are easy provided
the reader doesn't try to lock the writer.

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020821085414.O25287-100000>