CONSOLE(8L)

NAME
console - console server client program

SYNOPSIS
console [-a|A | -f|F | -s|S] [-rv] [-e attn] [-M master] machine
console -u|U|w|W|x|X [-v] [-M master]
console -q|Q [-v] [-M master]
console -d|D|p|P [-v] [-M master]
console -Y [-v]
console -h
console -V

DESCRIPTION

Console is used to manipulate console terminals remotely or poll running conserver(8L) daemons for status information.

Console queries the user for an access password before granting interactive access to a console (on a non-trusted system) since such a session may provide single-user access. This password may be the superuser's password or a password installed for a limitted number of devices.

Any default (-a) connection is dropped to spy mode if someone else is attached read-write. Force this spy mode connection to read write with the ``f'' command below.

In the non-interactive mode console exits after it outputs the requested information.

OPTIONS

-a  Access a console with a two-way connection (this is the default). The uppercase varient (-A) of this option forces a replay command into the negotiated connection after it is established.

-d  Display daemon versions. The console client connects to each server to request its version information. The uppercase varient (-D) of this option only requests only the primary server's version.

-eesc
    Set the initial two character escape sequence to those represented by esc. Any of the forms output by cat(1)'s -v option are accepted. The default value is ``^Ec'' (control-e lowercase-c) read as ``escape conserver''.

-f  Same as -a except it will force any existing read/write connection into spy mode. Uppercase (viz. -F) forces a replay command.

-h  Display a brief help message.

-Mmaster
    The console client program polls master as the primary server, rather than the hard coded default (``localhost'').

-p  The console client program polls all each peer console servers for their process id. The uppercase varient (-P) of this option only polls the master console server.

-q  The console client requests the server daemon quit (shutdown). A password is sent in the protocol stream, if none is required for the local host to shutdown the server just press return. The uppercase varient (-Q) of this option just acts on the master server.

-r  Request a raw connection to the group control virtual console, this is only useful for learning the protocol used by the non-interactive sequences. If you think this is something you might want to try you need to get out a little more.

-s  Requests a read-only (spy mode) connection. If this mode all the escape sequences (below) work, or report errors, but all other keyboard input is discarded. Uppercase (viz. -S) still forces a replay command.

-u  The console client program polls each console group for a list of connected users. Uppercase (viz. -U) limits the scan to groups of the master server.

-V  Output the version of the console client program.

-v  Be more verbose during when building the connection(s). Use this option in combination with any of `show' options (below) for added benefit.

-w  Show a list of all connections to all consoles. Uppercase (viz. -W) limits the scan to groups of the master server.

-x  Show a list of consoles and devices. Uppercase (viz. -X) limits the scan to groups of the master server.

-Y  Send a restart signal to the console server on the local host. This doesn't work across the network as it reads the process id from the network and sends the signal with kill(2).

ESCAPE SEQUENCES
The connection can be controlled by a two character escape sequence, followed by a command. The default escape sequence is ``control-E c'' (octal 005 143). Commands are:

a | switch to attach mode
c | toggle flow control (don't do this)
d | down the current console
e | change the escape sequence to the next two characters
f | force a switch to attach mode
l1 | send a 3 second serial line break (might halt a Sun)
o | reopen the line to clear errors (silo overflows)
r | replay the last 20 lines of output
s | switch to spy mode
u | show other users on this port
v | show the version of the group server
w | who is using this console
x | examine this group's devices and modes.
z | suspend this connection
? | display list of commands
^I | toggle tab expansion
^J | continue, ignore the escape sequence
^P | chat with the power controller
^R | replay the last line only
. | disconnect
; | provide a new login or shift to a new console
+(-) | be more (less) free with newlines

If any other character is hit after the escape sequence, all three characters will be discarded. Note that serial line breaks, line down, and power controller commands can only be sent from a full two-way attachment. To send the escape sequence through the connection one must redefine the outer escape sequence.

In the -u output, the login <none> indicates no one is viewing that console, the login <spies> indicates that no one has a full two-way attachment. When no one is attached to a console its output is cloned to the stdout of the server process.

EXAMPLES

console -u
    Outputs something like:

    dumb | up | <none>
    expert | up | ksb@w01.dspd
    tyro | up | <spies>
    mentor | up | <none>
    sage | up | fine@cis

The <none> indicates no one is viewing dumb or mentor, the <spies> indicates only read-only connections exist for tyro, other login@host entries are the currently attached sage and expert.

console -w
    Outputs something like:

    ksb@extra | on expert | Fri Feb 15 16:40:36 1991
    file@cis | on sage | Thu Feb 14 1:04:10 1991
    dmr@alice | spy tyro | Thu Feb 7 10:09:59 1991

console -e “^[1” lv426
    Requests a connection to the host ``lv426'' with the escape characters set to ``escape one''.

BUGS
Connections suspended under Dynix sometimes break the kernel when resumed. Suspended connections are a poor idea in general, just disconnect instead.

It is possible to create a loop of console connections, with ugly results. Never run console from within a console connection. In root's .profile set $CONSOLE with:

     CONSOLE="-- hey 'do not run console from here'"

The -r option doesn't really help to explain how connections get built.

AUTHORS
Thomas A. Fine, Ohio State Computer Science.
Kevin Braunsdorf, Federal Express (ksb@sa.fedex.com)

SEE ALSO
conserver.cf(5L), conserver(8L), autologin(8L), kill(2)