9srv Manual Collection/plan9/consolefs(4) | 9srv Manual Collection/plan9/consolefs(4) |
---|
C system
aux/clog console log system
Each console/dev pair represents the name of a console and the device associated with it. Consolefs presents a single level directory with up to three files per console: console, consolectl, and consolestat. Writes of console are equivalent to writes of dev and reads and writes of consolectl and consolestat are equivalent to reads and writes of devctl and devstat respectively. Consolectl and consolestat will not exist if the underlying dev does not provide them. Consolefs broadcasts anything it reads from dev to all readers of console. Therefore, many users can con(1) to a console, see all output, and enter commands.
The cronly= attribute causes newlines typed by the user to be sent to the console as returns. The speed=x attribute/value pair specifies a bit rate for the console. The default is 9600 baud. The openondemand= attribute causes the console device (dev) to be opened only when the corresponding mntpt/console file is open.
Access to the console is controlled by the uid and gid attributes/value pairs. The uid values are user account names. The gid values are the names of groups defined in consolefs by entries of the form:
Groups are used to avoid excessive typing. Using gid=x is equivalent to including a uid=y for each user y that is a member of x.
To keep users from inadvertently interfering with one another, notification is broadcast to all readers whenever a user opens or closes name. For example, if user boris opens a console that users vlad and barney have already opened, all will read the message:
If vlad then closes, boris and barney will read:
Consolefs posts the client end of its 9P channel in /srv/consolefs and mounts this locally in mntpt (default /mnt/consoles); remote clients must mount (see bind(1)) this file to see the consoles.
The rc(1) script C automates this procedure. It uses import(4) to connect to /mnt/consoles on the machine connected to all the consoles, then uses con(1) to connect to the console of the machine system. The script must be edited at installation by the local administration to identify the system that holds /mnt/consoles.
Aux/clog opens the file console and writes every line read from it, prefixed by the ASCII time to the file log.
An example of 2 consoles complete with console logging is:
The console server's default name space must mount the consoles for C to import. This can be arranged by adding
to /lib/namespace.$sysname.
9srv Manual Collection/plan9/consolefs(4) | Rev: Sun Dec 02 23:42:23 GMT 2007 |