<html><head><title>Avoiding Screen Pollution From Kernel Messages (Editing Fri Feb 4 22:09:35 EST 2011 version)</title><META http-equiv="Content-Type" content="text/html; charset=utf-8"></head><!-- FFFFE9 is acme yellow; FFFFE9 is as close as you can get to it before charon decides to use grey instead of map entry 254 --><body bgcolor="#FFFFE9" link="#0000AA" alink="#0000AA" vlink="#0000AA"><center><font size=+2><b>Avoiding Screen Pollution From Kernel Messages</b></font> (Editing Fri Feb 4 22:09:35 EST 2011 version)</center><p>For information on editing, see thedescription of <a href="../0">Plan 9 wiki syntax</a>.<p><form action="/magic/wikipost" method="post"><table><tr><td valign=top><input type="submit" name="x" value="Put"></td><td><table><tr><td align=right>(optional) Comment:</td><td><input type="text" name="comment" value="" cols=40></td></tr><tr><td align=right>(optional) Email:</td><td><input type="text" name="author" value="" cols=40></td></tr></table><input type="hidden" name="title" value="Avoiding Screen Pollution From Kernel Messages"><input type="hidden" name="version" value="1296875375"><input type="hidden" name="service" value="plan9"><input type="hidden" name="base" value="/wiki/plan9"><p><textarea name="text" wrap="virtual" cols="80" rows="25">By default, the kernel will print messages to the console device (seecons(3)). This can be problematic when also running rio on theconsole, as is common on terminals: the console output will overwritethe existing screen contents.To work around this problem, open a new terminal window and do:! cat /dev/kprintThis works because, according to the kprint discussion in cons(3),"if (the) console is a graphics screen, the data is sent either tothe display or to kprint, but not both."If you'd like a more permanent solution to the problem, make adirectory '/sys/log/consoles' and put a line like! cat /dev/kprint >>/sys/log/consoles/$sysname >[2=1] &somewhere in termrc or the included files (see cpurc(8)), or in yourrio startup. On cpu servers, it may be useful to open a new windowwith something like:! {cat /dev/kmesg ; cat /dev/kprint} | tee /sys/log/consoles/$sysnameThis will save a copy of the console output while also displaying itin a more controlled fashion.It is probably not a good idea to redirect these to /dev/null; theymay be important.</textarea><p></td></table></form><hr><table width=100%><tr><td valign=center align=left></td><td valign=center align=right><a href="../about.html">About the server</a>| <a href="http://plan9.bell-labs.com/plan9"><img src="http://plan9.bell-labs.com/plan9/img/power36.gif"alt="Powered by Plan 9"></a></td></tr></table></html></body>
<html>
<head>
<title>Avoiding Screen Pollution From Kernel Messages (Editing Fri Feb 4 22:09:35 EST 2011 version)</title>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<!-- FFFFE9 is acme yellow; FFFFE9 is as close as
you can get to it before charon decides to use
grey instead of map entry 254 -->
<body bgcolor="#FFFFE9" link="#0000AA" alink="#0000AA" vlink="#0000AA">
<center>
<font size=+2><b>Avoiding Screen Pollution From Kernel Messages</b></font> (Editing Fri Feb 4 22:09:35 EST 2011 version)
</center>
<p>
For information on editing, see the
description of
<a href="../0">Plan 9 wiki syntax</a>.
<p>
<form action="/magic/wikipost" method="post">
<table><tr><td valign=top>
<input type="submit" name="x" value="Put"></td><td>
<table>
<tr><td align=right>(optional) Comment:</td><td><input type="text" name="comment" value="" cols=40></td></tr>
<tr><td align=right>(optional) Email:</td><td><input type="text" name="author" value="" cols=40></td></tr>
</table>
<input type="hidden" name="title" value="Avoiding Screen Pollution From Kernel Messages">
<input type="hidden" name="version" value="1296875375">
<input type="hidden" name="service" value="plan9">
<input type="hidden" name="base" value="/wiki/plan9">
<p>
<textarea name="text" wrap="virtual" cols="80" rows="25">
By default, the kernel will print messages to the console device (see
cons(3)). This can be problematic when also running rio on the
console, as is common on terminals: the console output will overwrite
the existing screen contents.
To work around this problem, open a new terminal window and do:
! cat /dev/kprint
This works because, according to the kprint discussion in cons(3),
"if (the) console is a graphics screen, the data is sent either to
the display or to kprint, but not both."
If you'd like a more permanent solution to the problem, make a
directory '/sys/log/consoles' and put a line like
! cat /dev/kprint >>/sys/log/consoles/$sysname >[2=1] &
somewhere in termrc or the included files (see cpurc(8)), or in your
rio startup. On cpu servers, it may be useful to open a new window
with something like:
! {cat /dev/kmesg ; cat /dev/kprint} | tee /sys/log/consoles/$sysname
This will save a copy of the console output while also displaying it
in a more controlled fashion.
It is probably not a good idea to redirect these to /dev/null; they
may be important.
</textarea><p>
</td>
</table>
</form>
<hr>
<table width=100%><tr>
<td valign=center align=left>
</td><td valign=center align=right>
<a href="../about.html">About the server</a>
|
<a href="http://plan9.bell-labs.com/plan9"
><img src="http://plan9.bell-labs.com/plan9/img/power36.gif"
alt="Powered by Plan 9"></a>
</td>
</tr></table>
</html>
</body>