CONSOLEFS(4)                                         CONSOLEFS(4)

     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:

               console=dirty dev=/dev/eia205
                    uid=bignose
                    gid=support
                    speed=56200
                    cronly=

          Each console/dev pair represents the name of a console and
          the serial line device associated with it.  Consolefs pre-
          sents a single level directory with two files per console:
          console and consolectl.  Writes of console are equivalent to
          writes of dev and reads and writes of consolectl are equiva-
          lent to reads and writes of devctl.  Consolefs broadcasts
          anything it reads from dev to all readers of console. There-
          fore, 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.

          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 enties of the form:

               group=support
                    uid=alice
                    uid=bob
                    uid=ted

     Page 1                       Plan 9             (printed 4/25/24)

     CONSOLEFS(4)                                         CONSOLEFS(4)

                    uid=mary

          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:

               [+boris, vlad, barney]

          If vlad then closes, boris and barney will read:

               [-vlad, boris, barney]

          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 con-
          nected 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:

               % aux/consolefs
               % ls -p /mnt/consoles
               bootes
               bootesctl
               fornax
               fornaxctl
               % clog /mnt/consoles/fornax /sys/log/fornax &
               % clog /mnt/consoles/bootes /sys/log/bootes &

     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

     Page 2                       Plan 9             (printed 4/25/24)

     CONSOLEFS(4)                                         CONSOLEFS(4)

          /sys/src/cmd/aux/clog.c

     BUGS
          Changing the gid's or uid's while consoelfs is running is
          detected by consolefs. However, to add new consoles one must
          restart consolefs.

     Page 3                       Plan 9             (printed 4/25/24)