NAME
consolefs, C, clog – file system for console access |
SYNOPSIS
aux/consolefs [ –m mntpt ] [ –c consoledb ] C system
aux/clog console log system |
DESCRIPTION
To ease administration of multiple machines one might attach many
serial console lines to a single computer. Consolefs is a file
system that lets multiple users simultaneously access these console
lines. The consoles and permissions to access them are defined
in the file consoledb (default /lib/ndb/consoledb).
The format of consoledb is the same as that of other /lib/ndb
files, ndb(6). Consoles are defined by entries of the form:
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:
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:
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:
|
FILES
/srv/consoles Client end of pipe to server. /mnt/consoles Default mount point. /lib/ndb/consoledb Default user database. |
SOURCE
/sys/src/cmd/aux/consolefs.c /rc/bin/C /sys/src/cmd/aux/clog.c |
BUGS
Changing the gid's or uid's while consolefs is running is detected
by consolefs. However, to add new consoles one must restart consolefs. |