NAME

watch_console - monitor nodes' console ports, buffering the output.


MODULE

base


SYNOPSIS

watch_console [ --help ] [ --db <dbname> ] [ --daemonize ] [ --anywhere ] [ --timeout <seconds> ] [ --port <num> ] [ --buffer <num chars> ] [ --log ] [ --logwipe ] <{device|collection}...>


DESCRIPTION

The watch_console process will connect to the console port of a device or devices, storing all output in a buffer in memory. It will also listen for connections on a specified port and respond to commands to dump the buffer, start/stop monitoring, access a "passthru" connection, etc.


OPTIONS

--db <dbname> Filename of cluster database to use.

-d, --daemon[ize] Run watch_console in the background and disconnect it from the current terminal. Any error or warning messages will be logged to /tmp/watch_console.log

--any[where] Normally, only a node's leader is allowed to monitor it's console. This is to make it easier to find the right daemon to use for a passthru connection. If absolutely necessary, use this flag to override the normal behavior.

--time[out] <seconds> Specify the inactivity timeout for passthru and "ungregistered" connections. Connections that are registered as watchers of a given console will never time out. The default is 600 for passthru connections and 120 for those just sitting at the prompt. This flag will alter both.

--port <num> Listen for incomming connections on a port other than the default. The default is specified in CConf.pm, or if not there, then it is 2010.

--buffer <num chars> Number of characters to store in the buffer for each console connection. This includes both printable and unprintable characters, so it may need to be more than you expect. However, be careful of sucking up too much memory. The default is a meager 8192 characters.

--log Log all output from watched consoles to files(s) using one file per node. .

--logwipe Wipe out any existing log files for watched consoles.

--help Print manpage.


COMMANDS

The following commands are available once you have opened a telnet session to the watch_console process (e.g. console --wc <nodename>):

quit Close the current telnet connection.

status List devices that are, or have been monitored since the daemon started. Shows whether or not the node is currently being monitored, the number of "watch" (read only) connections, whether or not there is an "access" (passthru, read/write) connection, and the current buffer size.

connect <node> Start monitoring a new device (or devices)

disconnect <node> Stop monitoring a device or devices, preserving the io buffer.

access <node> Open a read/write passthru connection to a device. To avoid administration problems, only one access connection can be active at a time. Accessed connections can be exited using the 'ESC ESC w c ENTER' escape sequence.

watch <node> Open a readonly connection to a device. There is no limit on the number of simultaneous watch connections.

buffer <node> Show the io buffer from a device.

clear <node> Clear the buffer for a given device.

clearall Clear all buffers.

shutdown Stop the watch_console daemon cleanly. (io buffers will be lost!)

help Display the above list of commands.


FILES

The default paths for location of the database, port to use, buffer size, prompt to display and other settings are recorded in $CLUSTER_CONFIG/CConf.pm. Set your $CLUSTER_CONFIG environment variable accordingly, or use the default of "/cluster/config".


SEE ALSO

console