Re: RFC: /dev/console - /var/log/messages idea/patch
On Sat, Nov 25, 2000 at 07:39:33AM -0800, Cy Schubert - ITSD Open Systems Group scribbled: | In message 1050.974925641@critter, Poul-Henning Kamp writes: | | The attached patch is a "proof-of-concept" on which I would like | to get some comments: | | It bugs me big time that the output from /etc/rc and all other output | to /dev/console is volatile and lost once it scrolls of your console. | | It's a no-brainer. Let's do it. How about networked ddb/gdb over {ether,ppp,usb,firewire,IrDA}? Firewire and IrDA are works in progress AFAIK, but certainly ddb/gdb networked debugging is what all FreeBSD dream of, right? :) The PPC port would greatly benefit from this, as newer Apple stations do not even have a serial port. Darwin seems to have networked debugging. -- +--+ | [EMAIL PROTECTED] | [EMAIL PROTECTED] | | http://peorth.iteration.net/~keichii | Yes, BSD is a conspiracy. | +--+ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: RFC: /dev/console - /var/log/messages idea/patch
In message 1050.974925641@critter, Poul-Henning Kamp writes: The attached patch is a "proof-of-concept" on which I would like to get some comments: It bugs me big time that the output from /etc/rc and all other output to /dev/console is volatile and lost once it scrolls of your console. It's a no-brainer. Let's do it. Regards, Phone: (250)387-8437 Cy Schubert Fax: (250)387-5766 Team Leader, Sun/DEC Team Internet: [EMAIL PROTECTED] Open Systems Group, ITSD, ISTA Province of BC To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: RFC: /dev/console - /var/log/messages idea/patch
On Fri, Nov 24, 2000 at 01:08:37AM +0100, Cyrille Lefevre wrote: Its in the scrollback buffer. and how do you access the scroll-back buffer if you are not front to the console (read remote) ? Do you mean remotely loged in across the network, or a serial [remote] console? If you mean the later the comconsole port logs all console output to a file. -- -- David ([EMAIL PROTECTED]) GNU is Not Unix / Linux Is Not UniX To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: RFC: /dev/console - /var/log/messages idea/patch
Alexander Leidinger [EMAIL PROTECTED] writes: On 24 Nov, Cyrille Lefevre wrote: The attached patch is a "proof-of-concept" on which I would like to get some comments: I'm only a moronic user, but this would make my life easier. My machine switches into 132x43 on startup, and I always lose the output. So this Its in the scrollback buffer. and how do you access the scroll-back buffer if you are not front to the console (read remote) ? You can't. I didn't see the relationship between my answer to Ashley and your question, can you please give me a hint? I just want to say that I'm full about doing something which logs what's happen at boot time, and that the scrollback buffer isn't sufficient. in other words, something like PR#14931 until this work is commited. Cyrille. -- home: mailto:[EMAIL PROTECTED] work: mailto:[EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: RFC: /dev/console - /var/log/messages idea/patch
"David O'Brien" [EMAIL PROTECTED] writes: On Fri, Nov 24, 2000 at 01:08:37AM +0100, Cyrille Lefevre wrote: Its in the scrollback buffer. and how do you access the scroll-back buffer if you are not front to the console (read remote) ? Do you mean remotely loged in across the network, or a serial [remote] console? If you mean the later the comconsole port logs all console output to a file. remotly logged. at my job, I manage around 160 machines (unfortunaly, there is no FreeBSD) and I appreciate HP-UX boxes which have this feature. if something doesn't start at boot time, I've just to look at /var/adm/rc.log and search the FAIL keyword. don't rememeber about IRIX boxes, nothing exists under Solaris boxes. Cyrille. -- Cyrille Lefevre 12, Rue de Bizerte 75017 Paris tel/fax: +33 (0)1 45 22 83 85 home: mailto:[EMAIL PROTECTED] work: mailto:[EMAIL PROTECTED] icq: mailto:[EMAIL PROTECTED] http://wwp.icq.com/17089123 To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: RFC: /dev/console - /var/log/messages idea/patch
On 24 Nov, Cyrille Lefevre wrote: The attached patch is a "proof-of-concept" on which I would like to get some comments: I'm only a moronic user, but this would make my life easier. My machine switches into 132x43 on startup, and I always lose the output. So this Its in the scrollback buffer. and how do you access the scroll-back buffer if you are not front to the console (read remote) ? You can't. I didn't see the relationship between my answer to Ashley and your question, can you please give me a hint? Bye, Alexander. -- "One world, one web, one program" -- Microsoft promotional ad "Ein Volk, ein Reich, ein Fuehrer" -- Adolf Hitler http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = 7423 F3E6 3A7E B334 A9CC B10A 1F5F 130A A638 6E7E To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: RFC: /dev/console - /var/log/messages idea/patch
On 22 Nov, Ashley Penney wrote: The attached patch is a "proof-of-concept" on which I would like to get some comments: I'm only a moronic user, but this would make my life easier. My machine switches into 132x43 on startup, and I always lose the output. So this Its in the scrollback buffer. BTW: are you using a recent -current on an UP machine? After the first SMPNG commits the switch to 132x60 caused a hang on my machine and I haven't tested if this still happens. is just me saying "Yay for phk." Yes. Regarding the "syslog writes messages back to /dev/console" thing: isn't this just a "I want to be able to shoot in my own foot" bikeshed? Bye, Alexander. -- Give a man a fish and you feed him for a day; teach him to use the Net and he won't bother you for weeks. http://www.Leidinger.net Alexander @ Leidinger.net GPG fingerprint = 7423 F3E6 3A7E B334 A9CC B10A 1F5F 130A A638 6E7E To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: RFC: /dev/console - /var/log/messages idea/patch
Alexander Leidinger [EMAIL PROTECTED] writes: On 22 Nov, Ashley Penney wrote: The attached patch is a "proof-of-concept" on which I would like to get some comments: I'm only a moronic user, but this would make my life easier. My machine switches into 132x43 on startup, and I always lose the output. So this Its in the scrollback buffer. and how do you access the scroll-back buffer if you are not front to the console (read remote) ? Cyrille. -- home: mailto:[EMAIL PROTECTED] work: mailto:[EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
RFC: /dev/console - /var/log/messages idea/patch
The attached patch is a "proof-of-concept" on which I would like to get some comments: It bugs me big time that the output from /etc/rc and all other output to /dev/console is volatile and lost once it scrolls of your console. It particular bugs me for systems which are configured with a modem on a serial port as console, if something choked badly in /etc/rc I will never know. (Don't tell me to use a SilentWriter or DecWriter as console, OK ? Been There, Done That, Got The Piles Of Paper To Prove It. :-) Ideally our console would be much more functional, but that is a project which would fall sideways off my todo list if I tried to balance it there. (If anybody is looking for a medium complex kernel task, a new console system is a place to look. Enquire within). So I though about it from a "how little can we get away with" and realized that by simply grabbing a copy of everything written to /dev/console and feeding it to syslogd would gain us a lot of mileage. Now, there are several issues to understand here, so please read on before you apply paint to this bikeshed: By "/dev/console" output I mean just and only that. Characters which arrive by write(2)/writev(2) on a fd opened to "/dev/console". Kernel printfs are not /dev/console output in this context. Characters written directly to your console device ("/dev/ttyd0", "/dev/ttyv0" or "/dev/cuaa0") are *not* /dev/console output either. Input from /dev/console are not part of this. You will not be able to see the answers people give fsck. The output do of course still also arrive on your console device. Obviously, if syslogd were to write these messages back to /dev/console bad things would happen. Syslogd may need to gain a tabu there. The formatting cannot be preserved. If somebody were to: echo -n "You're screwed now --- " /dev/console we would never see the message in syslogd if the code waited for the final '\n' to arrive. (I guess a timeout based solution could be feasible, what do people think ?) In this patch I have deliberatly output a '"' in front of all messages, this is merely for debugging right now. The patch probably has all sorts of issues, style, locking, you name it. It is only intended as a proof-of-concept patch. Sample output from /var/log/messages attached below. Comments, volounteers, ideas most welcome... Poul-Henning Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "swapon: adding /dev/ad1s1b as swap device Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "swapon: adding /dev/ad0s1b as swap device Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "Automatic boot in progress... Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "/dev/ad0s1a: Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "FILESYSTEM CLEAN; SKIPPING CHECKS Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "/dev/ad0s1a: Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "clean, 134807 free Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "(823 frags, 16748 blocks, 0.4% fragmentation) Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "/dev/ad1s1e: Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "FILESYSTEM CLEAN; SKIPPING CHECKS Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "/dev/ad1s1e: Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "clean, 184706 free Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "(138 frags, 23071 blocks, 0.1% fragmentation) Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "/dev/ad1s1f: Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "FILESYSTEM CLEAN; SKIPPING CHECKS Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "/dev/ad1s1f: Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "clean, 1775231 free Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "(13343 frags, 220236 blocks, 0.7% fragmentation) Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "/dev/ad0s1e: Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "FILESYSTEM CLEAN; SKIPPING CHECKS Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "/dev/ad0s1e: Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "clean, 2032838 free Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "(14 frags, 254103 blocks, 0.0% fragmentation) Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "/dev/ccd0c: Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "FILESYSTEM CLEAN; SKIPPING CHECKS Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "/dev/ccd0c: Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "clean, 3464429 free Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "(3245 frags, 865296 blocks, 0.1% fragmentation) Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "Can't use /entropy as an entropy file, trying other sources Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "cat: Nov 22 21:16:38 console.info syv /boot/kernel/kernel: "malloc.conf Nov 22 21:16:38 console.info syv /boot/kernel/kernel: ": Nov 22
Re: RFC: /dev/console - /var/log/messages idea/patch
On Wed, Nov 22, 2000 at 09:40:41PM +0100, Poul-Henning Kamp said: The attached patch is a "proof-of-concept" on which I would like to get some comments: I'm only a moronic user, but this would make my life easier. My machine switches into 132x43 on startup, and I always lose the output. So this is just me saying "Yay for phk." -- Pine vs Mutt : trolld It's like the difference between playing with yourself and getting head from a hot girl. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: RFC: /dev/console - /var/log/messages idea/patch
In the last episode (Nov 22), Poul-Henning Kamp said: The attached patch is a "proof-of-concept" on which I would like to get some comments: It bugs me big time that the output from /etc/rc and all other output to /dev/console is volatile and lost once it scrolls of your console. SCO logs its startup by simply piping the output of its rc scripts through "21 | tee -a /usr/adm/rc#.log". We could do something similar by wrapping everything after the "mount -a -t nonfs" command on like 174 with { } 21 | tee -a /var/log/boot.log -- Dan Nelson [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: RFC: /dev/console - /var/log/messages idea/patch
In message [EMAIL PROTECTED], Dan Nelson writes: In the last episode (Nov 22), Poul-Henning Kamp said: The attached patch is a "proof-of-concept" on which I would like to get some comments: It bugs me big time that the output from /etc/rc and all other output to /dev/console is volatile and lost once it scrolls of your console. SCO logs its startup by simply piping the output of its rc scripts through "21 | tee -a /usr/adm/rc#.log". We could do something similar by wrapping everything after the "mount -a -t nonfs" command on like 174 with I've tried stuff like that and I didn't particularly like the result, for one thing many programs (or maybe it was tee(1) itself) changed buffering because of the pipe, which meant that the partial lines like "starting standard daemons: inetd cron sendmail sshd." would only arrive on the real console when the final \n arrived. Another particular thing I remember was that some syslog-challenged daemons whine on /dev/console long after /etc/rc has finished. Dump(8) will do something similar if you don't flip the tapes in finite time. So while it goes a long way, I think we need to provide more coverage of "/dev/console" as a concept. Poul-Henning PS: As I said, a decently functional console subsystem would be a nice thing. At the very least I would want to be able to specify: console output to /dev/ttyd0, /dev/ttyv0 and /var/log/console console input from /dev/ttyd0 or /dev/ttyv0. and preferably with a scrollback buffer too. Network consoles would be nice as well. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 [EMAIL PROTECTED] | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: RFC: /dev/console - /var/log/messages idea/patch
On Wed, 22 Nov 2000 22:22:39 +0100, Poul-Henning Kamp [EMAIL PROTECTED] said: Another particular thing I remember was that some syslog-challenged daemons whine on /dev/console long after /etc/rc has finished. They can try, but by the time they do the console has already been revoke()d, so they no longer have access to the real console. I've thought about writing daemon(8) which will put these turkeys in their place. Just a Small Matter of Programming -GAWollman To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: RFC: /dev/console - /var/log/messages idea/patch
In message [EMAIL PROTECTED], Garrett Wollman write s: On Wed, 22 Nov 2000 22:22:39 +0100, Poul-Henning Kamp [EMAIL PROTECTED] said: Another particular thing I remember was that some syslog-challenged daemons whine on /dev/console long after /etc/rc has finished. They can try, but by the time they do the console has already been revoke()d, so they no longer have access to the real console. I don't know what you consider "the real console", but opening "/dev/console" and barfing on it works all the time. (Well, *almost* all the time, not if you have foobar'ed your serial console but...) -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 [EMAIL PROTECTED] | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: RFC: /dev/console - /var/log/messages idea/patch
On Wed, 22 Nov 2000 23:44:12 +0100, Poul-Henning Kamp [EMAIL PROTECTED] said: In message [EMAIL PROTECTED], Garrett Wollman write They can try, but by the time they do the console has already been revoke()d, so they no longer have access to the real console. I don't know what you consider "the real console", but opening "/dev/console" and barfing on it works all the time. We are talking at cross purposes. I am talking about programs which don't properly detach from their controlling terminal (the console, in this case) and then periodically warble things to standard error. Luckily, such programs never seem to bother to check the error returns. -GAWollman To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message