Back to the main page

Console server

Working on console is something that we all need to do sometimes. 
And this is not always fun, especially if a server room is cold (and no chair to sit down). 

So connecting on a serial port from your desk or home really makes your life much easier. 

Basically, it's always good idea that each Sun server has three connections:

1. Data connection (one or more)
2. Management connection {ALOM (SPARC) or ILOM (x86)} for out-of-band access and management, put this on separate subnet. 
3. Console connection (on the serial port) for out-of-band connection also. 

I have been working with Cyclades console server, series TS-2000 and TS-3000. 

These appliances support multiple user access to same console simultaneously (only one person can work and has write access, while rest are in read-only mode), which is great since someone can monitor what are you doing and provide help. 

The software I use is CSWconserver (Solaris package easily downloaded from This one also allows you to log serial traffic. 

Client program 

Let's first say something about client program. This is command console.

It reads system-wide configuration file (if needed there is also user config file $HOME/.consolerc). 

The file on console server can look like:  
config * {
Basically, client console knows for primary conserver host, and connects to it. If there are more servers, primary one can refer client to other that is responsible for specific console. Some commands to introduce you with console command. Connect to each console server and show version information.
# console -r
192.168.etc.etc: version ` version 8.1.11'
server-1: version ` version 8.1.11'
server-1: version ` version 8.1.11'
Connect only to primary server.
# console -R
version ` version 8.1.11'
Shows who is currently using console (good to know if you want to reset machine).
# /opt/csw/etc> console -w		attach  40days server-1    	attach  21days server-2
Show PID of master daemon on all servers
# console -P
192.168.etc.etc: 569
server-1: 846
Show list of all consoles with status and attached users.
# console -u
machine-1	up   
machine-2	up   
machine-3	up
Show list of console and devices.
# console -x
machine-1	on cyclades-1/7009	at  Netwk
machine-2	on cyclades-2/7008	at  Netwk
machine-3	on cyclades-3/7020	at  Netwk
machine-4	on cyclades-4/7022	at  Netwk
Exiting and manipulating console connection are performed with Ctrl E c , followed by commands, like some of mostly used ones are:
.	disconnect

;	select another console

l0	send break signal

?	display list of commands

z	suspend connection

f	force to connect with write mode (push other connected users to spy/read mode)

b	send broadcast message to all users on this console  
Daemon program Conserver is daemon that talks with client console and reads file
# pgrep -l cons
  569 conserver
  571 conserver
25508 console
26725 conserver
Conserver categorizes consoles into 2 groups: 1. consoles to actively manage 2. consoles to know about and reference client to other servers If "master" value in configuration file points to local machine, conserver will manage consoles. How it works in short: 1. Conserver creates process (PID 25508 in example above) for each console it has to manage and assign port number. 2. Client program console talks with master console server process (PID 25508) and finds port The file can look like:
default *       { logfile /logs/console/&; rw *; }
default cyclade { type host; host cyclade; master con-server; portbase 7000; portinc 1; }

access * {
        trusted con-server-1;
        trusted con-server-2;
console host-1 { include cyclade; port 1; }
console host-2 { include cyclade; port 2; }
console host-3 { include cyclade; port 3; }
console host-4 { include cyclade; port 4; }
Tips and explanation: 1. Form of this file is basically BLOCK_TYPE NAME { keyword value; .. } 2. Block "default" with name * defines logfile directory /logs/console and & is replaced with console name. Also everyone has read/write access. 3. Block "default" with name cyclade defines console type "host" for TCP connection, "host" is hostname of Cyclades appliance, "master" is server that manages Cyclades, "portbase" is base value for port calculation formula, "portinc" is increment value for port calculation. 4. Block "access" with name * is for all conserver hosts. Trusted host can connect without user authentication. 5. Block "console" with name of console use "include" to include previously defined block "cyclade". But for each console also defines port number (formula for final port is final_port = portbase + portinc x port).
Back to the main page