Commit fec832e8 authored by David G Andersen's avatar David G Andersen

Initial import of the "capture" source into the testbed repository.

Note that this has a hardcoded value for NBPG, a define that's only
present in the digiboard headers.  In the interest of minimal source
code changes (heh, heh, heh) I left it alone. :p

Works on *bsd, and now Linux.  Manpage included at no charge,
though if someone wants to figure out why the manpage only
works under BSD ("Because Dave is an idiot" is not an acceptable
answer, true as it may be), that'd be cool.
parent fcdd5f4b
capture: capture.c
cc $(CFLAGS) -o capture capture.c
install: capture
install -s capture $(DESTDIR)/usr/site/bin
clean: FRC
rm -f *.o capture core errs Errs
.\" Copyright (c) 2000, University of Utah, all rights reserved.
.Dd April 19, 2000
.Os BSD 4
.Nm capture
.Nd record serial port output while allowing tip access to it
.Nm capture
.Op Fl s Ar speed
.Op Fl H
.Ar remote-name
.Ar dev-name
.Nm capture
records output from a tty device to a file, and makes a new tty
device available by which you can still tip to the original
The options are as follows:
.Bl -tag -width indent
.It Fl s Ar speed
Set the speed in bps (2400, 9600, 115200, etc)
.It Fl H
Use hardware flow control
You should run one copy of
.Nm capture
for each device you wish to record. In order to run
.Nm capture
you'll need to set up a pty/tty pair for this device.
By default, these devices go in
.Pa /dev/tip
The tty file (the one that's now accessible to 'tip') should
be named
.Ar remote-name
and the pty file (that
.Nm capture
uses internally) should be named
.Ar remote-name-pty
The output from
.Nm capture
by default goes in the file
.Pa /var/log/tiplogs/remote-name
The directory in which this occurs is configurable by modifying
the LOGPATH variable in the source code.
To configure capture for a remote machine named
.Ar test
which is connected to our
.Pa /dev/cuaa1
port at 115200 bps,
we'd do the following steps:
mkdir /dev/tip
mkdir /var/log/tiplogs
.Xr mknod 8
to create a tty/pty pair in
.Pa /dev/tip
named test and test-pty
.Nm capture -s 115200 test cuaa1
If you wish to be able to
.Xr tip 1
directly to test by typing tip test, then
put a line like the following in your
.Xr remote 5
(Place the capture startup line in your rc files if
you wish it to start automatically).
.Bl -tag -width /var/log/tiplogs -compact
.It Pa /etc/remote
Remote system descriptions
.It Pa /var/log/tiplogs
Logfile of machine output
.It /dev/tip
Directory for capture ttys and ptys
Originally written by Leigh Stoller at the University of Utah
in 1992 for HPBSD, runs well under FreeBSD as well.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment