From owner-freebsd-arch@FreeBSD.ORG Sun May 28 01:15:35 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D24B516C306 for ; Sun, 28 May 2006 01:05:49 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.FreeBSD.org (Postfix) with SMTP id 3B17643D46 for ; Sun, 28 May 2006 01:05:46 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 8040 invoked by uid 399); 28 May 2006 01:05:45 -0000 Received: from localhost (HELO ?192.168.0.3?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 28 May 2006 01:05:45 -0000 Message-ID: <4478F767.5090403@FreeBSD.org> Date: Sat, 27 May 2006 18:05:43 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5.0.2 (X11/20060507) MIME-Version: 1.0 To: Poul-Henning Kamp References: <16029.1148764704@critter.freebsd.dk> In-Reply-To: <16029.1148764704@critter.freebsd.dk> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org Subject: Re: A sort of plan for consoles in FreeBSD X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2006 01:15:47 -0000 Poul-Henning Kamp wrote: > Today we expect all relevant logging to happen to logfiles, either > directly (like for instance apache provides for) or via syslogd(8), > which adds the ability to send the logs to a remote machine in > real-time. > > Spitting things out on /dev/console today will more likely than > not, print stuff on a syscons or serial port which nobody looks at. > For that reason, we added a hack to the kernel to make all stuff > that went to /dev/console be sent to syslogd(8). I really like that hack, and enable logging of console.* on all my systems. Your point about syslogd being able to log remotely is also a good one. However the good old fashioned /dev/console is not as anachronistic as you might think. Where I used to work we had a very handy serial console program that "listened" to the serial console output and logged it locally. That way, if a machine crashed, died, or otherwise went unreachable you could log into the serial console, quickly check the most recent console output, then try to fix the problem. Whatever output might have gone to a remote syslog is also useful, but only if the problems were not so fundamental as to have prevented the remote logging in the first place. > I would like to redefine the semantics of "/dev/console" as follows: > > if any console-consumers like xconsole(8) are active > send output to all console-consumers. > else if a controlling terminal is available > send output to controlling terminal (that is /dev/tty) > else > send output to syslogd, as if generated by printf(9). > (but do not actually output to low-level console) At first glance I don't see anything wrong with that logic. My one request is that you add a branch that says, "if legacy behavior is requested by , add it to the mix." hth, Doug -- This .signature sanitized for your protection