blob: 9f9cbeaf3184e73bb8a5ea5a3957cc14e26eff59 [file] [log] [blame]
apw3812c032006-12-07 21:01:14 +00001<html>
2<!--
3# (C) Copyright IBM Corp. 2004, 2005, 2006
4# Author: Andy Whitcroft <andyw@uk.ibm.com>
5#
6# The Console Multiplexor is released under the GNU Public License V2
7-->
8<head>
9<title>conmux - the console multiplexor</title>
10<style type="text/css">
11.example { white-space: pre; margin-left: 2em; margin-right: 2em;
12 font-family: monospace }
13table.quote { margin-left: 2em; margin-right: 2em }
14</style>
15</head>
16
17<body>
18<center>
19<h1>conmux - the console multiplexor</h1>
20</center>
21
22<p><em>conmux</em>, the console multiplexor is a system designed to abstract
23the concept of a console. That is to provide a virtualised machine interface,
24including access to the console and the 'switches' on the front panel; the
25/dev/console stream and the reset button. It creates the concept of a virtual
26console server for multiple consoles and provides access to and sharing of
27consoles connected to it.
28
29<p>There are two main motivations for wanting to do this. Firstly, we have
30many different machine types with vastly differing access methodologies for
31their consoles and for control functions (VCS, HMC, Annex) and we neither want
32to know what they are nor how they function. Secondly, most console sources
33are single access only and we would like to be able to share the console data
34between many consumers including users.
35
36<h2>Basic Usage</h2>
37
38<p>The main interface to the consoles is via the <code>console</code>
39program. This connects us to the console server for the machine and allows us
40to interact with it, including issuing <i>out-of-band</i> commands to control
41the machine.
42
43<div class="example">$ console &lt;host&gt;/&lt;console&gt;
44</div>
45
46<p>In the example below we indicate that the console we require is located on
47the virtual console server <code>consoles.here.com</code> and the
48specific console is <code>elm3b70</code>.
49
50<div class="example">$ console consoles.here.com/elm3b70
51Connected to elm3b70 console (~$quit to exit)
52
53Debian GNU/Linux 3.1 elm3b70 ttyS0
54
55elm3b70 login:
56</div>
57
58<p>Once connected we can interact normally with the console stream. To
59perform front pannel operation such as peforming an <em>hard reset</em> we
60switch to command mode. This is achieved using the escape sequence
61<code>~$</code>. Nore the prompt <code>Command&gt;</code>
62
63<div class="example">elm3b70 login: <em>~$</em>
64Command&gt; quit
65Connection closed
66$
67</div>
68
69<h2>Command Summary</h2>
70
71<p>The following commands are generally available:
72
73<p><table class="quote" rules="all" frame="box">
74
75<tr><th>Command<th>Description</tr>
76
77<tr><td>quit<td>quit this console session, note that this disconnects us from
78the session it does not affect the integity of the session itself.</tr>
79
80<tr><td>hardreset<td>force a hard reset on the machine, this may be a simple
81reset or a power off/on sequence whatever is required by this system.</tr>
82
83</table>
84
85<h2>Architecture</h2>
86
87<p>The conmux provides a virtual console multiplexor system reminicent of
88an Annex terminal server. You refer to the conmux <em>server</em> and
89<em>lines</em>, unlike an Annex lines are referred to by mnemonic names.
90Above we referred to the console for <code>elm3b70</code> 'connected to' the
91server <code>consoles.here.com</cond>. A virtual console server consists
92of a number of server processes. One <code>conmux-registry</code> server,
93several <code>conmux</code> servers and optionally several <em>helper</em>
94processes.
95
96<p><code>conmux-registry</code>: a server is defined by the server registry.
97This maintains the mnemonic name to current server location relation. When
98a client wishes to attach to a console on a server, the registry is first
99queried to locate the server currently handling that console.
100
101<p><code>conmux</code>: for each connected console there is a corresponding
102console multiplexor. This process is responsible for maintaining the
103connection to the console and for redistributing the output to the various
104connected clients. It is also responsible for handling "panel" commands
105from the client channels.
106
107<p><code>autoboot-helper</code>: an example helper which aids systems which
108are not capable of an automatic reboot. It connects to a console and watches
109for tell-tale reboot activity, preforming a "panel" <em>hardreset</em> when
110required. This provides the impression of seamless reboot for systems
111which this does not work.
112
113<h2>Configuration</h2>
114
115<h3>conmux-registry</h3>
116
117<p>Configuration of this service is very simple. Supplying the default
118registry port (normally 63000) and the location for the persistant registry
119database.
120
121<h3>conmux</h3>
122
123<p>Configuration of each conmux is complex. Each has a listener, payload
124and optionally one or more panel commands. Configuration is provided via
125a per console configuration file. This file consists of lines defining each
126element:
127
128<p><code>listener &lt;server&gt;/&lt;name&gt;</code>:
129defines the name of this console port as it appears in the registry.
130
131<p><code>socket &lt;name&gt; &lt;title&gt; &lt;host&gt;:&lt;port&gt;</code>:
132defines a console payload connected to a tcp socket on the network.
133<code>name</code> defines this payload within the multiplexor,
134<code>title</code> is announced to the connecting clients.
135
136<p><code>application &lt;name&gt; &lt;title&gt; &lt;cmd&gt;</code>:
137defines a console payload which is accessed by running a specific command.
138<code>name</code> defines this payload within the multiplexor,
139<code>title</code> is announced to the connecting clients.
140
141<p><code>command &lt;panel&gt; &lt;message&gt; &lt;cmd&gt;</code>:
142defines a panel command for the preceeding payload, triggerd when
143<code>panel</code> is typed at the command prompt. <code>message</code>
144is announced to the user community. <code>cmd</cmd> will be actually
145executed.
146
147<p>For example here is the configuration for a NUMA-Q system which is rebooted
148using a remote VCS console and for which the real console channel is
149on an Annex terminal server:
150
151<div class="example">listener localhost/elm3b130
152socket console 'elm3b130 console' console.server.here.com:2040
153 command 'hardreset' 'initated a hard reset' \
154 './reboot-numaq vcs 1.2.3.4 elm3b130 12346 Administrator password'
155</div>
156
157</body>
158</html>