Wanted: UNIX interactive terminal session logger

Stephen Dyer dyer at wivax.UUCP
Sat Nov 12 13:25:27 AEST 1983


Bruce Borden did this for the Harvard UNIX systems long ago, and it's
been carried over to their 2.9BSD/4.1BSD systems.  It involves some
minor kernel mods--essentially, one can associate a "protocol" file handle
with a primary file handle, so that the protocol file is written upon
automatically whenever a write OR read operation occurs on the primary
file.  In other words, when you read or write data to the primary file,
the protocol file receives a copy of that data.

The user interface looks like this:

% monitor arbitrary-unix-command > protocolfile
(the standard output is restored to that of the terminal after the
 protocol file is assigned.  Any reads or writes to standard input,
 standard output or standard error are placed into the protocolfile.)

This works incredibly well whenever you need a copy of a complete session
saved for later printout (of course, screen operations don't make much
sense on a line printer.)  It really is a good counter-example to those
who always argue "keep it out of the kernel"--"tee" and pipes just can't
do the job here.  At Harvard, it's been used by students for the past 9
years.

Contact John Park at the Harvard Science Center for info.
His net address is "decvax!genrad!wjh12!unixvax:park".

/Steve Dyer
decvax!bbncca!sdyer



More information about the Comp.unix mailing list