Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-20-2009, 09:16 AM   #1
LQ Newbie
Registered: Oct 2009
Posts: 2

Rep: Reputation: 0
/dev/console buffering behavior

Hey guys, I've got a couple questions related to the /dev/console special file.

From what I've read online, it seems that /dev/console used to be a simple symlink to ttyS0, or whatever was passed to the kernel with the "console=" parameter. In recent kernels, /dev/console is managed directly by the kernel. Does anyone know the relevant files in the kernel source that deal with setting up/configuring /dev/console?

On the current systems I am working with, the kernel command line parameters in grub.conf look something like this:
kernel /vmlinuz ro root=/dev/md2 console=tty0 console=ttyS0,115200n8r

I have noticed that echoing text to /dev/console and /dev/ttyS0 does not always have the same effect. For one, it seems that writes to /dev/console ignore the "clocal" stty flag, but honor the "crtscts" flag. Second, if I have "co:2345:respawn:/sbin/agetty -h ttyS0 115200 vt100" such that agetty is running with flow control on, writes to /dev/console behave differently in this way:

* writes are buffered (looks like a ~4096 character buffer)
* once the buffer becomes full, writes block until CTS is asserted

Can anyone explain this behavior?


EDIT: I'm running CentOS 5.3 x64 BTW.

Last edited by jsjohns2; 10-20-2009 at 10:52 AM.


console, serial, ttys0

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual booting, serial console and odd behavior raypen Slackware 4 07-17-2008 06:02 PM
logs sent to /dev/console appear on /dev/tty1 lfur Linux - General 3 01-08-2008 01:19 PM
s0:0:wait:/sbin/rc0 >/dev/msglog 2<>/dev/msglog </dev/console ikinnu Solaris / OpenSolaris 1 08-09-2007 08:25 AM
Weird Console Behavior georgejc Slackware 9 07-09-2006 11:10 AM
Strange console behavior after exiting X rcrules Linux - Laptop and Netbook 7 05-20-2006 09:39 PM

All times are GMT -5. The time now is 11:19 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration